Merge "Put starting the animation back inside state changed check" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-06-14 17:01:42 +00:00
committed by Android (Google) Code Review

View File

@@ -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();
if (mState.mRippleStyle == STYLE_SOLID) {
if (active) {
tryRippleEnter();
} else {
tryRippleExit();
}
} else {
tryRippleExit();
}
} else {
if (active) {
startPatternedAnimation();
} else {
exitPatternedAnimation();
if (active) {
startPatternedAnimation();
} else {
exitPatternedAnimation();
}
}
}
}