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

Commit 4f6999be authored by lumark's avatar lumark Committed by Ming-Shin Lu
Browse files

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

CLs [1] introduces new recents animation cancelling mechanism with screenshot
previous task during task stack order change for supporting Quickstep LiveTile.

We don't want the normal animation canceling flow be disturbed by fail safe
animation canceling that makes the task bring to top unexpectedly.

Remove trigger flow when home key down & moving fail safe animation cancel
that only called when power key up without long pressing case.

[1]: I83504d578a17856623a53c04a7d3c54e5bcab5f4

Bug: 122593881
Test: manual, enabled LiveTile in Launcher dev options, swipe up to recents,
verify the task will bring to top only when power key-up.

Change-Id: I09e5daa293efcdaf46a4e3d11729898e1f5efde2
parent afe043d6
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