Merge "Apply PendingAnimation#mDuration to all added anims" into ub-launcher3-rvc-dev
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 798e400..ee8d4a1 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
@@ -1904,7 +1904,7 @@
             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 32685b0..f6c392b 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -1342,7 +1342,6 @@
 
         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 99ed0ad..8260336 100644
--- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java
+++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
@@ -189,7 +189,6 @@
                 : 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 afeb341..4195933 100644
--- a/src/com/android/launcher3/anim/PendingAnimation.java
+++ b/src/com/android/launcher3/anim/PendingAnimation.java
@@ -69,7 +69,7 @@
     }
 
     public void add(Animator a, SpringProperty springProperty) {
-        mAnim.play(a);
+        mAnim.play(a.setDuration(mDuration));
         addAnimationHoldersRecur(a, mDuration, springProperty, mAnimHolders);
     }
 
@@ -87,7 +87,7 @@
         }
         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 <T> void addFloat(T target, FloatProperty<T> 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 @@
             return;
         }
         Animator anim = ObjectAnimator.ofInt(target, property, value);
-        anim.setDuration(mDuration).setInterpolator(interpolator);
+        anim.setInterpolator(interpolator);
         add(anim);
     }
 
@@ -125,7 +125,7 @@
      */
     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());