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

Commit 8a100c13 authored by Arthur Hung's avatar Arthur Hung
Browse files

Turn off the screen if no security lock

The lock or sleep power button behavior will lock the screen when the
screen is not in keyguard. It should turn off the screen directly if
there is no lock screen set.

Bug: 220814624
Test: manual
Change-Id: I94f7e5dbc15d16ec9e453a9b945d7fadb23ca004
parent 751c5ffb
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1023,7 +1023,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                    break;
                }
                case SHORT_PRESS_POWER_LOCK_OR_SLEEP: {
                    if (keyguardOn()) {
                    if (mKeyguardDelegate == null || !mKeyguardDelegate.hasKeyguard()
                            || !mKeyguardDelegate.isSecure(mCurrentUserId) || keyguardOn()) {
                        sleepDefaultDisplayFromPowerButton(eventTime, 0);
                    } else {
                        lockNow(null /*options*/);