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

Commit 00e20463 authored by Jack Yu's avatar Jack Yu Committed by Automerger Merge Worker
Browse files

Fixed incorrect unregister from connectivity service am: 7ba0f259 am: 2271e9f1

Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/1438134

Change-Id: Ibf1dbb1ff304e10aac42d5e3d805652009e4e874
parents 2ba6630e 2271e9f1
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -298,7 +298,7 @@ public class DataConnection extends StateMachine {
    public int mCid;
    public int mCid;


    @HandoverState
    @HandoverState
    private int mHandoverState;
    private int mHandoverState = HANDOVER_STATE_IDLE;
    private final Map<ApnContext, ConnectionParams> mApnContexts = new ConcurrentHashMap<>();
    private final Map<ApnContext, ConnectionParams> mApnContexts = new ConcurrentHashMap<>();
    PendingIntent mReconnectIntent = null;
    PendingIntent mReconnectIntent = null;


@@ -998,6 +998,7 @@ public class DataConnection extends StateMachine {
        mDownlinkBandwidth = 14;
        mDownlinkBandwidth = 14;
        mUplinkBandwidth = 14;
        mUplinkBandwidth = 14;
        mIsSuspended = false;
        mIsSuspended = false;
        mHandoverState = HANDOVER_STATE_IDLE;
    }
    }


    /**
    /**
@@ -2253,7 +2254,7 @@ public class DataConnection extends StateMachine {
            // which is when IWLAN handover is ongoing. Instead of unregistering, the agent will
            // which is when IWLAN handover is ongoing. Instead of unregistering, the agent will
            // be transferred to the new data connection on the other transport.
            // be transferred to the new data connection on the other transport.
            if (mNetworkAgent != null) {
            if (mNetworkAgent != null) {
                if (mHandoverState != HANDOVER_STATE_BEING_TRANSFERRED) {
                if (mHandoverState == HANDOVER_STATE_IDLE) {
                    mNetworkAgent.unregister(DataConnection.this);
                    mNetworkAgent.unregister(DataConnection.this);
                }
                }
                mNetworkAgent.releaseOwnership(DataConnection.this);
                mNetworkAgent.releaseOwnership(DataConnection.this);