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

Commit a99f461b authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

Don't require WAKE_LOCK permission to enable wifi

The process for starting wifi was using a wakelock around a message-pass and this was causing
an exception for meer mortals (who don't have WAKE_LOCK permission).

bug: 1750535
parent 9a24bc56
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -295,7 +295,11 @@ public class WifiService extends IWifiManager.Stub {
        if (mWifiHandler == null) return false;

        synchronized (mWifiHandler) {
            // caller may not have WAKE_LOCK permission - it's not required here
            long ident = Binder.clearCallingIdentity();
            sWakeLock.acquire();
            Binder.restoreCallingIdentity(ident);

            mLastEnableUid = Binder.getCallingUid();
            // set a flag if the user is enabling Wifi while in airplane mode
            mAirplaneModeOverwridden = (enable && isAirplaneModeOn() && isAirplaneToggleable());