Loading graphics/java/android/graphics/drawable/RippleComponent.java +2 −0 Original line number Diff line number Diff line Loading @@ -193,6 +193,7 @@ abstract class RippleComponent { private void cancelSoftwareAnimations() { if (mSoftwareAnimator != null) { mSoftwareAnimator.cancel(); mSoftwareAnimator = null; } } Loading @@ -203,6 +204,7 @@ abstract class RippleComponent { private void endSoftwareAnimations() { if (mSoftwareAnimator != null) { mSoftwareAnimator.end(); mSoftwareAnimator = null; } } Loading graphics/java/android/graphics/drawable/RippleDrawable.java +3 −24 Original line number Diff line number Diff line Loading @@ -212,19 +212,12 @@ public class RippleDrawable extends LayerDrawable { } cancelExitingRipples(); invalidateSelf(); } private boolean cancelExitingRipples() { boolean needsDraw = false; private void cancelExitingRipples() { final int count = mExitingRipplesCount; final RippleForeground[] ripples = mExitingRipples; for (int i = 0; i < count; i++) { // If the ripple is animating on the hardware thread, we'll need to // draw an additional frame after canceling to restore the software // drawing path. needsDraw |= ripples[i].isHardwareAnimating(); ripples[i].end(); } Loading @@ -233,21 +226,8 @@ public class RippleDrawable extends LayerDrawable { } mExitingRipplesCount = 0; return needsDraw; } @Override public void setAlpha(int alpha) { super.setAlpha(alpha); // TODO: Should we support this? } @Override public void setColorFilter(ColorFilter colorFilter) { super.setColorFilter(colorFilter); // TODO: Should we support this? // Always draw an additional "clean" frame after canceling animations. invalidateSelf(); } @Override Loading Loading @@ -606,7 +586,6 @@ public class RippleDrawable extends LayerDrawable { } cancelExitingRipples(); invalidateSelf(); } @Override Loading Loading
graphics/java/android/graphics/drawable/RippleComponent.java +2 −0 Original line number Diff line number Diff line Loading @@ -193,6 +193,7 @@ abstract class RippleComponent { private void cancelSoftwareAnimations() { if (mSoftwareAnimator != null) { mSoftwareAnimator.cancel(); mSoftwareAnimator = null; } } Loading @@ -203,6 +204,7 @@ abstract class RippleComponent { private void endSoftwareAnimations() { if (mSoftwareAnimator != null) { mSoftwareAnimator.end(); mSoftwareAnimator = null; } } Loading
graphics/java/android/graphics/drawable/RippleDrawable.java +3 −24 Original line number Diff line number Diff line Loading @@ -212,19 +212,12 @@ public class RippleDrawable extends LayerDrawable { } cancelExitingRipples(); invalidateSelf(); } private boolean cancelExitingRipples() { boolean needsDraw = false; private void cancelExitingRipples() { final int count = mExitingRipplesCount; final RippleForeground[] ripples = mExitingRipples; for (int i = 0; i < count; i++) { // If the ripple is animating on the hardware thread, we'll need to // draw an additional frame after canceling to restore the software // drawing path. needsDraw |= ripples[i].isHardwareAnimating(); ripples[i].end(); } Loading @@ -233,21 +226,8 @@ public class RippleDrawable extends LayerDrawable { } mExitingRipplesCount = 0; return needsDraw; } @Override public void setAlpha(int alpha) { super.setAlpha(alpha); // TODO: Should we support this? } @Override public void setColorFilter(ColorFilter colorFilter) { super.setColorFilter(colorFilter); // TODO: Should we support this? // Always draw an additional "clean" frame after canceling animations. invalidateSelf(); } @Override Loading Loading @@ -606,7 +586,6 @@ public class RippleDrawable extends LayerDrawable { } cancelExitingRipples(); invalidateSelf(); } @Override Loading