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:
@@ -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
|
||||
|
||||
@@ -549,11 +549,10 @@ public class DisplayPolicy {
|
||||
synchronized (mLock) {
|
||||
mDisplayContent.calculateSystemGestureExclusion(
|
||||
excludedRegion, null /* outUnrestricted */);
|
||||
final boolean sideAllowed = mNavigationBarAlwaysShowOnSideGesture
|
||||
|| mNavigationBarPosition == NAV_BAR_RIGHT;
|
||||
if (mNavigationBar != null && sideAllowed
|
||||
&& !mSystemGestures.currentGestureStartedInRegion(
|
||||
excludedRegion)) {
|
||||
final boolean excluded =
|
||||
mSystemGestures.currentGestureStartedInRegion(excludedRegion);
|
||||
if (mNavigationBar != null && (mNavigationBarPosition == NAV_BAR_RIGHT
|
||||
|| !excluded && mNavigationBarAlwaysShowOnSideGesture)) {
|
||||
requestTransientBars(mNavigationBar);
|
||||
}
|
||||
checkAltBarSwipeForTransientBars(ALT_BAR_RIGHT);
|
||||
@@ -567,11 +566,10 @@ public class DisplayPolicy {
|
||||
synchronized (mLock) {
|
||||
mDisplayContent.calculateSystemGestureExclusion(
|
||||
excludedRegion, null /* outUnrestricted */);
|
||||
final boolean sideAllowed = mNavigationBarAlwaysShowOnSideGesture
|
||||
|| mNavigationBarPosition == NAV_BAR_LEFT;
|
||||
if (mNavigationBar != null && sideAllowed
|
||||
&& !mSystemGestures.currentGestureStartedInRegion(
|
||||
excludedRegion)) {
|
||||
final boolean excluded =
|
||||
mSystemGestures.currentGestureStartedInRegion(excludedRegion);
|
||||
if (mNavigationBar != null && (mNavigationBarPosition == NAV_BAR_LEFT
|
||||
|| !excluded && mNavigationBarAlwaysShowOnSideGesture)) {
|
||||
requestTransientBars(mNavigationBar);
|
||||
}
|
||||
checkAltBarSwipeForTransientBars(ALT_BAR_LEFT);
|
||||
|
||||
Reference in New Issue
Block a user