summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorMichael Plass <mplass@google.com>2019-05-13 18:25:48 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-05-13 18:25:48 -0700
commit68fa64051090ced1e78ef0be65661b44d8b65725 (patch)
tree71b7dcb2a9a00909697800456a5deb273f26ae61 /service
parent55b21296489b5962d730dd158cf8d8318809a03a (diff)
parent54e1efb67223eaa7690561a0add7731a8f7b0cdb (diff)
Do not disconnect wifi immediately due to no internet am: bb7edf7945
am: 54e1efb672 Change-Id: Icee002a76af133c3eb974ff3f6c92122c9ac5d27
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiConnectivityManager.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiConnectivityManager.java b/service/java/com/android/server/wifi/WifiConnectivityManager.java
index 7d34e405d..7411422e0 100644
--- a/service/java/com/android/server/wifi/WifiConnectivityManager.java
+++ b/service/java/com/android/server/wifi/WifiConnectivityManager.java
@@ -16,6 +16,7 @@
package com.android.server.wifi;
+import static android.net.wifi.WifiConfiguration.NetworkSelectionStatus.DISABLED_NO_INTERNET_PERMANENT;
import static android.net.wifi.WifiConfiguration.NetworkSelectionStatus.DISABLED_NO_INTERNET_TEMPORARY;
import static com.android.internal.util.Preconditions.checkNotNull;
@@ -565,6 +566,11 @@ public class WifiConnectivityManager {
}
@Override
public void onSavedNetworkPermanentlyDisabled(int networkId, int disableReason) {
+ // For DISABLED_NO_INTERNET_PERMANENT we do not need to remove the network
+ // because supplicant won't be trying to reconnect. If this is due to a
+ // preventAutomaticReconnect request from ConnectivityService, that service
+ // will disconnect as appropriate.
+ if (disableReason == DISABLED_NO_INTERNET_PERMANENT) return;
mConnectivityHelper.removeNetworkIfCurrent(networkId);
updatePnoScan();
}