Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1fc4b338 authored by Tyler Gunn's avatar Tyler Gunn Committed by android-build-merger
Browse files

Prevent IMS call merge if the peer call has a pending update request.

am: c7ff7ee0

Change-Id: I805b335a3a3814c66b47655ab2e90561ae5637de
parents 29ec0fb1 c7ff7ee0
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -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",