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

Commit f1227d71 authored by Libin.Tang@motorola.com's avatar Libin.Tang@motorola.com Committed by Pavel Zhamaitsiak
Browse files

IMS:Re-Initiate Conference Call from Leaf Node Causes Conference Call Crash.

During conference call, if there is an incoming call and user accepts it,
the ims FW triggers two accept commands since ims FW triggers the onCallHeld
multiple times for conference call.
The multiple accept commands causes the ims ril to respond failure. As the result,
the call drops and also crash occurs.
The fix is to block the multiple accepts in ims FW layer.

Bug: 17606426
Change-Id: I89904d4c64dad0d19398f74408ddc177f59c40ce
parent 3b2b1bd2
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ import com.android.ims.ImsManager;
import com.android.ims.ImsReasonInfo;
import com.android.ims.ImsServiceClass;
import com.android.ims.ImsUtInterface;
import com.android.ims.internal.CallGroup;
import com.android.ims.internal.IImsVideoCallProvider;
import com.android.ims.internal.ImsVideoCallProviderWrapper;
import com.android.internal.telephony.Call;
@@ -100,7 +101,6 @@ public final class ImsPhoneCallTracker extends CallTracker {

                    // Normal MT call
                    ImsCall imsCall = mImsManager.takeCall(mServiceId, intent, mImsCallListener);

                    ImsPhoneConnection conn = new ImsPhoneConnection(mPhone.getContext(), imsCall,
                            ImsPhoneCallTracker.this, mRingingCall);
                    addConnection(conn);
@@ -983,6 +983,7 @@ public final class ImsPhoneCallTracker extends CallTracker {
                }
                if (DBG) log("Incoming connection of 0 connect time detected - translated cause = "
                        + cause);

            }
            processCallStateChange(imsCall, ImsPhoneCall.State.DISCONNECTED, cause);

@@ -1005,11 +1006,17 @@ public final class ImsPhoneCallTracker extends CallTracker {
                ImsPhoneCall.State oldState = mBackgroundCall.getState();
                processCallStateChange(imsCall, ImsPhoneCall.State.HOLDING,
                        DisconnectCause.NOT_DISCONNECTED);

                if (oldState == ImsPhoneCall.State.ACTIVE) {
                    if ((mForegroundCall.getState() == ImsPhoneCall.State.HOLDING)
                            || (mRingingCall.getState() == ImsPhoneCall.State.WAITING)) {
                        boolean isOwner = true;
                        CallGroup callGroup =  imsCall.getCallGroup();
                        if (callGroup != null) {
                            isOwner = callGroup.isOwner(imsCall);
                        }
                        if (isOwner) {
                            sendEmptyMessage(EVENT_RESUME_BACKGROUND);
                        }
                    } else {
                        //when multiple connections belong to background call,
                        //only the first callback reaches here