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

Commit 7d6854a2 authored by Alan Viverette's avatar Alan Viverette
Browse files

Synchronize mutated constant state's drawable constant state

Mutating InsetDrawable's locally-held drawable alters its constant state,
so we need to update the InsetDrawable's reference to match. This ensures
that any drawables created using getConstantState().newDrawable() will
match the mutated versions.

Bug: 19213175
Change-Id: If9063bcc0942691a8940443e607f2dc722fc6e13
parent 84183103
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -408,6 +408,7 @@ public class InsetDrawable extends Drawable implements Drawable.Callback {
        if (!mMutated && super.mutate() == this) {
            mState = new InsetState(mState);
            mDrawable.mutate();
            mState.mDrawableState = mDrawable.getConstantState();
            mMutated = true;
        }
        return this;