With gesture navigation, the navigation bar will generally move when rotating the
screen.
Fixes:
130052977
Test: Enable gestural navigation, open camera, enable auto-rotate, verify camera rotates seamlessly
Change-Id: I2d73fcadf9338a08ac15ba04842dc8b1221d74b0
{@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>
<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" />
{@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>
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;
mNavigationBarCanMove =
mDisplayContent.mBaseDisplayWidth != mDisplayContent.mBaseDisplayHeight
&& res.getBoolean(R.bool.config_navBarCanMove);
+ mAllowSeamlessRotationDespiteNavBarMoving =
+ res.getBoolean(R.bool.config_allowSeamlessRotationDespiteNavBarMoving);
}
/**
}
// 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;
}