Use IMM.hideSoftInputFromWindow to close the window

Bug: 187589678
Test: manual
Change-Id: Id46a36432a03638877f854f32bfa03183c7cb019
This commit is contained in:
Hyunyoung Song
2021-05-13 01:13:57 -07:00
parent e2801bcb77
commit af6686bf1f

View File

@@ -50,11 +50,9 @@ public class UiThreadHelper {
WindowInsets rootInsets = root.getRootWindowInsets();
boolean isImeShown = rootInsets != null && rootInsets.isVisible(
WindowInsets.Type.ime());
if (isImeShown) {
// this call is already asynchronous
root.getWindowInsetsController().hide(WindowInsets.Type.ime());
if (!isImeShown) {
return;
}
return;
}
Message.obtain(HANDLER.get(root.getContext()),