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

Commit 7841f2e4 authored by Brian Isganitis's avatar Brian Isganitis Committed by Automerger Merge Worker
Browse files

Merge "Ignore swipe velocity if next task is considered the destination." into...

Merge "Ignore swipe velocity if next task is considered the destination." into tm-dev am: de0c8c7c

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18299230



Change-Id: I74ec8db56a6f36bac980e25b04b1cff6218a3f4e
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 383ac783 de0c8c7c
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1065,10 +1065,11 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
                                : LAST_TASK;
            }
        } else {
            // If swiping at a diagonal, base end target on the faster velocity.
            // If swiping at a diagonal on the current task, base end target on the faster velocity.
            boolean isSwipeUp = endVelocity < 0;
            boolean willGoToNewTask =
                    canGoToNewTask && Math.abs(velocity.x) > Math.abs(endVelocity);
            boolean willGoToNewTask = canGoToNewTask && (
                    mRecentsView.getDestinationPage() != mRecentsView.getCurrentPage()
                            || Math.abs(velocity.x) > Math.abs(endVelocity));

            if (mDeviceState.isFullyGesturalNavMode() && isSwipeUp) {
                endTarget = willGoToNewTask ? NEW_TASK : HOME;