summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorTony <twickham@google.com>2018-11-16 16:42:07 -0600
committerTony <twickham@google.com>2018-11-29 11:35:16 -0800
commit6cfb0edb41f155acf49667ce954a017616d07526 (patch)
tree3847108420afd8b2345d637c9cf475f438ea5a0f /src/com
parent6478d4f41bb5055116b97b55ba7ce08bd18fcd97 (diff)
downloadandroid_packages_apps_Trebuchet-6cfb0edb41f155acf49667ce954a017616d07526.tar.gz
android_packages_apps_Trebuchet-6cfb0edb41f155acf49667ce954a017616d07526.tar.bz2
android_packages_apps_Trebuchet-6cfb0edb41f155acf49667ce954a017616d07526.zip
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
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/launcher3/anim/AnimatorPlaybackController.java4
-rw-r--r--src/com/android/launcher3/touch/AbstractStateChangeTouchController.java3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/launcher3/anim/AnimatorPlaybackController.java b/src/com/android/launcher3/anim/AnimatorPlaybackController.java
index 164728ae6..819c8439b 100644
--- a/src/com/android/launcher3/anim/AnimatorPlaybackController.java
+++ b/src/com/android/launcher3/anim/AnimatorPlaybackController.java
@@ -154,6 +154,10 @@ public abstract class AnimatorPlaybackController implements ValueAnimator.Animat
return mCurrentFraction;
}
+ public float getInterpolatedProgress() {
+ return getInterpolator().getInterpolation(mCurrentFraction);
+ }
+
/**
* Sets the action to be called when the animation is completed. Also clears any
* previously set action.
diff --git a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
index ce1cc89dd..a7bd243a6 100644
--- a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
+++ b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
@@ -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