Jump to the nearest page to launch when swiping down on shelf

Bug: 78240090
Change-Id: I1e26f66242fa3b45a4b6241721f0ff0465770aaf
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitOverviewStateTouchHelper.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitOverviewStateTouchHelper.java
index 5337c39..20a2487 100644
--- a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitOverviewStateTouchHelper.java
+++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitOverviewStateTouchHelper.java
@@ -75,7 +75,8 @@
      * @return the animation
      */
     PendingAnimation createSwipeDownToTaskAppAnimation(long duration) {
-        TaskView taskView = mRecentsView.getTaskViewAt(mRecentsView.getNextPage());
+        mRecentsView.setCurrentPage(mRecentsView.getPageNearestToCenterOfScreen());
+        TaskView taskView = mRecentsView.getTaskViewAt(mRecentsView.getCurrentPage());
         if (taskView == null) {
             throw new IllegalStateException("There is no task view to animate to.");
         }