Loading src/java/com/android/ims/ImsCall.java +23 −15 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package com.android.ims; import com.android.internal.R; import java.util.ArrayList; import java.util.Iterator; import java.util.List; Loading Loading @@ -1368,6 +1366,15 @@ public class ImsCall implements ICall { } } private boolean isUpdatePending(ImsCall imsCall) { if (imsCall != null && imsCall.mUpdateRequest != UPDATE_NONE) { loge("merge :: update is in progress; request=" + updateRequestToString(mUpdateRequest)); return true; } return false; } /** * Merges the active & hold call. * Loading @@ -1378,25 +1385,23 @@ 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) { // If the fg call of the merge is in the midst of some other operation, we cannot merge. // fg is either the host or the peer of the merge if (isUpdatePending(this)) { setCallSessionMergePending(false); if (mMergePeer != null) { mMergePeer.setCallSessionMergePending(false); } loge("merge :: update is in progress; request=" + updateRequestToString(mUpdateRequest)); if (mMergePeer != null) mMergePeer.setCallSessionMergePending(false); if (mMergeHost != null) mMergeHost.setCallSessionMergePending(false); 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) { // If the bg call of the merge is in the midst of some other operation, we cannot merge. // bg is either the peer or the host of the merge. if (isUpdatePending(mMergePeer) || isUpdatePending(mMergeHost)) { 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", if (mMergePeer != null) mMergePeer.setCallSessionMergePending(false); if (mMergeHost != null) mMergeHost.setCallSessionMergePending(false); throw new ImsException("Peer or host call update is in progress", ImsReasonInfo.CODE_LOCAL_ILLEGAL_STATE); } Loading @@ -1421,6 +1426,9 @@ public class ImsCall implements ICall { // merge is pending. mUpdateRequest = UPDATE_MERGE; mMergePeer.mUpdateRequest = UPDATE_MERGE; } else if (mMergeHost != null && !mMergeHost.isMultiparty() && !isMultiparty()) { mUpdateRequest = UPDATE_MERGE; mMergeHost.mUpdateRequest = UPDATE_MERGE; } mSession.merge(); Loading Loading
src/java/com/android/ims/ImsCall.java +23 −15 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package com.android.ims; import com.android.internal.R; import java.util.ArrayList; import java.util.Iterator; import java.util.List; Loading Loading @@ -1368,6 +1366,15 @@ public class ImsCall implements ICall { } } private boolean isUpdatePending(ImsCall imsCall) { if (imsCall != null && imsCall.mUpdateRequest != UPDATE_NONE) { loge("merge :: update is in progress; request=" + updateRequestToString(mUpdateRequest)); return true; } return false; } /** * Merges the active & hold call. * Loading @@ -1378,25 +1385,23 @@ 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) { // If the fg call of the merge is in the midst of some other operation, we cannot merge. // fg is either the host or the peer of the merge if (isUpdatePending(this)) { setCallSessionMergePending(false); if (mMergePeer != null) { mMergePeer.setCallSessionMergePending(false); } loge("merge :: update is in progress; request=" + updateRequestToString(mUpdateRequest)); if (mMergePeer != null) mMergePeer.setCallSessionMergePending(false); if (mMergeHost != null) mMergeHost.setCallSessionMergePending(false); 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) { // If the bg call of the merge is in the midst of some other operation, we cannot merge. // bg is either the peer or the host of the merge. if (isUpdatePending(mMergePeer) || isUpdatePending(mMergeHost)) { 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", if (mMergePeer != null) mMergePeer.setCallSessionMergePending(false); if (mMergeHost != null) mMergeHost.setCallSessionMergePending(false); throw new ImsException("Peer or host call update is in progress", ImsReasonInfo.CODE_LOCAL_ILLEGAL_STATE); } Loading @@ -1421,6 +1426,9 @@ public class ImsCall implements ICall { // merge is pending. mUpdateRequest = UPDATE_MERGE; mMergePeer.mUpdateRequest = UPDATE_MERGE; } else if (mMergeHost != null && !mMergeHost.isMultiparty() && !isMultiparty()) { mUpdateRequest = UPDATE_MERGE; mMergeHost.mUpdateRequest = UPDATE_MERGE; } mSession.merge(); Loading