Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79dc154a authored by Irfan Sheriff's avatar Irfan Sheriff Committed by Android (Google) Code Review
Browse files

Merge "Disable poor network avoidance by default" into jb-mr1-dev

parents b30a8568 bbe461b7
Loading
Loading
Loading
Loading
+8 −9
Original line number Diff line number Diff line
@@ -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");

        // 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, true);
                    Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED, false);
        }
    }

    /**