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

Commit a9fa413a authored by Ming-Shin Lu's avatar Ming-Shin Lu Committed by Android (Google) Code Review
Browse files

Merge "Fix toggleSoftInput can't hide IME when the app in multi-window mode" into tm-qpr-dev

parents a01ccaae bb403223
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -89,6 +89,7 @@ import android.view.InputEventSender;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewRootImpl;
import android.view.WindowInsets;
import android.view.WindowManager.LayoutParams.SoftInputModeFlags;
import android.view.autofill.AutofillManager;
import android.window.ImeOnBackInvokedDispatcher;
@@ -2122,8 +2123,9 @@ public final class InputMethodManager {
                null /* icProto */);
        synchronized (mH) {
            final View view = getServedViewLocked();
            if (mImeInsetsConsumer != null && view != null) {
                if (mImeInsetsConsumer.isRequestedVisible()) {
            if (view != null) {
                final WindowInsets rootInsets = view.getRootWindowInsets();
                if (rootInsets != null && rootInsets.isVisible(WindowInsets.Type.ime())) {
                    hideSoftInputFromWindow(view.getWindowToken(), hideFlags, null,
                            SoftInputShowHideReason.HIDE_TOGGLE_SOFT_INPUT);
                } else {