am fac4a689: Merge "Fix the audio mode glitch during hangup." into gingerbread

* commit 'fac4a689f86b0d46a2c76cec0a6ce2f4bac2a22a':
  Fix the audio mode glitch during hangup.
This commit is contained in:
John Wang
2010-11-10 19:28:31 -08:00
committed by Android Git Automerger

View File

@ -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;