Merge "WM: Fix seamless rotation with gesture navigation" into qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a7423ca97c
@@ -3302,6 +3302,10 @@
|
||||
{@link Window#setEnsuringNavigationBarContrastWhenTransparent}. -->
|
||||
<bool name="config_navBarNeedsScrim">true</bool>
|
||||
|
||||
<!-- Controls whether seamless rotation should be allowed even though the navbar can move
|
||||
(which normally prevents seamless rotation). -->
|
||||
<bool name="config_allowSeamlessRotationDespiteNavBarMoving">false</bool>
|
||||
|
||||
<!-- Default insets [LEFT/RIGHTxTOP/BOTTOM] from the screen edge for picture-in-picture windows.
|
||||
These values are in DPs and will be converted to pixel sizes internally. -->
|
||||
<string translatable="false" name="config_defaultPictureInPictureScreenEdgeInsets">16x16</string>
|
||||
|
||||
@@ -2875,6 +2875,7 @@
|
||||
<java-symbol type="bool" name="config_navBarTapThrough" />
|
||||
<java-symbol type="bool" name="config_navBarAlwaysShowOnSideEdgeGesture" />
|
||||
<java-symbol type="bool" name="config_navBarNeedsScrim" />
|
||||
<java-symbol type="bool" name="config_allowSeamlessRotationDespiteNavBarMoving" />
|
||||
<java-symbol type="dimen" name="config_backGestureInset" />
|
||||
<java-symbol type="color" name="system_bar_background_semi_transparent" />
|
||||
|
||||
|
||||
@@ -37,6 +37,10 @@
|
||||
{@link Window#setEnsuringNavigationBarContrastWhenTransparent}. -->
|
||||
<bool name="config_navBarNeedsScrim">false</bool>
|
||||
|
||||
<!-- Controls whether seamless rotation should be allowed even though the navbar can move
|
||||
(which normally prevents seamless rotation). -->
|
||||
<bool name="config_allowSeamlessRotationDespiteNavBarMoving">true</bool>
|
||||
|
||||
<!-- Controls whether the side edge gestures can always trigger the transient nav bar to
|
||||
show. -->
|
||||
<bool name="config_navBarAlwaysShowOnSideEdgeGesture">true</bool>
|
||||
|
||||
@@ -255,6 +255,7 @@ public class DisplayPolicy {
|
||||
private volatile boolean mNavigationBarCanMove;
|
||||
private volatile boolean mNavigationBarLetsThroughTaps;
|
||||
private volatile boolean mNavigationBarAlwaysShowOnSideGesture;
|
||||
private volatile boolean mAllowSeamlessRotationDespiteNavBarMoving;
|
||||
|
||||
// Written by vr manager thread, only read in this class.
|
||||
private volatile boolean mPersistentVrModeEnabled;
|
||||
@@ -2726,6 +2727,8 @@ public class DisplayPolicy {
|
||||
mNavigationBarCanMove =
|
||||
mDisplayContent.mBaseDisplayWidth != mDisplayContent.mBaseDisplayHeight
|
||||
&& res.getBoolean(R.bool.config_navBarCanMove);
|
||||
mAllowSeamlessRotationDespiteNavBarMoving =
|
||||
res.getBoolean(R.bool.config_allowSeamlessRotationDespiteNavBarMoving);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3508,8 +3511,9 @@ public class DisplayPolicy {
|
||||
}
|
||||
// If the navigation bar can't change sides, then it will
|
||||
// jump when we change orientations and we don't rotate
|
||||
// seamlessly.
|
||||
if (!navigationBarCanMove()) {
|
||||
// seamlessly - unless that is allowed, eg. with gesture
|
||||
// navigation where the navbar is low-profile enough that this isn't very noticeable.
|
||||
if (!navigationBarCanMove() && !mAllowSeamlessRotationDespiteNavBarMoving) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user