From 6e81e57b526a3e23038e365414acbb9688f8e44a Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Tue, 25 Jan 2011 12:52:58 -0800 Subject: [PATCH] Prevent crash in View when gathering attributes without an AttachInfo. Bug #3385339 Change-Id: I06b6f03721b52ab0b9d13c2fb3e133ae25d99970 --- core/java/android/view/ViewRoot.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java index 19d78111c1bf8..68b6a8a87a7d2 100644 --- a/core/java/android/view/ViewRoot.java +++ b/core/java/android/view/ViewRoot.java @@ -893,7 +893,7 @@ public final class ViewRoot extends Handler implements ViewParent, } } - if (attachInfo.mRecomputeGlobalAttributes) { + if (attachInfo.mRecomputeGlobalAttributes && host.mAttachInfo != null) { //Log.i(TAG, "Computing view hierarchy attributes!"); attachInfo.mRecomputeGlobalAttributes = false; boolean oldScreenOn = attachInfo.mKeepScreenOn;