From 42c5a5ed4f91705e39945d3c88c87a55b50f8302 Mon Sep 17 00:00:00 2001 From: Jean-Michel Trivi Date: Wed, 17 Nov 2010 10:54:18 -0800 Subject: SIP calls should set the audio mode to MODE_IN_COMMUNICATION Audio mode MODE_IN_CALL is reserved for telephony. Change-Id: I66cb9ff746ad9c15b2ce3b5a6de6c69f56654d15 --- .../java/com/android/internal/telephony/CallManager.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'telephony') diff --git a/telephony/java/com/android/internal/telephony/CallManager.java b/telephony/java/com/android/internal/telephony/CallManager.java index d74a547..5b49305 100644 --- a/telephony/java/com/android/internal/telephony/CallManager.java +++ b/telephony/java/com/android/internal/telephony/CallManager.java @@ -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; } -- cgit v1.1