From bedb566a280e8aee2e80346af08f42b3fb5121c2 Mon Sep 17 00:00:00 2001 From: Filip Gruszczynski Date: Mon, 4 Jan 2016 15:56:07 -0800 Subject: [PATCH] Don't push IME above all app windows and dock divider. The IME should only be pushed above the application that requested it. There might be other windows that go above the IME, e.g. spinner dialog. We used to need the IME to go above all app windows, because the dock divider goes above all app windows and we want IME above the dock divider. This is not necessary anymore, because the dock divider is now aware of the IME and changes it's size to available space. The transition is also graceful enough, that it looks correct even when the IME goes away. Bug: 26325071 Change-Id: I8c05f2d200c5bb92c5fdb0d252e277fbe43a60a5 --- .../android/server/wm/WindowLayersController.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/services/core/java/com/android/server/wm/WindowLayersController.java b/services/core/java/com/android/server/wm/WindowLayersController.java index 59af0cd2a5eaf..2cf26180441f1 100644 --- a/services/core/java/com/android/server/wm/WindowLayersController.java +++ b/services/core/java/com/android/server/wm/WindowLayersController.java @@ -58,7 +58,6 @@ public class WindowLayersController { private WindowState mPinnedWindow = null; private WindowState mDockedWindow = null; private WindowState mDockDivider = null; - private WindowState mImeWindow = null; private WindowState mReplacingWindow = null; final void assignLayersLocked(WindowList windows) { @@ -170,16 +169,13 @@ public class WindowLayersController { private void clear() { mHighestApplicationLayer = 0; - mImeWindow = null; mPinnedWindow = null; mDockedWindow = null; mDockDivider = null; } private void collectSpecialWindows(WindowState w) { - if (w.mIsImWindow) { - mImeWindow = w; - } else if (w.mAttrs.type == TYPE_DOCK_DIVIDER) { + if (w.mAttrs.type == TYPE_DOCK_DIVIDER) { mDockDivider = w; } else { final TaskStack stack = w.getStack(); @@ -210,12 +206,6 @@ public class WindowLayersController { // immediately receive the same treatment, e.g. to be above the dock divider. layer = assignAndIncreaseLayerIfNeeded(mReplacingWindow, layer); layer = assignAndIncreaseLayerIfNeeded(mPinnedWindow, layer); - final WindowState inputMethodTarget = mService.mInputMethodTarget; - // There might be no applications windows yet, so we need to make sure we uplift the input - // method above the target. - layer = Math.max(layer, - inputMethodTarget != null ? inputMethodTarget.mWinAnimator.mAnimLayer + 1 : 0); - layer = assignAndIncreaseLayerIfNeeded(mImeWindow, layer); } private int assignAndIncreaseLayerIfNeeded(WindowState win, int layer) {