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

Commit 60d48280 authored by Pawit Pornkitprasan's avatar Pawit Pornkitprasan
Browse files

WifiService: Fix wifi re-enabling after user exits airplane mode

This fixes a bug where if the user enable and disable wifi in airplane
mode, wifi will re-enable itself after the user exits airplane mode
(even though wifi wasn't enabled before airplane mode was enabled)

Change-Id: I4b501139b660255fc935d6a12fd6ecf44d06ec6e
parent f091f607
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -488,7 +488,8 @@ public class WifiService extends IWifiManager.Stub {
                mWifiState.set(WIFI_ENABLED);
            }
        } else {
            if (airplane) {
            if (airplane && mWifiState.get() != WIFI_ENABLED_AIRPLANE_OVERRIDE) {
                // In this state, Wi-Fi will be re-enabled after airplane mode is off
                mWifiState.set(WIFI_DISABLED_AIRPLANE_ON);
            } else {
                mWifiState.set(WIFI_DISABLED);