diff --git a/core/java/com/android/internal/policy/PhoneWindow.java b/core/java/com/android/internal/policy/PhoneWindow.java
index 1875ecf69ea03..a14e9a7cf516d 100644
--- a/core/java/com/android/internal/policy/PhoneWindow.java
+++ b/core/java/com/android/internal/policy/PhoneWindow.java
@@ -2507,12 +2507,23 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
final boolean targetPreQ = targetSdk < Build.VERSION_CODES.Q;
if (!mForcedStatusBarColor) {
- mStatusBarColor = a.getColor(R.styleable.Window_statusBarColor, 0xFF000000);
+ mStatusBarColor = a.getColor(R.styleable.Window_statusBarColor, Color.BLACK);
}
if (!mForcedNavigationBarColor) {
- mNavigationBarColor = a.getColor(R.styleable.Window_navigationBarColor, 0xFF000000);
+ final int navBarCompatibleColor = context.getColor(R.color.navigation_bar_compatible);
+ final int navBarDefaultColor = context.getColor(R.color.navigation_bar_default);
+ final int navBarColor = a.getColor(R.styleable.Window_navigationBarColor,
+ navBarDefaultColor);
+
+ mNavigationBarColor =
+ navBarColor == navBarDefaultColor
+ && !context.getResources().getBoolean(
+ R.bool.config_navBarDefaultTransparent)
+ ? navBarCompatibleColor
+ : navBarColor;
+
mNavigationBarDividerColor = a.getColor(R.styleable.Window_navigationBarDividerColor,
- 0x00000000);
+ Color.TRANSPARENT);
}
if (!targetPreQ) {
mEnsureStatusBarContrastWhenTransparent = a.getBoolean(
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
index 0c2fc1d4af297..e8922b0c870c1 100644
--- a/core/res/res/values/colors.xml
+++ b/core/res/res/values/colors.xml
@@ -573,4 +573,10 @@
#F7F9FA
#191C1D
#00677E
+
+
+ @android:color/black
+
+ #00808080
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 8e5ae9cf21ae7..76bb2760c5414 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -3876,6 +3876,10 @@
This should only be set when the device has gestural navigation enabled by default. -->
false
+
+ false
+
false
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index dcd7a31b6e4c5..9faf1439d9c7f 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -2996,6 +2996,9 @@
+
+
+
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index a60862b74e15c..e96de582022a8 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -191,7 +191,7 @@ please see themes_device_defaults.xml.
- false
- false
- @color/black
- - @color/black
+ - @color/navigation_bar_default
- @layout/screen_action_bar
- false
- false
diff --git a/core/res/res/values/themes_material.xml b/core/res/res/values/themes_material.xml
index e516a6cf9d2b5..cd4c0d62523ec 100644
--- a/core/res/res/values/themes_material.xml
+++ b/core/res/res/values/themes_material.xml
@@ -175,7 +175,7 @@ please see themes_device_defaults.xml.
- true
- @layout/screen_toolbar
- ?attr/colorPrimaryDark
- - @color/black
+ - @color/navigation_bar_default
- @transition/fade
- @transition/move
- @transition/move
@@ -548,7 +548,7 @@ please see themes_device_defaults.xml.
- true
- @layout/screen_toolbar
- ?attr/colorPrimaryDark
- - @color/black
+ - @color/navigation_bar_default
- @transition/fade
- @transition/move
- @transition/move