summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/current.txt1
-rw-r--r--api/system-current.txt1
-rw-r--r--api/test-current.txt1
-rw-r--r--core/java/android/view/View.java2
-rw-r--r--core/java/com/android/internal/policy/PhoneWindow.java4
-rw-r--r--core/res/res/values/attrs.xml10
-rw-r--r--core/res/res/values/public.xml21
7 files changed, 40 insertions, 0 deletions
diff --git a/api/current.txt b/api/current.txt
index d94614b4de9f..c83f0989642e 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -1524,6 +1524,7 @@ package android {
field public static final int windowHideAnimation = 16842935; // 0x10100b7
field public static final int windowIsFloating = 16842839; // 0x1010057
field public static final int windowIsTranslucent = 16842840; // 0x1010058
+ field public static final int windowLightNavigationBar = 16844140; // 0x101056c
field public static final int windowLightStatusBar = 16844000; // 0x10104e0
field public static final int windowMinWidthMajor = 16843606; // 0x1010356
field public static final int windowMinWidthMinor = 16843607; // 0x1010357
diff --git a/api/system-current.txt b/api/system-current.txt
index a43fe2e4ca9f..5911101146fa 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -1661,6 +1661,7 @@ package android {
field public static final int windowHideAnimation = 16842935; // 0x10100b7
field public static final int windowIsFloating = 16842839; // 0x1010057
field public static final int windowIsTranslucent = 16842840; // 0x1010058
+ field public static final int windowLightNavigationBar = 16844140; // 0x101056c
field public static final int windowLightStatusBar = 16844000; // 0x10104e0
field public static final int windowMinWidthMajor = 16843606; // 0x1010356
field public static final int windowMinWidthMinor = 16843607; // 0x1010357
diff --git a/api/test-current.txt b/api/test-current.txt
index 87eb171c54ef..dde1dc88678d 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -1524,6 +1524,7 @@ package android {
field public static final int windowHideAnimation = 16842935; // 0x10100b7
field public static final int windowIsFloating = 16842839; // 0x1010057
field public static final int windowIsTranslucent = 16842840; // 0x1010058
+ field public static final int windowLightNavigationBar = 16844140; // 0x101056c
field public static final int windowLightStatusBar = 16844000; // 0x10104e0
field public static final int windowMinWidthMajor = 16843606; // 0x1010356
field public static final int windowMinWidthMinor = 16843607; // 0x1010357
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 2265b9c0c31f..ffb3203688eb 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -3354,6 +3354,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS} but not
* {@link android.view.WindowManager.LayoutParams#FLAG_TRANSLUCENT_NAVIGATION
* FLAG_TRANSLUCENT_NAVIGATION}.
+ *
+ * @see android.R.attr#windowLightNavigationBar
*/
public static final int SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR = 0x00000010;
diff --git a/core/java/com/android/internal/policy/PhoneWindow.java b/core/java/com/android/internal/policy/PhoneWindow.java
index 544afd993b37..0d66376138c2 100644
--- a/core/java/com/android/internal/policy/PhoneWindow.java
+++ b/core/java/com/android/internal/policy/PhoneWindow.java
@@ -2453,6 +2453,10 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
decor.setSystemUiVisibility(
decor.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
+ if (a.getBoolean(R.styleable.Window_windowLightNavigationBar, false)) {
+ decor.setSystemUiVisibility(
+ decor.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
+ }
if (mAlwaysReadCloseOnTouchAttr || getContext().getApplicationInfo().targetSdkVersion
>= android.os.Build.VERSION_CODES.HONEYCOMB) {
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 3143b034548f..598b5861af15 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -2087,6 +2087,16 @@
{@link android.R.attr#windowBackground}.
-->
<attr name="windowSplashscreenContent" format="reference" />
+
+ <!-- If set, the navigation bar will be drawn such that it is compatible with a light
+ navigation bar background.
+ <p>For this to take effect, the window must be drawing the system bar backgrounds with
+ {@link android.R.attr#windowDrawsSystemBarBackgrounds} and the navigation bar must not
+ have been requested to be translucent with
+ {@link android.R.attr#windowTranslucentNavigation}.
+ Corresponds to setting {@link android.view.View#SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR} on
+ the decor view. -->
+ <attr name="windowLightNavigationBar" format="boolean" />
</declare-styleable>
<!-- The set of attributes that describe a AlertDialog's theme. -->
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 634d79a92a4b..9b2f18511e83 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2858,6 +2858,27 @@
<public name="autofill"/>
</public-group>
+ <!-- ===============================================================
+ Resources added in version P of the platform
+
+ NOTE: add <public> elements within a <public-group> like so:
+
+ <public-group type="attr" first-id="0x01010531">
+ <public name="exampleAttr1" />
+ <public name="exampleAttr2" />
+ </public-group>
+
+ To add a new public-group block, choose an id value that is 1 greater
+ than the last of that item above. For example, the last "attr" id
+ value above is 0x01010530, so the public-group of attrs below has
+ the id value of 0x01010531.
+ =============================================================== -->
+ <eat-comment />
+
+ <public-group type="attr" first-id="0x0101056c">
+ <public name="windowLightNavigationBar" />
+ </public-group>
+
<!-- ===============================================================
DO NOT ADD UN-GROUPED ITEMS HERE