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

Commit df3ea99f authored by William Leshner's avatar William Leshner Committed by Android (Google) Code Review
Browse files

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

parents a2acce86 f37ffbac
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -991,14 +991,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");