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
|
||||
public void jumpToCurrentState() {
|
||||
final ChildDrawable[] children = mLayerState.mChildren;
|
||||
for (int i = 0, count = mLayerState.mNum; i < count; i++) {
|
||||
children[i].mDrawable.jumpToCurrentState();
|
||||
final ChildDrawable[] array = mLayerState.mChildren;
|
||||
final int N = mLayerState.mNum;
|
||||
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