summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Lin <lucaslin@google.com>2019-04-07 21:55:20 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-04-07 21:55:20 -0700
commitebdc76ce015cfdb8c2c0a93dfd5aa4a3147d3e64 (patch)
treeeb57048e8484104a4979fc4a6ce6a9ec1ea9f0e8
parentfdfeaeb74e6651614c8fd66af157cf9c000abb79 (diff)
parent2c08f1023991f4707fab19c3647cdb68fbcc06d9 (diff)
Merge "Prevent SIGN_IN notification pop up several times"
am: 83152b1e5f Change-Id: I85a37f7bd74feae235befb53cda0a5ff100805e4
-rw-r--r--src/com/android/server/connectivity/NetworkMonitor.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/server/connectivity/NetworkMonitor.java b/src/com/android/server/connectivity/NetworkMonitor.java
index 6f31f9b..8f7d988 100644
--- a/src/com/android/server/connectivity/NetworkMonitor.java
+++ b/src/com/android/server/connectivity/NetworkMonitor.java
@@ -779,6 +779,7 @@ public class NetworkMonitor extends StateMachine {
@Override
public void exit() {
+ mLaunchCaptivePortalAppBroadcastReceiver = null;
hideProvisioningNotification();
}
}
@@ -902,9 +903,10 @@ public class NetworkMonitor extends StateMachine {
mLaunchCaptivePortalAppBroadcastReceiver = new CustomIntentReceiver(
ACTION_LAUNCH_CAPTIVE_PORTAL_APP, new Random().nextInt(),
CMD_LAUNCH_CAPTIVE_PORTAL_APP);
+ // Display the sign in notification.
+ // Only do this once for every time we enter MaybeNotifyState. b/122164725
+ showProvisioningNotification(mLaunchCaptivePortalAppBroadcastReceiver.mAction);
}
- // Display the sign in notification.
- showProvisioningNotification(mLaunchCaptivePortalAppBroadcastReceiver.mAction);
// Retest for captive portal occasionally.
sendMessageDelayed(CMD_CAPTIVE_PORTAL_RECHECK, 0 /* no UID */,
CAPTIVE_PORTAL_REEVALUATE_DELAY_MS);