aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2017-09-06 14:38:37 -0700
committerTyler Gunn <tgunn@google.com>2017-10-27 13:10:02 -0700
commitc7ff7ee0b5ff4298cbeb1649fe0c6cad61877e7c (patch)
tree96f342849124b4835d7c807af5d4c484420c0e2f
parent29ec0fb19061f2fd1daec19aa38b106626d201ed (diff)
downloadims-c7ff7ee0b5ff4298cbeb1649fe0c6cad61877e7c.tar.gz
Prevent IMS call merge if the peer call has a pending update request.
Currently, if the user requests merge, and the call they request the merge on is in the midst of some other pending operation (e.g. hold, resume), the system will prevent the merge from taking place. The logic, however does not account for the fact that the background call being merged into the foreground call could also be engaged in some other update operation. Added code to ensure that both calls are not actively engaged in some pending operation. Test: Manual Change-Id: Icc2f3786865345435bbf138b54736fc6f09c0aa4 Merged-In: I5bb050b406bff514fa6132c395c2a4f6574b572b Fixes: 63764631
-rw-r--r--src/java/com/android/ims/ImsCall.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/java/com/android/ims/ImsCall.java b/src/java/com/android/ims/ImsCall.java
index 716687d7..c5e6368e 100644
--- a/src/java/com/android/ims/ImsCall.java
+++ b/src/java/com/android/ims/ImsCall.java
@@ -1319,13 +1319,28 @@ public class ImsCall implements ICall {
logi("merge :: ");
synchronized(mLockObj) {
+ // If the host of the merge is in the midst of some other operation, we cannot merge.
if (mUpdateRequest != UPDATE_NONE) {
+ setCallSessionMergePending(false);
+ if (mMergePeer != null) {
+ mMergePeer.setCallSessionMergePending(false);
+ }
loge("merge :: update is in progress; request=" +
updateRequestToString(mUpdateRequest));
throw new ImsException("Call update is in progress",
ImsReasonInfo.CODE_LOCAL_ILLEGAL_STATE);
}
+ // The peer of the merge is in the midst of some other operation, we cannot merge.
+ if (mMergePeer != null && mMergePeer.mUpdateRequest != UPDATE_NONE) {
+ setCallSessionMergePending(false);
+ mMergePeer.setCallSessionMergePending(false);
+ loge("merge :: peer call update is in progress; request=" +
+ updateRequestToString(mMergePeer.mUpdateRequest));
+ throw new ImsException("Peer call update is in progress",
+ ImsReasonInfo.CODE_LOCAL_ILLEGAL_STATE);
+ }
+
if (mSession == null) {
loge("merge :: no call session");
throw new ImsException("No call session",