diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
index 4ac816f..d16ed5e 100644
--- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
+++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
@@ -1052,15 +1052,16 @@
     }
 
     private GestureEndTarget calculateEndTargetForFlingY(PointF velocity, float endVelocity) {
-        final boolean isScrollingToNewTask = isScrollingToNewTask();
+        // If swiping at a diagonal, base end target on the faster velocity direction.
+        final boolean willGoToNewTask =
+                isScrollingToNewTask() && Math.abs(velocity.x) > Math.abs(endVelocity);
         final boolean isSwipeUp = endVelocity < 0;
         if (!isSwipeUp) {
-            return isScrollingToNewTask ? NEW_TASK : LAST_TASK;
+            final boolean isCenteredOnNewTask =
+                    mRecentsView.getDestinationPage() != mRecentsView.getRunningTaskIndex();
+            return willGoToNewTask || isCenteredOnNewTask ? NEW_TASK : LAST_TASK;
         }
 
-        // If swiping upward at a diagonal, base end target on the faster velocity direction.
-        boolean willGoToNewTask =
-                isScrollingToNewTask && Math.abs(velocity.x) > Math.abs(endVelocity);
         if (!mDeviceState.isFullyGesturalNavMode()) {
             return (!hasReachedOverviewThreshold() && willGoToNewTask) ? NEW_TASK : RECENTS;
         }
@@ -1187,6 +1188,9 @@
                     duration = Math.max(duration, mRecentsView.getScroller().getDuration());
                 }
             }
+        } else if (endTarget == LAST_TASK && mRecentsView != null
+                && mRecentsView.getNextPage() != mRecentsView.getRunningTaskIndex()) {
+            mRecentsView.snapToPage(mRecentsView.getRunningTaskIndex(), Math.toIntExact(duration));
         }
 
         // Let RecentsView handle the scrolling to the task, which we launch in startNewTask()
