diff options
author | 2025-03-20 15:19:16 -0700 | |
---|---|---|
committer | 2025-03-20 15:19:16 -0700 | |
commit | d2fbf75eeefcc23ac8c71c88fb110a1a3d470c44 (patch) | |
tree | 5686a6419a27e8a9dfcba94d1ec237c6345d2ac6 | |
parent | 437079369a5e05da2e039c1bfadba8c3497b61ea (diff) | |
parent | 25e28ec42118f3b3dc8ebc5372c1037aba7dfa30 (diff) |
Merge "Fix issue with applying interpolators twice" into main
-rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/animation/SizeChangeAnimation.java | 6 | ||||
-rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarAnimationHelper.java | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/animation/SizeChangeAnimation.java b/libs/WindowManager/Shell/src/com/android/wm/shell/animation/SizeChangeAnimation.java index 8e3dc4c36c1d..711667760314 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/animation/SizeChangeAnimation.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/animation/SizeChangeAnimation.java @@ -34,6 +34,8 @@ import android.view.animation.ScaleAnimation; import android.view.animation.Transformation; import android.view.animation.TranslateAnimation; +import com.android.wm.shell.shared.animation.Interpolators; + import java.util.function.Consumer; /** @@ -196,6 +198,8 @@ public class SizeChangeAnimation { float startScaleY = scaleFactor * ((float) startBounds.height()) / endBounds.height() + (1.f - scaleFactor); final AnimationSet animSet = new AnimationSet(true); + // Use a linear interpolator so the driving ValueAnimator sets the interpolation + animSet.setInterpolator(Interpolators.LINEAR); final Animation scaleAnim = new ScaleAnimation(startScaleX, 1, startScaleY, 1); scaleAnim.setDuration(scalePeriod); @@ -244,6 +248,8 @@ public class SizeChangeAnimation { + (1.f - scaleFactor)); AnimationSet snapAnimSet = new AnimationSet(true); + // Use a linear interpolator so the driving ValueAnimator sets the interpolation + snapAnimSet.setInterpolator(Interpolators.LINEAR); // Animation for the "old-state" snapshot that is atop the task. final Animation snapAlphaAnim = new AlphaAnimation(1.f, 0.f); snapAlphaAnim.setDuration(scalePeriod); diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarAnimationHelper.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarAnimationHelper.java index b89bfd5c969e..ea365efcb400 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarAnimationHelper.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarAnimationHelper.java @@ -615,7 +615,7 @@ public class BubbleBarAnimationHelper { bbev.setSurfaceZOrderedOnTop(true); a.setDuration(EXPANDED_VIEW_ANIMATE_TO_REST_DURATION); - a.setInterpolator(Interpolators.EMPHASIZED); + a.setInterpolator(EMPHASIZED); a.start(); } |