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

Commit 6f1bc72f authored by Sunny Goyal's avatar Sunny Goyal Committed by Android (Google) Code Review
Browse files

Merge "Fixing animation cancelled not called if gesture was not initiated" into ub-launcher3-master

parents 986ea0da 0112a3d4
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<?>, Q extends
        RecentsAnimationCallbacks.RecentsAnimationListener {
    private static final String TAG = "AbsSwipeUpHandler";

    private static final String[] STATE_NAMES = DEBUG_STATES ? new String[16] : null;
    private static final String[] STATE_NAMES = DEBUG_STATES ? new String[17] : null;

    protected final BaseActivityInterface<?, T> mActivityInterface;
    protected final InputConsumerProxy mInputConsumerProxy;
@@ -185,6 +185,8 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<?>, Q extends
            getFlagForIndex(14, "STATE_START_NEW_TASK");
    private static final int STATE_CURRENT_TASK_FINISHED =
            getFlagForIndex(15, "STATE_CURRENT_TASK_FINISHED");
    private static final int STATE_FINISH_WITH_NO_END =
            getFlagForIndex(16, "STATE_FINISH_WITH_NO_END");

    private static final int LAUNCHER_UI_STATES =
            STATE_LAUNCHER_PRESENT | STATE_LAUNCHER_DRAWN | STATE_LAUNCHER_STARTED;
@@ -306,6 +308,8 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<?>, Q extends
                this::invalidateHandlerWithLauncher);
        mStateCallback.runOnceAtState(STATE_HANDLER_INVALIDATED | STATE_RESUME_LAST_TASK,
                this::notifyTransitionCancelled);
        mStateCallback.runOnceAtState(STATE_HANDLER_INVALIDATED | STATE_FINISH_WITH_NO_END,
                this::notifyTransitionCancelled);

        if (!ENABLE_QUICKSTEP_LIVE_TILE.get()) {
            mStateCallback.addChangeListener(STATE_APP_CONTROLLER_RECEIVED | STATE_LAUNCHER_PRESENT
@@ -1257,6 +1261,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<?>, Q extends
        if (mGestureState.getEndTarget() != null && !mGestureState.isRunningAnimationToLauncher()) {
            cancelCurrentAnimation();
        } else {
            mStateCallback.setStateOnUiThread(STATE_FINISH_WITH_NO_END);
            reset();
        }
    }