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

Commit a0a9ef79 authored by Veeti Paananen's avatar Veeti Paananen Committed by Dan Pasanen
Browse files

Show advanced reboot if using an insecure lock screen

Enables the advanced reboot menu when locked if the selected lock method
is insecure (= slide unlock).

Change-Id: I759b7b31c5411597e2537a85183d73ec02eb2461
parent 4af68cdf
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -156,7 +156,7 @@ public final class ShutdownThread extends Thread {
                // See if the advanced reboot menu is enabled (only if primary user) and check the keyguard state
                // See if the advanced reboot menu is enabled (only if primary user) and check the keyguard state
                boolean advancedReboot = isPrimary ? advancedRebootEnabled(context) : false;
                boolean advancedReboot = isPrimary ? advancedRebootEnabled(context) : false;
                KeyguardManager km = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
                KeyguardManager km = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
                boolean locked = km.inKeyguardRestrictedInputMode();
                boolean locked = km.inKeyguardRestrictedInputMode() && km.isKeyguardSecure();


                if (advancedReboot && !locked) {
                if (advancedReboot && !locked) {
                    // Include options in power menu for rebooting into recovery or bootloader
                    // Include options in power menu for rebooting into recovery or bootloader