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

Commit 873badbd authored by Lorenzo Colitti's avatar Lorenzo Colitti Committed by Gerrit Code Review
Browse files

Merge "Don't leak captive portal broadcast receivers."

parents 130b5bf1 e3537438
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -542,10 +542,6 @@ public class NetworkMonitor extends StateMachine {
                    return HANDLED;
                case CMD_NETWORK_DISCONNECTED:
                    logNetworkEvent(NetworkEvent.NETWORK_DISCONNECTED);
                    if (mLaunchCaptivePortalAppBroadcastReceiver != null) {
                        mContext.unregisterReceiver(mLaunchCaptivePortalAppBroadcastReceiver);
                        mLaunchCaptivePortalAppBroadcastReceiver = null;
                    }
                    quit();
                    return HANDLED;
                case CMD_FORCE_REEVALUATION:
@@ -779,7 +775,10 @@ public class NetworkMonitor extends StateMachine {

        @Override
        public void exit() {
            if (mLaunchCaptivePortalAppBroadcastReceiver != null) {
                mContext.unregisterReceiver(mLaunchCaptivePortalAppBroadcastReceiver);
                mLaunchCaptivePortalAppBroadcastReceiver = null;
            }
            hideProvisioningNotification();
        }
    }