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

Commit 15af2125 authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

Don't mark wifi disabled unless it's off.

The transition from driver-started to scan-only state was incorrectly
always marking wifi disabled, but transitioning back only marked it
enabled if we were exiting due to leaving the scan-only-with-wifi-off
mode.

bug:11062188
Change-Id: I44fe64fd8dac8f36f4e22cb1c16b9d7a06bdbac0
parent b3a69c5d
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2957,8 +2957,10 @@ public class WifiStateMachine extends StateMachine {

            if (mOperationalMode != CONNECT_MODE) {
                mWifiNative.disconnect();
                if (mOperationalMode == SCAN_ONLY_WITH_WIFI_OFF_MODE) {
                    mWifiConfigStore.disableAllNetworks();
                    setWifiState(WIFI_STATE_DISABLED);
                }
                transitionTo(mScanModeState);
            } else {
                /* Driver stop may have disabled networks, enable right after start */