Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae87962e authored by Craig Mautner's avatar Craig Mautner
Browse files

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
parent cbf3f2cd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
        }