Updates the saved mute states on background calls.
- We discovered recently that we're managing a global mute state in InCallUi but on the telephony side we still keep a mute state for individual connections. This is the reason for the bug referred to.
- Ideally we would like to update the InCallUi code to record the mute state for each connection. However this has to be punted to L.
- Instead we made a change of (hopefully) minimal impact on the telephony side to make sure the mute states for all existing connections reflect the global mute state. We would lose the mute state of individual connections, but Santos and I think this won't contradict with what users expect in such cases.
Bug: 11035657
Change-Id: I09f899e3de31bc3154980795deecab78fc6d9d35
diff --git a/src/com/android/phone/PhoneUtils.java b/src/com/android/phone/PhoneUtils.java
index d512b88..efb828d 100644
--- a/src/com/android/phone/PhoneUtils.java
+++ b/src/com/android/phone/PhoneUtils.java
@@ -1974,6 +1974,17 @@
}
sConnectionMuteTable.put(cn, Boolean.valueOf(muted));
}
+
+ // update the background connections to match. This includes
+ // all the connections on conference calls.
+ if (cm.hasActiveBgCall()) {
+ for (Connection cn : cm.getFirstActiveBgCall().getConnections()) {
+ if (sConnectionMuteTable.get(cn) == null) {
+ if (DBG) log("problem retrieving mute value for this connection.");
+ }
+ sConnectionMuteTable.put(cn, Boolean.valueOf(muted));
+ }
+ }
}
static boolean isInEmergencyCall(CallManager cm) {