From b54998f29dbebdf6cf658ee7c2b5d7e257eb1a39 Mon Sep 17 00:00:00 2001 From: Aaron Liu Date: Mon, 7 Mar 2022 18:40:58 +0000 Subject: [PATCH] Bouncer: Add interpolators on push animations. Add linear interpolators on push animations. Fixes: 218833792 Test: Manual on device Change-Id: I184be1773fbdf51d163b299643f2a8bb5b57a1ed --- .../SystemUI/src/com/android/keyguard/NumPadAnimator.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/SystemUI/src/com/android/keyguard/NumPadAnimator.java b/packages/SystemUI/src/com/android/keyguard/NumPadAnimator.java index 00470c0efe35f..f925eaa0e40bf 100644 --- a/packages/SystemUI/src/com/android/keyguard/NumPadAnimator.java +++ b/packages/SystemUI/src/com/android/keyguard/NumPadAnimator.java @@ -73,12 +73,14 @@ class NumPadAnimator { ValueAnimator expandBackgroundColorAnimator = ValueAnimator.ofObject(new ArgbEvaluator(), mNormalColor, mHighlightColor); expandBackgroundColorAnimator.setDuration(EXPAND_COLOR_ANIMATION_MS); + expandBackgroundColorAnimator.setInterpolator(Interpolators.LINEAR); expandBackgroundColorAnimator.addUpdateListener( animator -> mBackground.setColor((int) animator.getAnimatedValue())); ValueAnimator expandTextColorAnimator = ValueAnimator.ofObject(new ArgbEvaluator(), textColorPrimary, textColorPrimaryInverse); + expandTextColorAnimator.setInterpolator(Interpolators.LINEAR); expandTextColorAnimator.setDuration(EXPAND_COLOR_ANIMATION_MS); expandTextColorAnimator.addUpdateListener(valueAnimator -> { if (digitTextView != null) { @@ -98,6 +100,7 @@ class NumPadAnimator { anim -> mBackground.setCornerRadius((float) anim.getAnimatedValue())); ValueAnimator contractBackgroundColorAnimator = ValueAnimator.ofObject(new ArgbEvaluator(), mHighlightColor, mNormalColor); + contractBackgroundColorAnimator.setInterpolator(Interpolators.LINEAR); contractBackgroundColorAnimator.setStartDelay(CONTRACT_ANIMATION_DELAY_MS); contractBackgroundColorAnimator.setDuration(CONTRACT_ANIMATION_MS); contractBackgroundColorAnimator.addUpdateListener( @@ -106,6 +109,7 @@ class NumPadAnimator { ValueAnimator contractTextColorAnimator = ValueAnimator.ofObject(new ArgbEvaluator(), textColorPrimaryInverse, textColorPrimary); + contractTextColorAnimator.setInterpolator(Interpolators.LINEAR); contractTextColorAnimator.setStartDelay(CONTRACT_ANIMATION_DELAY_MS); contractTextColorAnimator.setDuration(CONTRACT_ANIMATION_MS); contractTextColorAnimator.addUpdateListener(valueAnimator -> {