Merge "Always mutate child when added to drawable container" into nyc-dev

am: d1f686f5dc

* commit 'd1f686f5dcf33606cf1e83cf2f7b8e41f5bd9148':
  Always mutate child when added to drawable container

Change-Id: Ief6bbd8ab12d2e92dfc3a742c2acbed221c35a51
This commit is contained in:
Alan Viverette
2016-05-09 14:14:35 +00:00
committed by android-build-merger

View File

@@ -786,13 +786,19 @@ public class DrawableContainer extends Drawable implements Drawable.Callback {
return mChangingConfigurations | mChildrenChangingConfigurations;
}
/**
* Adds the drawable to the end of the list of contained drawables.
*
* @param dr the drawable to add
* @return the position of the drawable within the container
*/
public final int addChild(Drawable dr) {
final int pos = mNumChildren;
if (pos >= mDrawables.length) {
growArray(pos, pos+10);
}
dr.mutate();
dr.setVisible(false, true);
dr.setCallback(mOwner);