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

Commit b46ba3b2 authored by Alan Viverette's avatar Alan Viverette
Browse files

Avoid potential re-entry as a result of child mutation

Don't set the callback until we're all done making changes.

Bug: 30409766
Change-Id: Ia1560692a83ecb2c50f5e77fa4d1e8155a78a204
parent 1c284523
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -851,8 +851,8 @@ public class DrawableContainer extends Drawable implements Drawable.Callback {

        private Drawable prepareDrawable(Drawable child) {
            child.setLayoutDirection(mLayoutDirection);
            child.setCallback(mOwner);
            child = child.mutate();
            child.setCallback(mOwner);
            return child;
        }