diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2021-06-14 17:01:42 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-06-14 17:01:42 +0000 |
commit | 7395d119e61722c4b221a7b9135b6dcfd4da944b (patch) | |
tree | b7ba390076a81f2bc037b40e748c2f206d860003 /graphics/java | |
parent | eee7cc8764ec96e018cfb6e659e87dd522537815 (diff) | |
parent | 7c0a17c042f737bb5303e6b1f94baeca47360c5d (diff) |
Merge "Put starting the animation back inside state changed check" into sc-dev
Diffstat (limited to 'graphics/java')
-rw-r--r-- | graphics/java/android/graphics/drawable/RippleDrawable.java | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/graphics/java/android/graphics/drawable/RippleDrawable.java b/graphics/java/android/graphics/drawable/RippleDrawable.java index 0d8715bfaef2..fe80b5845bf5 100644 --- a/graphics/java/android/graphics/drawable/RippleDrawable.java +++ b/graphics/java/android/graphics/drawable/RippleDrawable.java @@ -331,18 +331,18 @@ public class RippleDrawable extends LayerDrawable { private void setRippleActive(boolean active) { if (mRippleActive != active) { mRippleActive = active; - } - if (mState.mRippleStyle == STYLE_SOLID) { - if (active) { - tryRippleEnter(); - } else { - tryRippleExit(); - } - } else { - if (active) { - startPatternedAnimation(); + if (mState.mRippleStyle == STYLE_SOLID) { + if (active) { + tryRippleEnter(); + } else { + tryRippleExit(); + } } else { - exitPatternedAnimation(); + if (active) { + startPatternedAnimation(); + } else { + exitPatternedAnimation(); + } } } } |