Merge "Don't leak captive portal broadcast receivers." am: 873badbd1c

am: c097e76769

Change-Id: I1db24fe05ada8b3a37a9a60aa568b6153bf51ad8
This commit is contained in:
Lorenzo Colitti
2019-04-08 21:35: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();
}
}