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
diff --git a/src/com/android/launcher3/ExtendedEditText.java b/src/com/android/launcher3/ExtendedEditText.java
index 3b5b454..4629ca7 100644
--- a/src/com/android/launcher3/ExtendedEditText.java
+++ b/src/com/android/launcher3/ExtendedEditText.java
@@ -104,6 +104,7 @@
public void hideKeyboard() {
hideKeyboardAsync(ActivityContext.lookupContext(getContext()), getWindowToken());
+ clearFocus();
}
private boolean showSoftInput() {