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

Commit de224267 authored by Omkar Kolangade's avatar Omkar Kolangade Committed by Pavel Zhamaitsiak
Browse files

IMS: Detach disconnected connections from its parent

Detach disconnected connections from its parent once
the call is ended

----------------------------------------------------

IMS: After SRVCC handover, disconnect the dropped IMS calls

After a successful SRVCC handover, disconnect the handover pending
or dropped IMS calls, if any

Bug: 18777284
Change-Id: If4899c70c587c70b8202559b3fe0027ecd166f21
parent efb8df7d
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneBase;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.TelephonyProperties;
import com.android.internal.telephony.imsphone.ImsPhoneConnection;

import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -711,6 +712,13 @@ public final class CdmaCallTracker extends CallTracker {
            }
        }

        /* Disconnect any pending Handover connections */
        for (Connection hoConnection : mHandoverConnections) {
            log("handlePollCalls - disconnect hoConn= " + hoConnection.toString());
            ((ImsPhoneConnection)hoConnection).onDisconnect(DisconnectCause.NOT_VALID);
            mHandoverConnections.remove(hoConnection);
        }

        // Any non-local disconnects: determine cause
        if (mDroppedDuringPoll.size() > 0) {
            mCi.getLastCallFailCause(
+8 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ import com.android.internal.telephony.gsm.CallFailCause;
import com.android.internal.telephony.gsm.GSMPhone;
import com.android.internal.telephony.gsm.GsmCall;
import com.android.internal.telephony.gsm.GsmConnection;
import com.android.internal.telephony.imsphone.ImsPhoneConnection;

import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -615,6 +616,13 @@ public final class GsmCallTracker extends CallTracker {
            }
        }

        /* Disconnect any pending Handover connections */
        for (Connection hoConnection : mHandoverConnections) {
            log("handlePollCalls - disconnect hoConn= " + hoConnection.toString());
            ((ImsPhoneConnection)hoConnection).onDisconnect(DisconnectCause.NOT_VALID);
            mHandoverConnections.remove(hoConnection);
        }

        // Any non-local disconnects: determine cause
        if (mDroppedDuringPoll.size() > 0) {
            mCi.getLastCallFailCause(
+2 −0
Original line number Diff line number Diff line
@@ -878,6 +878,8 @@ public final class ImsPhoneCallTracker extends CallTracker {

        if (state == ImsPhoneCall.State.DISCONNECTED) {
            changed = conn.onDisconnect(cause) || changed;
            //detach the disconnected connections
            conn.getCall().detach(conn);
            removeConnection(conn);
        }

+1 −1
Original line number Diff line number Diff line
@@ -302,7 +302,7 @@ public class ImsPhoneConnection extends Connection {
    }

    /** Called when the connection has been disconnected */
    /*package*/ boolean
    public boolean
    onDisconnect(int cause) {
        Rlog.d(LOG_TAG, "onDisconnect: cause=" + cause);
        if (mCause != DisconnectCause.LOCAL) mCause = cause;