diff options
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 |
commit | 65a7f147deb02f728959eb05913a2d6ce53dea1c (patch) | |
tree | 0c9d6d600c288f4da7c9f8ac52c449b9342e6ff4 /telephony/java | |
parent | ca36d863cc1684807e93f442c5ace89f08b9b5f5 (diff) | |
download | frameworks_base-65a7f147deb02f728959eb05913a2d6ce53dea1c.zip frameworks_base-65a7f147deb02f728959eb05913a2d6ce53dea1c.tar.gz frameworks_base-65a7f147deb02f728959eb05913a2d6ce53dea1c.tar.bz2 |
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
Diffstat (limited to 'telephony/java')
-rw-r--r-- | telephony/java/com/android/internal/telephony/CallManager.java | 2 | ||||
-rwxr-xr-x | telephony/java/com/android/internal/telephony/sip/SipPhone.java | 4 |
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 a8dd9c2..0335ca2 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 72f3831..461e4fb 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() { |