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

Commit f3dac0ef authored by Sunny Goyal's avatar Sunny Goyal Committed by android-build-merger
Browse files

Always go to home in case of fling-up

am: a2cfc2d9

Change-Id: I560fd690882998a9b503d5c30eda7f9397db138e
parents c1a2764a a2cfc2d9
Loading
Loading
Loading
Loading
+12 −11
Original line number Original line Diff line number Diff line
@@ -736,18 +736,19 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity>
                                : LAST_TASK;
                                : LAST_TASK;
            }
            }
        } else {
        } else {
            if (mMode == Mode.NO_BUTTON && endVelocity < 0 && !mIsShelfPeeking) {
            // If swiping at a diagonal, base end target on the faster velocity.
            // If swiping at a diagonal, base end target on the faster velocity.
                endTarget = goingToNewTask && Math.abs(velocity.x) > Math.abs(endVelocity)
            boolean isSwipeUp = endVelocity < 0;
                        ? NEW_TASK : HOME;
            boolean willGoToNewTaskOnSwipeUp =
            } else if (endVelocity < 0) {
                    goingToNewTask && Math.abs(velocity.x) > Math.abs(endVelocity);
                if (reachedOverviewThreshold) {

                    endTarget = RECENTS;
            if (mMode == Mode.NO_BUTTON && isSwipeUp && !willGoToNewTaskOnSwipeUp) {
                } else {
                endTarget = HOME;
            } else if (mMode == Mode.NO_BUTTON && isSwipeUp && !mIsShelfPeeking) {
                // If swiping at a diagonal, base end target on the faster velocity.
                // If swiping at a diagonal, base end target on the faster velocity.
                    endTarget = goingToNewTask && Math.abs(velocity.x) > Math.abs(endVelocity)
                endTarget = NEW_TASK;
            } else if (isSwipeUp) {
                endTarget = !reachedOverviewThreshold && willGoToNewTaskOnSwipeUp
                        ? NEW_TASK : RECENTS;
                        ? NEW_TASK : RECENTS;
                }
            } else {
            } else {
                endTarget = goingToNewTask ? NEW_TASK : LAST_TASK;
                endTarget = goingToNewTask ? NEW_TASK : LAST_TASK;
            }
            }