summaryrefslogtreecommitdiffstats
path: root/service/java/com/android/server/wifi/WifiConfigManager.java
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2018-05-04 16:38:29 -0700
committerRoshan Pius <rpius@google.com>2018-05-18 10:38:13 -0700
commitd5265a61c41f23503e755d37bd5611ebef3f12b0 (patch)
tree3c11188fa12f5ce7d630807a929167814a6ade6a /service/java/com/android/server/wifi/WifiConfigManager.java
parente93744bec9cb63b00b4597d49a20378749634358 (diff)
downloadandroid_frameworks_opt_net_wifi-d5265a61c41f23503e755d37bd5611ebef3f12b0.tar.gz
android_frameworks_opt_net_wifi-d5265a61c41f23503e755d37bd5611ebef3f12b0.tar.bz2
android_frameworks_opt_net_wifi-d5265a61c41f23503e755d37bd5611ebef3f12b0.zip
WifiConfigManager: Temporarily disable network with no internet access
Changes in the CL: a) Add a new network disable reason to temporarily blacklist an auto-connected network. b) When the device auto-connects to a network and then it detects a no internet report, we temporarily disable the network for 10 minutes. This should force network selection to pick another candidate if available. Note: a) If there are no other candidates available to auto-connect, the device will remain connected to the existing network (even though it is temporarily disabled). b) If the user explicitly clicked on the network, we'll not temporarily disable the network. Bug: 72635747 Test: Unit tests Test: Manually verified that device switched away from an auto-connected network when it detects no internet. Change-Id: I644693fa5d4477bdce1d39f391fc2fb24a773eeb
Diffstat (limited to 'service/java/com/android/server/wifi/WifiConfigManager.java')
-rw-r--r--service/java/com/android/server/wifi/WifiConfigManager.java6
1 files changed, 4 insertions, 2 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