diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index ebd82caeb9452..7d8e4a23bf38f 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -3381,9 +3381,10 @@ class DisplayContent extends DisplayArea.Root implements WindowManagerPolicy.Dis "Proposed new IME target: " + target + " for display: " + getDisplayId()); // Now, a special case -- if the last target's window is in the process of exiting, but - // not removed, keep on the last target to avoid IME flicker. + // not removed, keep on the last target to avoid IME flicker. The exception is if the + // current target is home since we want opening apps to become the IME target right away. if (curTarget != null && !curTarget.mRemoved && curTarget.isDisplayedLw() - && curTarget.isClosing()) { + && curTarget.isClosing() && !curTarget.isActivityTypeHome()) { if (DEBUG_INPUT_METHOD) Slog.v(TAG_WM, "Not changing target till current window is" + " closing and not removed"); return curTarget;