diff options
author | Tyler Gunn <tgunn@google.com> | 2017-09-06 14:38:37 -0700 |
---|---|---|
committer | Tyler Gunn <tgunn@google.com> | 2017-09-06 15:10:42 -0700 |
commit | 9b1723376c2f04b30b677d94f9105220a014501e (patch) | |
tree | aad104673a74dbf6b5515d177873f2d0095ef326 | |
parent | a9732050e14a92df8634fb3a0c2364d062bb3f79 (diff) | |
download | ims-9b1723376c2f04b30b677d94f9105220a014501e.tar.gz |
Prevent IMS call merge if the peer call has a pending update request.oreo-mr1-dev
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
Fixes: 63764631
-rw-r--r-- | src/java/com/android/ims/ImsCall.java | 15 |
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", |