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
@@ -250,12 +250,12 @@ public class TaskView extends FrameLayout implements TaskCallbacks, PageCallback
setPivotY(mSnapshotView.getTop() + mSnapshotView.getHeight() * 0.5f);
}
public float getCurveScaleForInterpolation(float linearInterpolation) {
public static float getCurveScaleForInterpolation(float linearInterpolation) {
float curveInterpolation = CURVE_INTERPOLATOR.getInterpolation(linearInterpolation);
return getCurveScaleForCurveInterpolation(curveInterpolation);
}
private float getCurveScaleForCurveInterpolation(float curveInterpolation) {
private static float getCurveScaleForCurveInterpolation(float curveInterpolation) {
return 1 - curveInterpolation * EDGE_SCALE_DOWN_FACTOR;
}