Fix bug 3210201 - Popup window wrong size/position when IME hidden

Fixes a case where ViewRoot does not recompute its size properly.
This caused various offsets to get out of sync and the window would
draw improperly.

Change-Id: Id0abb37bbf27b60de2dca4077c21040ec84ef163
diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java
index 9bda637..95949b9 100644
--- a/core/java/android/view/ViewRoot.java
+++ b/core/java/android/view/ViewRoot.java
@@ -865,6 +865,9 @@
                 childWidthMeasureSpec = getRootMeasureSpec(desiredWindowWidth, lp.width);
                 childHeightMeasureSpec = getRootMeasureSpec(desiredWindowHeight, lp.height);
                 host.measure(childWidthMeasureSpec, childHeightMeasureSpec);
+                if (mWidth != host.getMeasuredWidth() || mHeight != host.getMeasuredHeight()) {
+                    windowSizeMayChange = true;
+                }
             }
 
             if (DBG) {