summaryrefslogtreecommitdiffstats
path: root/service
diff options
context:
space:
mode:
authorPierre Vandwalle <vandwalle@google.com>2015-06-10 16:42:13 -0700
committerPierre Vandwalle <vandwalle@google.com>2015-06-16 16:02:28 -0700
commit39ca3a2fff1e2f7dd8613b094984199b95931671 (patch)
treea01b7d729ce68549fecc2570a98242b4b7623b4e /service
parentb53a183e0284025e11b4304c50d18c3f80f66e85 (diff)
downloadandroid_frameworks_opt_net_wifi-39ca3a2fff1e2f7dd8613b094984199b95931671.tar.gz
android_frameworks_opt_net_wifi-39ca3a2fff1e2f7dd8613b094984199b95931671.tar.bz2
android_frameworks_opt_net_wifi-39ca3a2fff1e2f7dd8613b094984199b95931671.zip
make sure validatedInternetAccess boolean is written to disk right away
Bug:21390908 Change-Id: Ia64068bccb84973aac6c26de96c074ffc6f4fae4
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiStateMachine.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java
index ee9a8dd7e..e1ab987d2 100644
--- a/service/java/com/android/server/wifi/WifiStateMachine.java
+++ b/service/java/com/android/server/wifi/WifiStateMachine.java
@@ -8563,6 +8563,8 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiPno
if (config != null) {
// Disable autojoin
config.numNoInternetAccessReports += 1;
+ config.dirty = true;
+ mWifiConfigStore.writeKnownNetworkHistory(false);
}
}
return HANDLED;
@@ -8570,9 +8572,14 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiPno
if (message.arg1 == NetworkAgent.VALID_NETWORK) {
config = getCurrentWifiConfiguration();
if (config != null) {
+ if (!config.validatedInternetAccess
+ || config.numNoInternetAccessReports != 0) {
+ config.dirty = true;
+ }
// re-enable autojoin
config.numNoInternetAccessReports = 0;
config.validatedInternetAccess = true;
+ mWifiConfigStore.writeKnownNetworkHistory(false);
}
}
return HANDLED;