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

Commit ca7c4b37 authored by Ming-Shin Lu's avatar Ming-Shin Lu Committed by Automerger Merge Worker
Browse files

Merge "Fix toggleSoftInput can't hide IME when the app in multi-window mode"...

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

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19600536



Change-Id: I7a7ed559b4e063bd44a2365ad449c2014ca9932b
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 9fc75e89 4141dae2
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -91,6 +91,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.AutofillId;
import android.view.autofill.AutofillManager;
@@ -2150,8 +2151,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 {