summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2018-05-18 17:06:40 -0700
committerRoshan Pius <rpius@google.com>2018-05-22 09:41:02 +0000
commit95eae9f3e621d3bd5f9b0b63b4c464533b4ba8cd (patch)
tree60d5c3b7653c9096aa82b862876dc414a596cd2b /service
parent095121ada1c9ea6034e86606395de20cddcad9ba (diff)
WifiStateMachine: Re-enable network on internet validation
Once the network has validated internet access, re-enable network selection status to clear out any blacklist. This will handle cases where the network had no-internet temporarily and then re-established internet connectivity. Also, added an explicit log when network is being disabled because of no-internet. Bug: 72635747 Test: Unit tests Test: Manually verified that network was re-enabled when internet connectivity was restored (when there were no other saved networks around) Change-Id: I0de3c0e8c842efe56b1ab0fd2fb89bd2874e7285
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiStateMachine.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java
index fa22749bb..ef5eb027f 100644
--- a/service/java/com/android/server/wifi/WifiStateMachine.java
+++ b/service/java/com/android/server/wifi/WifiStateMachine.java
@@ -5300,6 +5300,8 @@ public class WifiStateMachine extends StateMachine {
// selection status to temporarily disable the network.
if (mWifiConfigManager.getLastSelectedNetwork() != config.networkId
&& !config.noInternetAccessExpected) {
+ Log.i(TAG, "Temporarily disabling network because of"
+ + "no-internet access");
mWifiConfigManager.updateNetworkSelectionStatus(
config.networkId,
WifiConfiguration.NetworkSelectionStatus
@@ -5314,6 +5316,10 @@ public class WifiStateMachine extends StateMachine {
config = getCurrentWifiConfiguration();
if (config != null) {
// re-enable autojoin
+ mWifiConfigManager.updateNetworkSelectionStatus(
+ config.networkId,
+ WifiConfiguration.NetworkSelectionStatus
+ .NETWORK_SELECTION_ENABLE);
mWifiConfigManager.setNetworkValidatedInternetAccess(
config.networkId, true);
}