From 5064be12dba260f9f684bfb04dbd049fa11bf49c Mon Sep 17 00:00:00 2001 From: Brian Isganitis Date: Thu, 12 May 2022 23:39:13 +0000 Subject: [PATCH] Revert "Ignore swipe velocity if next task is considered the destination." This reverts commit bde366ddd1d21aabd68c8bc5de0c0769750625d2. Reason for revert: b/232441427 Change-Id: I1047435fe39900203b69fdfc87d256b1330a325a --- quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index dc2b61b4dc..f60b2253e4 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -1065,11 +1065,10 @@ public abstract class AbsSwipeUpHandler, : LAST_TASK; } } else { - // If swiping at a diagonal on the current task, base end target on the faster velocity. + // If swiping at a diagonal, base end target on the faster velocity. boolean isSwipeUp = endVelocity < 0; - boolean willGoToNewTask = canGoToNewTask && ( - mRecentsView.getDestinationPage() != mRecentsView.getCurrentPage() - || Math.abs(velocity.x) > Math.abs(endVelocity)); + boolean willGoToNewTask = + canGoToNewTask && Math.abs(velocity.x) > Math.abs(endVelocity); if (mDeviceState.isFullyGesturalNavMode() && isSwipeUp) { endTarget = willGoToNewTask ? NEW_TASK : HOME;