summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2012-10-09 15:49:33 -0700
committerIrfan Sheriff <isheriff@google.com>2012-10-09 15:49:33 -0700
commitbbe461b78f9697775281d986bcf3c00904e1e62c (patch)
tree5ee44d13f2f961aa8f606762988d4b5f74bd5910 /wifi
parent462ff630e441f5bc36c4b926ce81bdb35fe7d04b (diff)
downloadframeworks_base-bbe461b78f9697775281d986bcf3c00904e1e62c.zip
frameworks_base-bbe461b78f9697775281d986bcf3c00904e1e62c.tar.gz
frameworks_base-bbe461b78f9697775281d986bcf3c00904e1e62c.tar.bz2
Disable poor network avoidance by default
Bug: 7318044 Change-Id: Icf27e823453eeaba901aad6f3f8eedea242794f9
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/WifiWatchdogStateMachine.java17
1 files changed, 8 insertions, 9 deletions
diff --git a/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java b/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java
index 4440145..97a3b33 100644
--- a/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java
+++ b/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java
@@ -345,13 +345,6 @@ public class WifiWatchdogStateMachine extends StateMachine {
// watchdog in an enabled state
putSettingsGlobalBoolean(contentResolver, Settings.Global.WIFI_WATCHDOG_ON, true);
- // disable poor network avoidance
- if (sWifiOnly) {
- logd("Disabling poor network avoidance for wi-fi only device");
- putSettingsGlobalBoolean(contentResolver,
- Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED, false);
- }
-
WifiWatchdogStateMachine wwsm = new WifiWatchdogStateMachine(context);
wwsm.start();
return wwsm;
@@ -441,8 +434,14 @@ public class WifiWatchdogStateMachine extends StateMachine {
private void updateSettings() {
if (DBG) logd("Updating secure settings");
- mPoorNetworkDetectionEnabled = getSettingsGlobalBoolean(mContentResolver,
- Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED, true);
+ // disable poor network avoidance
+ if (sWifiOnly) {
+ logd("Disabling poor network avoidance for wi-fi only device");
+ mPoorNetworkDetectionEnabled = false;
+ } else {
+ mPoorNetworkDetectionEnabled = getSettingsGlobalBoolean(mContentResolver,
+ Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED, false);
+ }
}
/**