Merge "Update ripple mask when invalidated" into sc-dev am: 6836ab8607

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14443376

Change-Id: I39ea2774e1e5a56221229d82a5cd36e1c2cf018b
This commit is contained in:
TreeHugger Robot
2021-05-07 16:40:53 +00:00
committed by Automerger Merge Worker

View File

@@ -864,6 +864,10 @@ public class RippleDrawable extends LayerDrawable {
boolean shouldExit = mExitingAnimation; boolean shouldExit = mExitingAnimation;
mRippleActive = false; mRippleActive = false;
mExitingAnimation = false; mExitingAnimation = false;
if (mRunningAnimations.size() > 0 && !shouldAnimate) {
// update paint when view is invalidated
getRipplePaint();
}
drawContent(canvas); drawContent(canvas);
drawPatternedBackground(canvas, cx, cy); drawPatternedBackground(canvas, cx, cy);
if (shouldAnimate && mRunningAnimations.size() <= MAX_RIPPLES) { if (shouldAnimate && mRunningAnimations.size() <= MAX_RIPPLES) {