From f8508272adb93b5377edfeb69e85442c3d9ed6d2 Mon Sep 17 00:00:00 2001 From: John Spurlock Date: Mon, 14 Oct 2013 21:06:52 -0400 Subject: [PATCH] Give IMEs the entire screen to use for measuring purposes. IMEs recently gained the ability to layout out under the nav bar, but our core measuring logic does not give height=WRAP_CONTENT windows the entire screen height when computing desired window height. Since IMEs can be identified by type, let them use the entire screen height for measuring purposes, to properly handle the cases where space is constrained, making that unaccounted-for nav bar height important. Bug:11215678 Change-Id: I1d0b73454c0c629e7d669b9de70641c7e8c4d333 --- core/java/android/view/ViewRootImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index c86bc4579715c..946106868d57c 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -1179,7 +1179,8 @@ public final class ViewRootImpl implements ViewParent, mFullRedrawNeeded = true; mLayoutRequested = true; - if (lp.type == WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL) { + if (lp.type == WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL + || lp.type == WindowManager.LayoutParams.TYPE_INPUT_METHOD) { // NOTE -- system code, won't try to do compat mode. Point size = new Point(); mDisplay.getRealSize(size); @@ -1273,7 +1274,8 @@ public final class ViewRootImpl implements ViewParent, || lp.height == ViewGroup.LayoutParams.WRAP_CONTENT) { windowSizeMayChange = true; - if (lp.type == WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL) { + if (lp.type == WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL + || lp.type == WindowManager.LayoutParams.TYPE_INPUT_METHOD) { // NOTE -- system code, won't try to do compat mode. Point size = new Point(); mDisplay.getRealSize(size);