am 51d71003: Merge "Prevent crash when invalidating all Views Bug #7165793" into jb-mr1-dev

* commit '51d71003e4211b273b8e00adf85389e91ea4bdff':
  Prevent crash when invalidating all Views Bug #7165793
This commit is contained in:
Romain Guy
2012-09-13 22:55:18 -07:00
committed by Android Git Automerger

View File

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