summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShriram Ganesh <sganesh@codeaurora.org>2015-12-11 15:52:15 -0800
committerSteve Kondik <steve@cyngn.com>2016-07-01 01:10:41 -0700
commit95a3e6688ef1c588c31a586d9084d299fe9e3927 (patch)
tree0561154acdfd10555761f8af5f1a77b6079bfdd4
parentbce16cb702f80b15bc70f078507c25c456729758 (diff)
downloadandroid_packages_services_Telecomm-95a3e6688ef1c588c31a586d9084d299fe9e3927.tar.gz
android_packages_services_Telecomm-95a3e6688ef1c588c31a586d9084d299fe9e3927.tar.bz2
android_packages_services_Telecomm-95a3e6688ef1c588c31a586d9084d299fe9e3927.zip
Fix a bug where conference call does not automatically resume.
The scenario is a background conference call and a foreground call in dialing state. When user cancels the foreground call, the background conference call is not automically resumed. This is because the logic for making a held call as the foreground call depends on there being only one call in the list of calls maintained by CallsManager. However, in a conference scenario there is more than one call object which are children of a top level conference call. The fix is to check the number of top level calls in held state. Change-Id: I4092e8c38ac6217002ef426d7674f8a6e4c837ab CRs-Fixed: 946284
-rw-r--r--src/com/android/server/telecom/CallsManager.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/com/android/server/telecom/CallsManager.java b/src/com/android/server/telecom/CallsManager.java
index 95c80046..d50a7536 100644
--- a/src/com/android/server/telecom/CallsManager.java
+++ b/src/com/android/server/telecom/CallsManager.java
@@ -1429,6 +1429,16 @@ public class CallsManager extends Call.ListenerBase implements VideoProviderProx
return count;
}
+ int getNumTopLevelCalls() {
+ int count = 0;
+ for (Call call : mCalls) {
+ if (call.getParentCall() == null) {
+ count++;
+ }
+ }
+ return count;
+ }
+
Call getOutgoingCall() {
return getFirstCallWithState(OUTGOING_CALL_STATES);
}
@@ -1706,7 +1716,7 @@ public class CallsManager extends Call.ListenerBase implements VideoProviderProx
}
// If only call in call list is held call it's also a foreground call
- if (mCalls.size() == 1 && call.getState() == CallState.ON_HOLD) {
+ if (getNumTopLevelCalls() == 1 && call.getState() == CallState.ON_HOLD) {
newForegroundCall = call;
}
@@ -1739,7 +1749,7 @@ public class CallsManager extends Call.ListenerBase implements VideoProviderProx
}
// If only call in call list is held call it's also a foreground call
- if (mCalls.size() == 1 && call.getState() == CallState.ON_HOLD) {
+ if (getNumTopLevelCalls() == 1 && call.getState() == CallState.ON_HOLD) {
newForegroundCall = call;
}