Fix end state when animating launcher after swipe up from an app

Previously we were comparing the controller's progress at the time of
the end of the animation... which is always 1. Instead, we should be
comparing the effective final progress based on the interpolator.

Change-Id: I18110b5a3b914839860931187f39cfa11182b3e2
This commit is contained in:
Tony
2018-11-16 16:42:07 -06:00
parent 6478d4f41b
commit 6cfb0edb41
5 changed files with 15 additions and 7 deletions

View File

@@ -372,8 +372,7 @@ public abstract class AbstractStateChangeTouchController
final LauncherState targetState;
final float progress = mCurrentAnimation.getProgressFraction();
final float interpolatedProgress = mCurrentAnimation.getInterpolator()
.getInterpolation(progress);
final float interpolatedProgress = mCurrentAnimation.getInterpolatedProgress();
if (fling) {
targetState =
Float.compare(Math.signum(velocity), Math.signum(mProgressMultiplier)) == 0