diff options
-rw-r--r-- | telephony/java/com/android/internal/telephony/CallManager.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/telephony/java/com/android/internal/telephony/CallManager.java b/telephony/java/com/android/internal/telephony/CallManager.java index 5f9a3e7..d74a547 100644 --- a/telephony/java/com/android/internal/telephony/CallManager.java +++ b/telephony/java/com/android/internal/telephony/CallManager.java @@ -380,7 +380,11 @@ public final class CallManager { break; case OFFHOOK: Phone fgPhone = getFgPhone(); - if (hasActiveFgCall() && !(fgPhone instanceof SipPhone)) { + // Enable IN_CALL mode while foreground call is in DIALING, + // ALERTING, ACTIVE and DISCONNECTING state and not from sipPhone + if (getActiveFgCallState() != Call.State.IDLE + && getActiveFgCallState() != Call.State.DISCONNECTED + && !(fgPhone instanceof SipPhone)) { mode = AudioManager.MODE_IN_CALL; } break; |