GestureNav: Fix broken split screen navbar

With gesture navigation, it no longer makes sense to force the navigation bar
to black in split screen, instead we can show the respective navbar backgrounds of
the applications.

Fixes: 130913061
Test: enable gesture navigation, enter splitscreen, observe that navigation bar backgrounds are properly drawn, also verify the same if IME is open.
Change-Id: If1464dd9cf0c5499c7c33caab06eb430fb59cb30
This commit is contained in:
Adrian Roos
2019-05-14 15:27:17 +02:00
parent 3bc96f9113
commit faba406212
4 changed files with 31 additions and 8 deletions

View File

@@ -1160,16 +1160,17 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
// Note: We don't need to check for IN_SCREEN or INSET_DECOR because unlike the status bar,
// these flags wouldn't make the window draw behind the navigation bar, unless
// LAYOUT_HIDE_NAVIGATION was set.
boolean hideNavigation = (sysUiVisibility & SYSTEM_UI_FLAG_HIDE_NAVIGATION) != 0;
boolean forceConsumingNavBar = (mForceWindowDrawsBarBackgrounds
&& (attrs.flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) == 0
&& (sysUiVisibility & SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION) == 0
&& (sysUiVisibility & SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0)
|| mLastShouldAlwaysConsumeSystemBars;
&& !hideNavigation)
|| (mLastShouldAlwaysConsumeSystemBars && hideNavigation);
boolean consumingNavBar =
((attrs.flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0
&& (sysUiVisibility & SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION) == 0
&& (sysUiVisibility & SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0)
&& !hideNavigation)
|| forceConsumingNavBar;
// If we didn't request fullscreen layout, but we still got it because of the