Prevent crash in View when gathering attributes without an AttachInfo.
Bug #3385339

Change-Id: I06b6f03721b52ab0b9d13c2fb3e133ae25d99970
diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java
index 19d7811..68b6a8a 100644
--- a/core/java/android/view/ViewRoot.java
+++ b/core/java/android/view/ViewRoot.java
@@ -893,7 +893,7 @@
             }
         }
 
-        if (attachInfo.mRecomputeGlobalAttributes) {
+        if (attachInfo.mRecomputeGlobalAttributes && host.mAttachInfo != null) {
             //Log.i(TAG, "Computing view hierarchy attributes!");
             attachInfo.mRecomputeGlobalAttributes = false;
             boolean oldScreenOn = attachInfo.mKeepScreenOn;