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

Commit be6024d5 authored by Romain Guy's avatar Romain Guy Committed by Android (Google) Code Review
Browse files

Merge "Fix crash in ShapeDrawable" into jb-mr1-dev

parents 1ac44eb9 1558cf14
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -373,8 +373,16 @@ public class ShapeDrawable extends Drawable {
    @Override
    public Drawable mutate() {
        if (!mMutated && super.mutate() == this) {
            if (mShapeState.mPaint != null) {
                mShapeState.mPaint = new Paint(mShapeState.mPaint);
            } else {
                mShapeState.mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
            }
            if (mShapeState.mPadding != null) {
                mShapeState.mPadding = new Rect(mShapeState.mPadding);
            } else {
                mShapeState.mPadding = new Rect();
            }
            try {
                mShapeState.mShape = mShapeState.mShape.clone();
            } catch (CloneNotSupportedException e) {