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

Commit 17397e37 authored by Hunsuk Choi's avatar Hunsuk Choi Committed by Android (Google) Code Review
Browse files

Merge "Check mIsWaitingForScanResult before calling cancelEmergencyNetworkScan()"

parents 58a27a20 b96f5086
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -341,9 +341,11 @@ public class DomainSelectionConnection {
    }

    private void onCancel(boolean resetScan) {
        if (mIsWaitingForScanResult) {
            mIsWaitingForScanResult = false;
            mPhone.cancelEmergencyNetworkScan(resetScan, null);
        }
    }

    /**
     * Cancels an ongoing selection operation. It is up to the {@link DomainSelectionService}
@@ -390,7 +392,7 @@ public class DomainSelectionConnection {
            mPhone.unregisterForEmergencyNetworkScan(mHandler);
            mRegisteredRegistrant = false;
        }
        if (mIsWaitingForScanResult) onCancel(true);
        onCancel(true);
        mController.removeConnection(this);
        if (mLooper != null) mLooper.quitSafely();
        mLooper = null;