diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 5c593ca1fea5d..0daebd76daf48 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -3302,6 +3302,10 @@
{@link Window#setEnsuringNavigationBarContrastWhenTransparent}. -->
true
+
+ false
+
16x16
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index a00a294b535f7..1ef2eb4a0435e 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -2875,6 +2875,7 @@
+
diff --git a/packages/overlays/NavigationBarModeGesturalOverlay/res/values/config.xml b/packages/overlays/NavigationBarModeGesturalOverlay/res/values/config.xml
index 9694e76e138be..f1d2e0b273537 100644
--- a/packages/overlays/NavigationBarModeGesturalOverlay/res/values/config.xml
+++ b/packages/overlays/NavigationBarModeGesturalOverlay/res/values/config.xml
@@ -37,6 +37,10 @@
{@link Window#setEnsuringNavigationBarContrastWhenTransparent}. -->
false
+
+ true
+
true
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
index b8504db8e810e..197a3cf2b3ab3 100644
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
@@ -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;
}