summaryrefslogtreecommitdiff
path: root/core/java/android/view/Window.java
diff options
context:
space:
mode:
authorAdrian Roos <roosa@google.com>2019-04-10 14:47:57 +0200
committerAdrian Roos <roosa@google.com>2019-04-10 18:16:25 +0200
commit4c864595bdb19bb3dea5884f385aedb012073159 (patch)
tree59ff604167cf30cf56aee613fb9894508a85428e /core/java/android/view/Window.java
parentcb1536862860fb4fe58e3c19b4a230f32290e678 (diff)
System Bars: Ensure contrast when app requested transparent bar
Bug: 129533768 Test: atest EnsureBarContrastTest Change-Id: Ib8f4045b9e8e7bf65c13437133f114d91d0cb050
Diffstat (limited to 'core/java/android/view/Window.java')
-rw-r--r--core/java/android/view/Window.java64
1 files changed, 64 insertions, 0 deletions
diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java
index 3544a8733c68..a9463e998bbb 100644
--- a/core/java/android/view/Window.java
+++ b/core/java/android/view/Window.java
@@ -2329,6 +2329,70 @@ public abstract class Window {
return 0;
}
+ /**
+ * Sets whether the system should ensure that the status bar has enough
+ * contrast when a fully transparent background is requested.
+ *
+ * <p>If set to this value, the system will determine whether a scrim is necessary
+ * to ensure that the status bar has enough contrast with the contents of
+ * this app, and set an appropriate effective bar background color accordingly.
+ *
+ * <p>When the status bar color has a non-zero alpha value, the value of this
+ * property has no effect.
+ *
+ * @see android.R.attr#ensureStatusBarContrastWhenTransparent
+ * @hide pending API
+ */
+ public void setEnsureStatusBarContrastWhenTransparent(boolean ensureContrast) {
+ }
+
+ /**
+ * Returns whether the system is ensuring that the status bar has enough contrast when a
+ * fully transparent background is requested.
+ *
+ * <p>When the status bar color has a non-zero alpha value, the value of this
+ * property has no effect.
+ *
+ * @see android.R.attr#ensureStatusBarContrastWhenTransparent
+ * @return true, if the system is ensuring contrast, false otherwise.
+ * @hide pending API
+ */
+ public boolean isEnsureStatusBarContrastWhenTransparent() {
+ return false;
+ }
+
+ /**
+ * Sets whether the system should ensure that the navigation bar has enough
+ * contrast when a fully transparent background is requested.
+ *
+ * <p>If set to this value, the system will determine whether a scrim is necessary
+ * to ensure that the navigation bar has enough contrast with the contents of
+ * this app, and set an appropriate effective bar background color accordingly.
+ *
+ * <p>When the navigation bar color has a non-zero alpha value, the value of this
+ * property has no effect.
+ *
+ * @see android.R.attr#ensureNavigationBarContrastWhenTransparent
+ * @hide pending API
+ */
+ public void setEnsureNavigationBarContrastWhenTransparent(boolean ensureContrast) {
+ }
+
+ /**
+ * Returns whether the system is ensuring that the navigation bar has enough contrast when a
+ * fully transparent background is requested.
+ *
+ * <p>When the navigation bar color has a non-zero alpha value, the value of this
+ * property has no effect.
+ *
+ * @return true, if the system is ensuring contrast, false otherwise.
+ * @see android.R.attr#ensureNavigationBarContrastWhenTransparent
+ * @hide pending API
+ */
+ public boolean isEnsureNavigationBarContrastWhenTransparent() {
+ return false;
+ }
+
/** @hide */
public void setTheme(int resId) {
}