summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
index 46fa20d094a0..48949f92413d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
@@ -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());
}
}