summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2012-05-31 11:35:31 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-05-31 11:35:31 -0700
commit39150720c0dc572251ac12fcc0ff36d3d8cb1abb (patch)
tree7ea9623115eedc0dc3d62701549558e94141795d /wifi
parent5d6c1e3dbf1c71fe6974fda2b779c4aebc37917c (diff)
parent39b79e79d3ad9e98a9c76c1b104599be494213f6 (diff)
downloadframeworks_base-39150720c0dc572251ac12fcc0ff36d3d8cb1abb.zip
frameworks_base-39150720c0dc572251ac12fcc0ff36d3d8cb1abb.tar.gz
frameworks_base-39150720c0dc572251ac12fcc0ff36d3d8cb1abb.tar.bz2
am 39b79e79: am ce9b5c76: Merge "Fix walled garden detection on nakasi" into jb-dev
* commit '39b79e79d3ad9e98a9c76c1b104599be494213f6': Fix walled garden detection on nakasi
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/WifiWatchdogStateMachine.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java b/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java
index 5220d04..1a42f93 100644
--- a/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java
+++ b/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java
@@ -263,12 +263,19 @@ public class WifiWatchdogStateMachine extends StateMachine {
Context.CONNECTIVITY_SERVICE);
sWifiOnly = (cm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE) == false);
- // Disable for wifi only devices.
- if (Settings.Secure.getString(contentResolver, Settings.Secure.WIFI_WATCHDOG_ON) == null
- && sWifiOnly) {
- log("Disabling watchog for wi-fi only device");
- putSettingsBoolean(contentResolver, Settings.Secure.WIFI_WATCHDOG_ON, false);
+ // Watchdog is always enabled. Poor network detection & walled garden detection
+ // can individually be turned on/off
+ // TODO: Remove this setting & clean up state machine since we always have
+ // watchdog in an enabled state
+ putSettingsBoolean(contentResolver, Settings.Secure.WIFI_WATCHDOG_ON, true);
+
+ // Disable poor network avoidance, but keep watchdog active for walled garden detection
+ if (sWifiOnly) {
+ log("Disabling poor network avoidance for wi-fi only device");
+ putSettingsBoolean(contentResolver,
+ Settings.Secure.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED, false);
}
+
WifiWatchdogStateMachine wwsm = new WifiWatchdogStateMachine(context);
wwsm.start();
return wwsm;