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
This commit is contained in:
Alan Viverette
2016-07-27 10:23:35 -04:00
parent 1c2845238a
commit b46ba3b2b0

View File

@@ -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;
}