OSDN Git Service

Do not adjust for IME window if docked stack is not visible
authorChong Zhang <chz@google.com>
Wed, 3 Feb 2016 22:07:08 +0000 (14:07 -0800)
committerChong Zhang <chz@google.com>
Wed, 3 Feb 2016 22:10:58 +0000 (14:10 -0800)
getDockSide() will tell us the stack is docked on bottom even when
we're not in docked mode. So we have to check if docked stack is
visible first.

bug: 26940656
Change-Id: I8729b2502e2fa78ae51e97f5599c23f3d3ea62fc

services/core/java/com/android/server/wm/WindowManagerService.java

index 9f833d1..273d020 100644 (file)
@@ -8106,7 +8106,9 @@ public class WindowManagerService extends IWindowManager.Stub
                         final WindowState imeWin = mInputMethodWindow;
                         final TaskStack focusedStack =
                                 mCurrentFocus != null ? mCurrentFocus.getStack() : null;
-                        if (imeWin != null && focusedStack != null && imeWin.isVisibleNow()
+                        if (imeWin != null && imeWin.isVisibleNow()
+                                && isStackVisibleLocked(DOCKED_STACK_ID)
+                                && focusedStack != null
                                 && focusedStack.getDockSide() == DOCKED_BOTTOM){
                             final ArrayList<TaskStack> stacks = displayContent.getStacks();
                             for (int i = stacks.size() - 1; i >= 0; --i) {