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

Commit e188b658 authored by Wink Saville's avatar Wink Saville
Browse files

Fix NPE when exiting DcDefaultState. DO NOT MERGE.

Bug: 9263045
Change-Id: Ib3b599b2502130af248a0cffc226d8916047dc6d
parent f02d966c
Loading
Loading
Loading
Loading
+5 −7
Original line number Original line Diff line number Diff line
@@ -779,6 +779,11 @@ public final class DataConnection extends StateMachine {
        public void exit() {
        public void exit() {
            if (DBG) log("DcDefaultState: exit");
            if (DBG) log("DcDefaultState: exit");


            // Unregister for DRS or RAT change.
            mPhone.getServiceStateTracker().unregisterForDataRegStateOrRatChanged(getHandler());

            // Remove ourselves from the DC lists
            mDcController.removeDc(DataConnection.this);


            if (mAc != null) {
            if (mAc != null) {
                mAc.disconnected();
                mAc.disconnected();
@@ -795,13 +800,6 @@ public final class DataConnection extends StateMachine {
            mLinkCapabilities = null;
            mLinkCapabilities = null;
            mLastFailCause = null;
            mLastFailCause = null;
            mUserData = null;
            mUserData = null;

            // Unregister for DRS or RAT change.
            mPhone.getServiceStateTracker().unregisterForDataRegStateOrRatChanged(getHandler());

            // Remove ourselves from the DC lists
            mDcController.removeDc(DataConnection.this);

            mDcController = null;
            mDcController = null;
            mDcTesterFailBringUpAll = null;
            mDcTesterFailBringUpAll = null;
        }
        }