From dd654eaf406ee668a040c8964c63389fe4af80ad Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Fri, 27 May 2016 11:46:10 -0700 Subject: [PATCH] Fix IME and NavBar overlap with Direct Reply In phone landscape, when the navigation bar is on the right, and when the status bar is forcing the IME and NavBar, make sure that the nav bar and IME don't overlap, even if the NavBar is only transient. Bug: 28914905 Change-Id: I22921f1aca7970c2d02dfd88408eb15c5b17151f --- .../java/com/android/server/policy/PhoneWindowManager.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index 0cafb93a060b3..66bb24d02de48 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -4360,6 +4360,11 @@ public class PhoneWindowManager implements WindowManagerPolicy { pf.bottom = df.bottom = of.bottom = mUnrestrictedScreenTop + mUnrestrictedScreenHeight; // ...with content insets above the nav bar cf.bottom = vf.bottom = mStableBottom; + if (mStatusBar != null && mFocusedWindow == mStatusBar && canReceiveInput(mStatusBar)) { + // The status bar forces the navigation bar while it's visible. Make sure the IME + // avoids the navigation bar in that case. + pf.right = df.right = of.right = cf.right = vf.right = mStableRight; + } // IM dock windows always go to the bottom of the screen. attrs.gravity = Gravity.BOTTOM; mDockLayer = win.getSurfaceLayer();