Maintain TaskView's scroll invariant when swiping down
Fixes: 186881810
Test: Swipe down from task other than running task, snaps in proper position in fullscreen
Change-Id: If1a667246804ebff8432b295a0bb22d17feb5c31
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 53f880f..5c65542 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -1636,8 +1636,7 @@
if (endTarget == GestureState.GestureEndTarget.NEW_TASK
|| endTarget == GestureState.GestureEndTarget.LAST_TASK) {
// When switching to tasks in quick switch, ensures the snapped page's scroll maintain
- // invariant between quick switch and overview grid, to ensure a smooth animation
- // transition.
+ // invariant between quick switch and overview, to ensure a smooth animation transition.
updateGridProperties();
}
}
@@ -3036,6 +3035,11 @@
return new PendingAnimation(duration);
}
+ // When swiping down from overview to tasks, ensures the snapped page's scroll maintain
+ // invariant between quick switch and overview, to ensure a smooth animation transition.
+ updateGridProperties();
+ updateScrollSynchronously();
+
int targetSysUiFlags = tv.getThumbnail().getSysUiStatusNavFlags();
final boolean[] passedOverviewThreshold = new boolean[] {false};
ValueAnimator progressAnim = ValueAnimator.ofFloat(0, 1);