Merge "Prevent crash when invalidating all Views Bug #7165793" into jb-mr1-dev
This commit is contained in:
@@ -832,8 +832,8 @@ public final class ViewRootImpl implements ViewParent,
|
||||
void invalidateWorld(View view) {
|
||||
view.invalidate();
|
||||
if (view instanceof ViewGroup) {
|
||||
ViewGroup parent = (ViewGroup)view;
|
||||
for (int i=0; i<parent.getChildCount(); i++) {
|
||||
ViewGroup parent = (ViewGroup) view;
|
||||
for (int i = 0; i < parent.getChildCount(); i++) {
|
||||
invalidateWorld(parent.getChildAt(i));
|
||||
}
|
||||
}
|
||||
@@ -2998,7 +2998,9 @@ public final class ViewRootImpl implements ViewParent,
|
||||
handleDispatchDoneAnimating();
|
||||
} break;
|
||||
case MSG_INVALIDATE_WORLD: {
|
||||
invalidateWorld(mView);
|
||||
if (mView != null) {
|
||||
invalidateWorld(mView);
|
||||
}
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user