diff options
| author | 2021-02-20 10:56:53 +0000 | |
|---|---|---|
| committer | 2021-02-20 10:56:53 +0000 | |
| commit | 89b98e93573d2ba518f95e9184083c1a90802ea7 (patch) | |
| tree | 78226c87961ee5a5163fddce85820b3f6b708df4 | |
| parent | c43bbe80d96d0fb4303b5177c71ad8bc1aef22e7 (diff) | |
| parent | b575e09f0cdffbbc17a8697c70d01d0c0244f3b7 (diff) | |
Merge "Hide Keyboard when the remote input view became invisible" into sc-dev
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java | 5 |
1 files changed, 5 insertions, 0 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 8e833c05b447..320b00af0fc5 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java @@ -561,6 +561,11 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene super.onVisibilityChanged(changedView, visibility); if (changedView == this && mOnVisibilityChangedListener != null) { mOnVisibilityChangedListener.accept(visibility == VISIBLE); + // 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()) { + mEditText.hideIme(); + } } } |