summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hung-ying Tyan <tyanh@google.com> 2011-01-11 15:10:48 +0800
committer Hung-ying Tyan <tyanh@google.com> 2011-01-11 15:32:30 +0800
commit65a7f147deb02f728959eb05913a2d6ce53dea1c (patch)
tree0c9d6d600c288f4da7c9f8ac52c449b9342e6ff4
parentca36d863cc1684807e93f442c5ace89f08b9b5f5 (diff)
Get mute state from active call.
Currently, PhoneUtils.getMute() returns the mute state from the foreground phone. When a SIP call is muted and then put on hold, the call is moved to background and the SipPhone becomes background phone. At this point, PhoneUtils.getMute() incorrectly returns false from the idle foreground phone (i.e., GSMPhone). CallManager provides getMute() but it's not used anywhere. This CL fixes the method and I'll have another CL to have PhoneUtils.getMute() take advantage of it. Bug: 3323789 Change-Id: I6c37500ae93f4e95db3bcd55e24e1ecb58a57c0a
-rw-r--r--telephony/java/com/android/internal/telephony/CallManager.java2
-rwxr-xr-xtelephony/java/com/android/internal/telephony/sip/SipPhone.java4
2 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 a8dd9c2567d9..0335ca21a9db 100644
--- a/telephony/java/com/android/internal/telephony/CallManager.java
+++ b/telephony/java/com/android/internal/telephony/CallManager.java
@@ -890,6 +890,8 @@ public final class CallManager {
public boolean getMute() {
if (hasActiveFgCall()) {
return getActiveFgCall().getPhone().getMute();
+ } else if (hasActiveBgCall()) {
+ return getFirstActiveBgCall().getPhone().getMute();
}
return false;
}
diff --git a/telephony/java/com/android/internal/telephony/sip/SipPhone.java b/telephony/java/com/android/internal/telephony/sip/SipPhone.java
index 72f3831682f1..461e4fbbc360 100755
--- a/telephony/java/com/android/internal/telephony/sip/SipPhone.java
+++ b/telephony/java/com/android/internal/telephony/sip/SipPhone.java
@@ -306,7 +306,9 @@ public class SipPhone extends SipPhoneBase {
}
public boolean getMute() {
- return foregroundCall.getMute();
+ return (foregroundCall.getState().isAlive()
+ ? foregroundCall.getMute()
+ : backgroundCall.getMute());
}
public Call getForegroundCall() {