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

Commit b3bdf658 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Ignore power presses from lift and biometric wake" into tm-qpr-dev am:...

Merge "Ignore power presses from lift and biometric wake" into tm-qpr-dev am: c956023f am: 160d1747

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20886542



Change-Id: I6579925211c1d249bdcec5914994b301adbcb6a1
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents e201acea 160d1747
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -162,6 +162,9 @@ public interface WindowManagerPolicyConstants {
            case PowerManager.WAKE_REASON_POWER_BUTTON:
            case PowerManager.WAKE_REASON_POWER_BUTTON:
            case PowerManager.WAKE_REASON_PLUGGED_IN:
            case PowerManager.WAKE_REASON_PLUGGED_IN:
            case PowerManager.WAKE_REASON_GESTURE:
            case PowerManager.WAKE_REASON_GESTURE:
            case PowerManager.WAKE_REASON_TAP:
            case PowerManager.WAKE_REASON_LIFT:
            case PowerManager.WAKE_REASON_BIOMETRIC:
            case PowerManager.WAKE_REASON_CAMERA_LAUNCH:
            case PowerManager.WAKE_REASON_CAMERA_LAUNCH:
            case PowerManager.WAKE_REASON_WAKE_KEY:
            case PowerManager.WAKE_REASON_WAKE_KEY:
            case PowerManager.WAKE_REASON_WAKE_MOTION:
            case PowerManager.WAKE_REASON_WAKE_MOTION:
+3 −4
Original line number Original line Diff line number Diff line
@@ -1095,10 +1095,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        // a tendency to hit the power button immediately when they pick up their device, and we
        // a tendency to hit the power button immediately when they pick up their device, and we
        // don't want to put the device back to sleep in those cases.
        // don't want to put the device back to sleep in those cases.
        final PowerManager.WakeData lastWakeUp = mPowerManagerInternal.getLastWakeup();
        final PowerManager.WakeData lastWakeUp = mPowerManagerInternal.getLastWakeup();
        if (lastWakeUp != null && lastWakeUp.wakeReason == PowerManager.WAKE_REASON_GESTURE) {
        if (lastWakeUp != null && (lastWakeUp.wakeReason == PowerManager.WAKE_REASON_GESTURE
            final int gestureDelayMillis = Settings.Global.getInt(mContext.getContentResolver(),
                || lastWakeUp.wakeReason == PowerManager.WAKE_REASON_LIFT
                    Settings.Global.POWER_BUTTON_SUPPRESSION_DELAY_AFTER_GESTURE_WAKE,
                || lastWakeUp.wakeReason == PowerManager.WAKE_REASON_BIOMETRIC)) {
                    POWER_BUTTON_SUPPRESSION_DELAY_DEFAULT_MILLIS);
            final long now = SystemClock.uptimeMillis();
            final long now = SystemClock.uptimeMillis();
            if (mPowerButtonSuppressionDelayMillis > 0
            if (mPowerButtonSuppressionDelayMillis > 0
                    && (now < lastWakeUp.wakeTime + mPowerButtonSuppressionDelayMillis)) {
                    && (now < lastWakeUp.wakeTime + mPowerButtonSuppressionDelayMillis)) {