summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Will Leshner <wleshner@google.com> 2023-01-12 15:30:51 -0800
committer Will Leshner <wleshner@google.com> 2023-01-18 11:17:40 -0800
commitf37ffbacc096d97b051915d3547d963a443919d1 (patch)
treea578a1c958deaf76ef4e229df40bb03b633662f5
parent7be84b8a5623f4cb7cb430a74c0159545d56a08b (diff)
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
-rw-r--r--services/core/java/com/android/server/policy/PhoneWindowManager.java9
1 files changed, 1 insertions, 8 deletions
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index b7a801a8fc86..b018c41f0850 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -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");