Merge "Call windowInsetController.hide method when hiding keyboard" into sc-dev

This commit is contained in:
TreeHugger Robot 2021-05-05 20:14:42 +00:00 committed by Android (Google) Code Review
commit 7ef5456182
1 changed files with 7 additions and 1 deletions

View File

@ -48,7 +48,13 @@ public class UiThreadHelper {
WindowInsets rootInsets = launcher.getRootView().getRootWindowInsets();
boolean isImeShown = rootInsets != null && rootInsets.isVisible(
WindowInsets.Type.ime());
if (!isImeShown) return;
if (isImeShown) {
// this call is already asynchronous
launcher.getAppsView().getWindowInsetsController().hide(
WindowInsets.Type.ime()
);
}
return;
}
Message.obtain(HANDLER.get(launcher), MSG_HIDE_KEYBOARD, token).sendToTarget();