summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2010-11-17 14:55:10 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-11-17 14:55:10 -0800
commit6c97eba1b73dd6ddcb976b3ea9147b35a13b5afd (patch)
treeaceacc49437dd0c9117585de7688f59c6f6facbb
parent751073ac2d3d8971b7fd3d48b1c0a7ef34ad740c (diff)
parent42c5a5ed4f91705e39945d3c88c87a55b50f8302 (diff)
downloadframeworks_base-6c97eba1b73dd6ddcb976b3ea9147b35a13b5afd.zip
frameworks_base-6c97eba1b73dd6ddcb976b3ea9147b35a13b5afd.tar.gz
frameworks_base-6c97eba1b73dd6ddcb976b3ea9147b35a13b5afd.tar.bz2
Merge "SIP calls should set the audio mode to MODE_IN_COMMUNICATION"
-rw-r--r--telephony/java/com/android/internal/telephony/CallManager.java15
1 files changed, 10 insertions, 5 deletions
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;
}