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

Commit 02224b53 authored by Tracy Zhou's avatar Tracy Zhou Committed by Android (Google) Code Review
Browse files

Merge "Moving fail safe animation cancel to power key-up case."

parents 69a325f4 4f6999be
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -917,9 +917,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {

        mWindowManagerFuncs.onPowerKeyDown(interactive);

        // Abort possibly stuck animations.
        mHandler.post(mWindowManagerFuncs::triggerAnimationFailsafe);

        // Latch power key state to detect screenshot chord.
        if (interactive && !mScreenshotChordPowerKeyTriggered
                && (event.getFlags() & KeyEvent.FLAG_FALLBACK) == 0) {
@@ -1026,6 +1023,11 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        cancelPendingPowerKeyAction();

        if (!handled) {
            if ((event.getFlags() & KeyEvent.FLAG_LONG_PRESS) == 0) {
                // Abort possibly stuck animations only when power key up without long press case.
                mHandler.post(mWindowManagerFuncs::triggerAnimationFailsafe);
            }

            // Figure out how to handle the key now that it has been released.
            mPowerKeyPressCounter += 1;

@@ -3362,9 +3364,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
     */
    void launchHomeFromHotKey(int displayId, final boolean awakenFromDreams,
            final boolean respectKeyguard) {
        // Abort possibly stuck animations.
        mHandler.post(mWindowManagerFuncs::triggerAnimationFailsafe);

        if (respectKeyguard) {
            if (isKeyguardShowingAndNotOccluded()) {
                // don't launch home if keyguard showing