Merge "Fix nav bar consuming" into nyc-dev

This commit is contained in:
Jorim Jaggi
2016-03-28 22:16:42 +00:00
committed by Android (Google) Code Review
3 changed files with 5 additions and 4 deletions

View File

@@ -91,6 +91,7 @@ public final class WindowInsets {
mWindowDecorInsetsConsumed = src.mWindowDecorInsetsConsumed;
mStableInsetsConsumed = src.mStableInsetsConsumed;
mIsRound = src.mIsRound;
mAlwaysConsumeNavBar = src.mAlwaysConsumeNavBar;
}
/** @hide */

View File

@@ -183,6 +183,7 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
private boolean mLastHasBottomStableInset = false;
private boolean mLastHasRightStableInset = false;
private int mLastWindowFlags = 0;
private boolean mLastShouldAlwaysConsumeNavBar = false;
private int mRootScrollY = 0;
@@ -996,6 +997,7 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
boolean hasRightStableInset = insets.getStableInsetRight() != 0;
disallowAnimate |= (hasRightStableInset != mLastHasRightStableInset);
mLastHasRightStableInset = hasRightStableInset;
mLastShouldAlwaysConsumeNavBar = insets.shouldAlwaysConsumeNavBar();
}
boolean navBarToRightEdge = isNavBarToRightEdge(mLastBottomInset, mLastRightInset);
@@ -1016,12 +1018,11 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
// When we expand the window with FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, we still need
// to ensure that the rest of the view hierarchy doesn't notice it, unless they've
// explicitly asked for it.
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
|| (insets != null && insets.shouldAlwaysConsumeNavBar());
|| mLastShouldAlwaysConsumeNavBar;
// If we didn't request fullscreen layout, but we still got it because of the
// mForceWindowDrawsStatusBarBackground flag, also consume top inset.

View File

@@ -6299,8 +6299,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
@Override
public boolean isNavBarForcedShownLw(WindowState windowState) {
return mForceShowSystemBars
&& !windowState.getFrameLw().equals(windowState.getDisplayFrameLw());
return mForceShowSystemBars;
}
@Override