Merge "SIP calls should set the audio mode to MODE_IN_COMMUNICATION"
This commit is contained in:
committed by
Android (Google) Code Review
commit
6c97eba1b7
@@ -380,12 +380,17 @@ public final class CallManager {
|
||||
break;
|
||||
case OFFHOOK:
|
||||
Phone fgPhone = getFgPhone();
|
||||
// Enable IN_CALL mode while foreground call is in DIALING,
|
||||
// ALERTING, ACTIVE and DISCONNECTING state and not from sipPhone
|
||||
// While foreground call is in DIALING,
|
||||
// ALERTING, ACTIVE and DISCONNECTING state
|
||||
if (getActiveFgCallState() != Call.State.IDLE
|
||||
&& getActiveFgCallState() != Call.State.DISCONNECTED
|
||||
&& !(fgPhone instanceof SipPhone)) {
|
||||
mode = AudioManager.MODE_IN_CALL;
|
||||
&& getActiveFgCallState() != Call.State.DISCONNECTED) {
|
||||
if (fgPhone instanceof SipPhone) {
|
||||
// enable IN_COMMUNICATION audio mode for sipPhone
|
||||
mode = AudioManager.MODE_IN_COMMUNICATION;
|
||||
} else {
|
||||
// enable IN_CALL audio mode for telephony
|
||||
mode = AudioManager.MODE_IN_CALL;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user