Fix duration when scrolling back to launch LAST_TASK

Bug: 111926330
Change-Id: Ief8b5eb3dc2c50a1a06ea9e3adbf89f6c1cf157b
diff --git a/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java b/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
index f9495a4..6564950 100644
--- a/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
+++ b/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
@@ -1001,8 +1001,9 @@
             if (SWIPE_HOME.get()) {
                 setShelfState(ShelfAnimState.OVERVIEW, interpolator, duration);
             }
-        } else if (endTarget == NEW_TASK) {
-            // Let RecentsView handle the scrolling to the task, which we launch in startNewTask().
+        } else if (endTarget == NEW_TASK || endTarget == LAST_TASK) {
+            // Let RecentsView handle the scrolling to the task, which we launch in startNewTask()
+            // or resumeLastTaskForQuickstep().
             if (mRecentsView != null) {
                 duration = Math.max(duration, mRecentsView.getScroller().getDuration());
             }