Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ac90a06 authored by Alan Viverette's avatar Alan Viverette Committed by android-build-merger
Browse files

Avoid ripple buffer creation for empty bounds automerge: b74155cf automerge: e6e216c4

automerge: 2aacb861

* commit '2aacb861':
  Avoid ripple buffer creation for empty bounds
parents 767cddd3 2aacb861
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -673,7 +673,8 @@ public class RippleDrawable extends LayerDrawable {

        mHasValidMask = true;

        if (maskType == MASK_NONE) {
        final Rect bounds = getBounds();
        if (maskType == MASK_NONE || bounds.isEmpty()) {
            if (mMaskBuffer != null) {
                mMaskBuffer.recycle();
                mMaskBuffer = null;
@@ -686,7 +687,6 @@ public class RippleDrawable extends LayerDrawable {
        }

        // Ensure we have a correctly-sized buffer.
        final Rect bounds = getBounds();
        if (mMaskBuffer == null
                || mMaskBuffer.getWidth() != bounds.width()
                || mMaskBuffer.getHeight() != bounds.height()) {