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

Commit fcad20ba authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Fixing recents animation not getting completed sometimes when using 3P launcher

Bug: 158855992
Change-Id: I2c0cb74edfea5406e79aa99d6604183e63c1f0f1
(cherry picked from commit 05179b66)
parent 84dc3a45
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -131,7 +131,7 @@ public abstract class BaseSwipeUpHandlerV2<T extends StatefulActivity<?>, Q exte

    private static final int STATE_CAPTURE_SCREENSHOT =
            getFlagForIndex(10, "STATE_CAPTURE_SCREENSHOT");
    private static final int STATE_SCREENSHOT_CAPTURED =
    protected static final int STATE_SCREENSHOT_CAPTURED =
            getFlagForIndex(11, "STATE_SCREENSHOT_CAPTURED");
    private static final int STATE_SCREENSHOT_VIEW_SHOWN =
            getFlagForIndex(12, "STATE_SCREENSHOT_VIEW_SHOWN");
@@ -1192,7 +1192,7 @@ public abstract class BaseSwipeUpHandlerV2<T extends StatefulActivity<?>, Q exte
        mActivity.clearForceInvisibleFlag(INVISIBLE_BY_STATE_HANDLER);
    }

    private void switchToScreenshot() {
    protected void switchToScreenshot() {
        final int runningTaskId = mGestureState.getRunningTaskId();
        if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
            if (mRecentsAnimationController != null) {
+10 −0
Original line number Diff line number Diff line
@@ -110,6 +110,16 @@ public class FallbackSwipeHandler extends
                false /* toRecents */, callback, true /* sendUserLeaveHint */);
    }

    @Override
    protected void switchToScreenshot() {
        if (mRunningOverHome) {
            // When the current task is home, then we don't need to capture anything
            mStateCallback.setStateOnUiThread(STATE_SCREENSHOT_CAPTURED);
        } else {
            super.switchToScreenshot();
        }
    }

    @Override
    protected void notifyGestureAnimationStartToRecents() {
        if (mRunningOverHome) {