Merge "Check for null drawable during LayerDrawable.jumpToCurrentState()" into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
68d180bbd1
@@ -1419,9 +1419,13 @@ public class LayerDrawable extends Drawable implements Drawable.Callback {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void jumpToCurrentState() {
|
public void jumpToCurrentState() {
|
||||||
final ChildDrawable[] children = mLayerState.mChildren;
|
final ChildDrawable[] array = mLayerState.mChildren;
|
||||||
for (int i = 0, count = mLayerState.mNum; i < count; i++) {
|
final int N = mLayerState.mNum;
|
||||||
children[i].mDrawable.jumpToCurrentState();
|
for (int i = 0; i < N; i++) {
|
||||||
|
final Drawable dr = array[i].mDrawable;
|
||||||
|
if (dr != null) {
|
||||||
|
dr.jumpToCurrentState();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user