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

Commit 7ba0f259 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
Merged-In: Idef20e1cd832623f8052e4701621f876b065ef6e
Change-Id: Idef20e1cd832623f8052e4701621f876b065ef6e
(cherry picked from commit 67918ee9)
parent 1dd45a4d
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;

@@ -998,6 +998,7 @@ public class DataConnection extends StateMachine {
        mDownlinkBandwidth = 14;
        mUplinkBandwidth = 14;
        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
            // 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);