File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
wifi/java/android/net/wifi Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -345,13 +345,6 @@ public static WifiWatchdogStateMachine makeWifiWatchdogStateMachine(Context cont
345345 // watchdog in an enabled state
346346 putSettingsGlobalBoolean (contentResolver , Settings .Global .WIFI_WATCHDOG_ON , true );
347347
348- // disable poor network avoidance
349- if (sWifiOnly ) {
350- logd ("Disabling poor network avoidance for wi-fi only device" );
351- putSettingsGlobalBoolean (contentResolver ,
352- Settings .Global .WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED , false );
353- }
354-
355348 WifiWatchdogStateMachine wwsm = new WifiWatchdogStateMachine (context );
356349 wwsm .start ();
357350 return wwsm ;
@@ -441,8 +434,14 @@ private boolean isWatchdogEnabled() {
441434 private void updateSettings () {
442435 if (DBG ) logd ("Updating secure settings" );
443436
444- mPoorNetworkDetectionEnabled = getSettingsGlobalBoolean (mContentResolver ,
445- Settings .Global .WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED , true );
437+ // disable poor network avoidance
438+ if (sWifiOnly ) {
439+ logd ("Disabling poor network avoidance for wi-fi only device" );
440+ mPoorNetworkDetectionEnabled = false ;
441+ } else {
442+ mPoorNetworkDetectionEnabled = getSettingsGlobalBoolean (mContentResolver ,
443+ Settings .Global .WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED , false );
444+ }
446445 }
447446
448447 /**
You can’t perform that action at this time.
0 commit comments