diff options
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiConfigManager.java | 6 | ||||
-rw-r--r-- | service/java/com/android/server/wifi/WifiStateMachine.java | 16 |
2 files changed, 17 insertions, 5 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java index 982c48a48..09b0b3483 100644 --- a/service/java/com/android/server/wifi/WifiConfigManager.java +++ b/service/java/com/android/server/wifi/WifiConfigManager.java @@ -119,10 +119,11 @@ public class WifiConfigManager { 5, // threshold for DISABLED_AUTHENTICATION_FAILURE 5, // threshold for DISABLED_DHCP_FAILURE 5, // threshold for DISABLED_DNS_FAILURE + 1, // threshold for DISABLED_NO_INTERNET_TEMPORARY 1, // threshold for DISABLED_WPS_START 6, // threshold for DISABLED_TLS_VERSION_MISMATCH 1, // threshold for DISABLED_AUTHENTICATION_NO_CREDENTIALS - 1, // threshold for DISABLED_NO_INTERNET + 1, // threshold for DISABLED_NO_INTERNET_PERMANENT 1, // threshold for DISABLED_BY_WIFI_MANAGER 1, // threshold for DISABLED_BY_USER_SWITCH 1 // threshold for DISABLED_BY_WRONG_PASSWORD @@ -141,10 +142,11 @@ public class WifiConfigManager { 5 * 60 * 1000, // threshold for DISABLED_AUTHENTICATION_FAILURE 5 * 60 * 1000, // threshold for DISABLED_DHCP_FAILURE 5 * 60 * 1000, // threshold for DISABLED_DNS_FAILURE + 10 * 60 * 1000, // threshold for DISABLED_NO_INTERNET_TEMPORARY 0 * 60 * 1000, // threshold for DISABLED_WPS_START Integer.MAX_VALUE, // threshold for DISABLED_TLS_VERSION Integer.MAX_VALUE, // threshold for DISABLED_AUTHENTICATION_NO_CREDENTIALS - Integer.MAX_VALUE, // threshold for DISABLED_NO_INTERNET + Integer.MAX_VALUE, // threshold for DISABLED_NO_INTERNET_PERMANENT Integer.MAX_VALUE, // threshold for DISABLED_BY_WIFI_MANAGER Integer.MAX_VALUE, // threshold for DISABLED_BY_USER_SWITCH Integer.MAX_VALUE // threshold for DISABLED_BY_WRONG_PASSWORD diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java index 74a4dc7f0..fa22749bb 100644 --- a/service/java/com/android/server/wifi/WifiStateMachine.java +++ b/service/java/com/android/server/wifi/WifiStateMachine.java @@ -5292,10 +5292,20 @@ public class WifiStateMachine extends StateMachine { config.networkId, false); mWifiConfigManager.updateNetworkSelectionStatus(config.networkId, WifiConfiguration.NetworkSelectionStatus - .DISABLED_NO_INTERNET); + .DISABLED_NO_INTERNET_PERMANENT); + } else { + mWifiConfigManager.incrementNetworkNoInternetAccessReports( + config.networkId); + // If this was not the last selected network, update network + // selection status to temporarily disable the network. + if (mWifiConfigManager.getLastSelectedNetwork() != config.networkId + && !config.noInternetAccessExpected) { + mWifiConfigManager.updateNetworkSelectionStatus( + config.networkId, + WifiConfiguration.NetworkSelectionStatus + .DISABLED_NO_INTERNET_TEMPORARY); + } } - mWifiConfigManager.incrementNetworkNoInternetAccessReports( - config.networkId); } } return HANDLED; |