Merge "Fix NPE in YouTube. Bug #3385339" into honeycomb

This commit is contained in:
Romain Guy
2011-01-26 10:54:23 -08:00
committed by Android (Google) Code Review

View File

@ -4750,7 +4750,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
} }
void performCollectViewAttributes(int visibility) { void performCollectViewAttributes(int visibility) {
if ((visibility & VISIBILITY_MASK) == VISIBLE) { if ((visibility & VISIBILITY_MASK) == VISIBLE && mAttachInfo != null) {
if ((mViewFlags & KEEP_SCREEN_ON) == KEEP_SCREEN_ON) { if ((mViewFlags & KEEP_SCREEN_ON) == KEEP_SCREEN_ON) {
mAttachInfo.mKeepScreenOn = true; mAttachInfo.mKeepScreenOn = true;
} }