Do let IME fit invisible insets

Otherwise, the fullscreen IME won't cover the entire display while
there is a hidden system bar.

Fix: 168657591
Test: 1. Steps in the bug.
      2. Play WindowInsetsTests with combinations of system bar
         visibilities, navigation mode, screen orientation, and display
         cutout.
Merged-in: I6e7d665c55839dfbb14c8d2e5365537416f5f6c6
Change-Id: I6e7d665c55839dfbb14c8d2e5365537416f5f6c6
(cherry picked from commit 145f71182a)
This commit is contained in:
Tiger Huang
2020-11-08 19:04:16 +08:00
parent 898602efc6
commit 604b284349
2 changed files with 8 additions and 11 deletions

View File

@@ -1215,7 +1215,6 @@ public class InputMethodService extends AbstractInputMethodService {
WindowManager.LayoutParams.TYPE_INPUT_METHOD, Gravity.BOTTOM, false);
mWindow.getWindow().getAttributes().setFitInsetsTypes(statusBars() | navigationBars());
mWindow.getWindow().getAttributes().setFitInsetsSides(Side.all() & ~Side.BOTTOM);
mWindow.getWindow().getAttributes().setFitInsetsIgnoringVisibility(true);
// IME layout should always be inset by navigation bar, no matter its current visibility,
// unless automotive requests it. Automotive devices may request the navigation bar to be