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
This commit is contained in:
Sunny Goyal
2018-05-24 17:11:16 -07:00
parent 87356e7b48
commit 9bb8ffb5e3
10 changed files with 179 additions and 62 deletions

View File

@@ -1450,6 +1450,10 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
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(),