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

Commit 67918ee9 authored by Jack Yu's avatar Jack Yu
Browse files

Fixed incorrect unregister from connectivity service

We should only unregister when the data connection is
not being handover or handover completed.

Fix: 160443926
Test: Manual
Change-Id: Idef20e1cd832623f8052e4701621f876b065ef6e
parent 595e9534
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -298,7 +298,7 @@ public class DataConnection extends StateMachine {
    public int mCid;

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

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

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