Various quickscrub fixes
> Fixing PagedView resetting the currentPage, if scrollToPage was called before first layout
This causes quickscrub to jump back to the current task if launcher activity was dead.
> Fixing missing callbacks in DeferredTouchConsumer causing missed quick scrub flings
> Sending the resents animation callbacks on the motion queue thread, to avoid synchronization
issues with sysui callbacks.
> Waiting until the recents animation is received before starting the scale down animation
> Calculating the offset for quickscrub statically incase launcher activity was dead
Bug: 80214390
Change-Id: I1b7d00b7b266655a92fcd6239f25ba191655150f
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index 62b581f..de9cd98 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -1450,6 +1450,10 @@
protected boolean snapToPage(int whichPage, int delta, int duration, boolean immediate,
TimeInterpolator interpolator) {
+ if (mFirstLayout) {
+ setCurrentPage(whichPage);
+ return false;
+ }
if (FeatureFlags.IS_DOGFOOD_BUILD) {
duration *= Settings.System.getFloat(getContext().getContentResolver(),