Fix IME hiding animation being delayed after unlocking the device

Hide keyboard with WindowInsetsController if could. In case
hideSoftInputFromWindow may ignored by input connection being finished
when the screen is off.

Bug: 233158645
Test: manual as steps:
  1.  Launch AllApps.
  2.  Tap search bar to invoke IME.
  3.  Screen off.
  4.  Screen on.
And all other keyboard hide cases such as back gesture, swipe down, etc.

Change-Id: I4154f38f94b6760a430f7510a650422020d8f59a
This commit is contained in:
hyunyoungs
2022-06-03 00:47:04 -07:00
parent e8a4e0e2dc
commit d7a02ec7ae
2 changed files with 29 additions and 1 deletions

View File

@@ -104,6 +104,7 @@ public class ExtendedEditText extends EditText {
public void hideKeyboard() {
hideKeyboardAsync(ActivityContext.lookupContext(getContext()), getWindowToken());
clearFocus();
}
private boolean showSoftInput() {