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

Commit 4a63515b authored by LuK1337's avatar LuK1337 Committed by Bruno Martins
Browse files

ProfilesTile: Enable authentication for handleClick()

* This disallows enabling profile on secure lockscreen which
  could allow enabling last profile that could potentially
  have a disabled lockscreen.
* Fixes : https://gitlab.com/LineageOS/issues/android/issues/965

Change-Id: Ic9a845f1b6e4a408134c4a9ad31810d88375a99b
parent 8c169086
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -96,6 +96,12 @@ public class ProfilesTile extends QSTileImpl<State> {

    @Override
    protected void handleClick() {
        if (mKeyguardMonitor.isSecure() && mKeyguardMonitor.isShowing()) {
            mActivityStarter.postQSRunnableDismissingKeyguard(() -> {
                setProfilesEnabled(!profilesEnabled());
            });
            return;
        }
        setProfilesEnabled(!profilesEnabled());
    }