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

Commit 304db431 authored by Tiger Huang's avatar Tiger Huang
Browse files

Only use the IME target from IMMS to update the IME control target

DisplayContent.mInputMethodTarget is only used for deciding which window
IME should attach to.

Fix: 152698568
Fix: 153287963
Test: Steps in the bugs.
Change-Id: Ife6b700436ffa6ce80af9c6c276c0fcf3a4e057a
parent 9cea19d8
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -197,7 +197,6 @@ import android.view.ViewRootImpl;
import android.view.WindowInsets;
import android.view.WindowManager;
import android.view.WindowManagerPolicyConstants.PointerEventListener;
import android.window.ITaskOrganizer;

import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.MetricsLogger;
@@ -3426,7 +3425,10 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo

    private void setInputMethodTarget(WindowState target, boolean targetWaitingAnim) {
        // Always update control target. This is needed to handle rotation.
        updateImeControlTarget(target);
        // We cannot set target as the control target, because mInputMethodTarget can only help
        // decide the z-order of IME, but cannot control IME. Only the IME target reported from
        // updateInputMethodTargetWindow can control IME.
        updateImeControlTarget(mInputMethodControlTarget);
        if (target == mInputMethodTarget && mInputMethodTargetWaitingAnim == targetWaitingAnim) {
            return;
        }