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

Commit f37ffbac authored by Will Leshner's avatar Will Leshner
Browse files

Do not go to dream on power button press when screen is off.

This is essentially a revert of a previous change to start dreaming on
power button press when the device is docked and the screen is off. We
now just use the existing (default) behavior of turning on the device to
the lockscreen.

Bug: 265349281
Test: manually by docking device, turning the screen off, and then
tapping the power button to turn the screen back on. The device should
show the lockscreen and not attempt to start dreaming immediately.

Change-Id: I25bb8bc5b720fd6cc1b1ac9219c8c94eecf8232a
parent 7be84b8a
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -988,14 +988,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            powerMultiPressAction(eventTime, interactive, mTriplePressOnPowerBehavior);
        } else if (count > 3 && count <= getMaxMultiPressPowerCount()) {
            Slog.d(TAG, "No behavior defined for power press count " + count);
        } else if (count == 1 && interactive) {
            if (beganFromNonInteractive) {
                // The "screen is off" case, where we might want to start dreaming on power button
                // press.
                attemptToDreamFromShortPowerButtonPress(false, () -> {});
                return;
            }

        } else if (count == 1 && interactive && !beganFromNonInteractive) {
            if (mSideFpsEventHandler.shouldConsumeSinglePress(eventTime)) {
                Slog.i(TAG, "Suppressing power key because the user is interacting with the "
                        + "fingerprint sensor");