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

Commit dbbc6fc4 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix Keyboard not hiding when dismissing remote input from shade"

parents 58f20e16 d5d6db78
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ import android.view.ViewAnimationUtils;
import android.view.ViewGroup;
import android.view.WindowInsets;
import android.view.WindowInsetsAnimation;
import android.view.WindowInsetsController;
import android.view.accessibility.AccessibilityEvent;
import android.view.inputmethod.CompletionInfo;
import android.view.inputmethod.EditorInfo;
@@ -665,8 +666,7 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
            }
            // Hide soft-keyboard when the input view became invisible
            // (i.e. The notification shade collapsed by pressing the home key)
            if (visibility != VISIBLE && !mEditText.isVisibleToUser()
                    && !mController.isRemoteInputActive()) {
            if (visibility != VISIBLE && !mController.isRemoteInputActive()) {
                mEditText.hideIme();
            }
        }
@@ -779,8 +779,9 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
        }

        private void hideIme() {
            if (mInputMethodManager != null) {
                mInputMethodManager.hideSoftInputFromWindow(getWindowToken(), 0);
            final WindowInsetsController insetsController = getWindowInsetsController();
            if (insetsController != null) {
                insetsController.hide(WindowInsets.Type.ime());
            }
        }