diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java index f27bedb8d4..65363501d5 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java @@ -1898,7 +1898,7 @@ public abstract class RecentsView extends PagedView impl anim.play(depthAnimator); } anim.play(progressAnim); - anim.setDuration(duration).setInterpolator(interpolator); + anim.setInterpolator(interpolator); mPendingAnimation = new PendingAnimation(duration); mPendingAnimation.add(anim); diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 32685b0553..f6c392b536 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -1342,7 +1342,6 @@ public class Workspace extends PagedView ValueAnimator stepAnimator = ValueAnimator.ofFloat(0, 1); stepAnimator.addUpdateListener(listener); - stepAnimator.setDuration(config.duration); stepAnimator.addListener(listener); animation.add(stepAnimator); } diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java index 99ed0ad52b..82603369ec 100644 --- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java +++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java @@ -189,7 +189,6 @@ public class AllAppsTransitionController implements StateHandler, : FAST_OUT_SLOW_IN; Animator anim = createSpringAnimation(mProgress, targetProgress); - anim.setDuration(config.duration); anim.setInterpolator(config.getInterpolator(ANIM_VERTICAL_PROGRESS, interpolator)); anim.addListener(getProgressAnimatorListener()); builder.add(anim); diff --git a/src/com/android/launcher3/anim/PendingAnimation.java b/src/com/android/launcher3/anim/PendingAnimation.java index afeb341646..4195933f5c 100644 --- a/src/com/android/launcher3/anim/PendingAnimation.java +++ b/src/com/android/launcher3/anim/PendingAnimation.java @@ -69,7 +69,7 @@ public class PendingAnimation implements PropertySetter { } public void add(Animator a, SpringProperty springProperty) { - mAnim.play(a); + mAnim.play(a.setDuration(mDuration)); addAnimationHoldersRecur(a, mDuration, springProperty, mAnimHolders); } @@ -87,7 +87,7 @@ public class PendingAnimation implements PropertySetter { } ObjectAnimator anim = ObjectAnimator.ofFloat(view, View.ALPHA, alpha); anim.addListener(new AlphaUpdateListener(view)); - anim.setDuration(mDuration).setInterpolator(interpolator); + anim.setInterpolator(interpolator); add(anim); } @@ -105,7 +105,7 @@ public class PendingAnimation implements PropertySetter { public void addFloat(T target, FloatProperty property, float from, float to, TimeInterpolator interpolator) { Animator anim = ObjectAnimator.ofFloat(target, property, from, to); - anim.setDuration(mDuration).setInterpolator(interpolator); + anim.setInterpolator(interpolator); add(anim); } @@ -116,7 +116,7 @@ public class PendingAnimation implements PropertySetter { return; } Animator anim = ObjectAnimator.ofInt(target, property, value); - anim.setDuration(mDuration).setInterpolator(interpolator); + anim.setInterpolator(interpolator); add(anim); } @@ -125,7 +125,7 @@ public class PendingAnimation implements PropertySetter { */ public void addOnFrameCallback(Runnable runnable) { if (mProgressAnimator == null) { - mProgressAnimator = ValueAnimator.ofFloat(0, 1).setDuration(mDuration); + mProgressAnimator = ValueAnimator.ofFloat(0, 1); } mProgressAnimator.addUpdateListener(anim -> runnable.run());