diff options
-rw-r--r-- | service/java/com/android/server/wifi/WifiConnectivityManager.java | 6 |
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(); } |