commit | b6adb66e0fe9af895eb78a021097bfa6f1b10977 | [log] [tgz] |
---|---|---|
author | Brian Isganitis <brianji@google.com> | Thu May 12 19:46:57 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu May 12 19:46:57 2022 +0000 |
tree | a0ada9c47f8bdf7c94f934ae1efcee506ef4c22b | |
parent | 9adec6c9e06ecfbcf873deb4c171f84eb4b278e8 [diff] | |
parent | de0c8c7c1bc98a002426fc520dc0fa4b69d9b528 [diff] |
Merge "Ignore swipe velocity if next task is considered the destination." into tm-dev am: de0c8c7c1b Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18299230 Change-Id: Idff81339aebafa52343fda7c61670c9028fd0068 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index f60b225..dc2b61b 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
@@ -1065,10 +1065,11 @@ : 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;