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

Commit bbe461b7 authored by Irfan Sheriff's avatar Irfan Sheriff
Browse files

Disable poor network avoidance by default

Bug: 7318044
Change-Id: Icf27e823453eeaba901aad6f3f8eedea242794f9
parent 462ff630
Loading
Loading
Loading
Loading
+8 −9
Original line number Original line Diff line number Diff line
@@ -345,13 +345,6 @@ public class WifiWatchdogStateMachine extends StateMachine {
        // watchdog in an enabled state
        // watchdog in an enabled state
        putSettingsGlobalBoolean(contentResolver, Settings.Global.WIFI_WATCHDOG_ON, true);
        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);
        WifiWatchdogStateMachine wwsm = new WifiWatchdogStateMachine(context);
        wwsm.start();
        wwsm.start();
        return wwsm;
        return wwsm;
@@ -441,8 +434,14 @@ public class WifiWatchdogStateMachine extends StateMachine {
    private void updateSettings() {
    private void updateSettings() {
        if (DBG) logd("Updating secure settings");
        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,
            mPoorNetworkDetectionEnabled = getSettingsGlobalBoolean(mContentResolver,
                Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED, true);
                    Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED, false);
        }
    }
    }


    /**
    /**