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

am: 873badbd1c

Change-Id: I33a70877db8ae1af5e2e2130b22670437f6ac34f
This commit is contained in:
Lorenzo Colitti
2019-04-08 20:34:03 -07:00
committed by android-build-merger

View File

@@ -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() {
mLaunchCaptivePortalAppBroadcastReceiver = null;
if (mLaunchCaptivePortalAppBroadcastReceiver != null) {
mContext.unregisterReceiver(mLaunchCaptivePortalAppBroadcastReceiver);
mLaunchCaptivePortalAppBroadcastReceiver = null;
}
hideProvisioningNotification();
}
}