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

* commit 'f5b27e35c1e0e46ffd882606d0783875e1a1ff7b':
  Fix NPE in YouTube. Bug #3385339
This commit is contained in:
Romain Guy
2011-01-26 10:56:08 -08:00
committed by Android Git Automerger

View File

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