From ae87962e3ed41a8f502640a388f40ff33d7c3616 Mon Sep 17 00:00:00 2001 From: Craig Mautner Date: Thu, 3 Oct 2013 14:07:45 -0700 Subject: Retain IME assignment if no windows accept input. Was skipping over the default assignment due to new null value for windows (ag/361266). Fixes bug 10987178. Change-Id: I89efd41ab54b42de384eec84c5e937cc2a59d099 --- services/java/com/android/server/wm/WindowManagerService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'services') diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index a888731..51f8126 100644 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -1232,10 +1232,10 @@ public class WindowManagerService extends IWindowManager.Stub // the IME above it until it is completely gone so it doesn't drop // behind the dialog or its full-screen scrim. final WindowState curTarget = mInputMethodTarget; - if (curTarget != null && w != null + if (curTarget != null && curTarget.isDisplayedLw() && curTarget.isClosing() - && (curTarget.mWinAnimator.mAnimLayer > w.mWinAnimator.mAnimLayer)) { + && (w == null || curTarget.mWinAnimator.mAnimLayer > w.mWinAnimator.mAnimLayer)) { if (DEBUG_INPUT_METHOD) Slog.v(TAG, "Current target higher, not changing"); return windows.indexOf(curTarget) + 1; } -- cgit v1.1