Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75fa3853 authored by Adrian Roos's avatar Adrian Roos
Browse files

Add API for light status bar

Adds a systemUiVisibility flag and links it
to the status bar icon controller. Also adds a
theme attribute for setting the flag.

Bug: 19233606
Change-Id: I8a89a10cf2746cefa2feba50dc60c5eccd2ab28d
parent 3bef2929
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1412,6 +1412,7 @@ package android {
    field public static final int windowExitTransition = 16843832; // 0x1010438
    field public static final int windowFrame = 16842837; // 0x1010055
    field public static final int windowFullscreen = 16843277; // 0x101020d
    field public static final int windowHasLightStatusBar = 16843995; // 0x10104db
    field public static final int windowHideAnimation = 16842935; // 0x10100b7
    field public static final int windowIsFloating = 16842839; // 0x1010057
    field public static final int windowIsTranslucent = 16842840; // 0x1010058
@@ -34331,6 +34332,7 @@ package android.view {
    field public static final int SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN = 1024; // 0x400
    field public static final int SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION = 512; // 0x200
    field public static final int SYSTEM_UI_FLAG_LAYOUT_STABLE = 256; // 0x100
    field public static final int SYSTEM_UI_FLAG_LIGHT_STATUS_BAR = 8192; // 0x2000
    field public static final int SYSTEM_UI_FLAG_LOW_PROFILE = 1; // 0x1
    field public static final int SYSTEM_UI_FLAG_VISIBLE = 0; // 0x0
    field public static final int SYSTEM_UI_LAYOUT_FLAGS = 1536; // 0x600
+2 −0
Original line number Diff line number Diff line
@@ -1488,6 +1488,7 @@ package android {
    field public static final int windowExitTransition = 16843832; // 0x1010438
    field public static final int windowFrame = 16842837; // 0x1010055
    field public static final int windowFullscreen = 16843277; // 0x101020d
    field public static final int windowHasLightStatusBar = 16843995; // 0x10104db
    field public static final int windowHideAnimation = 16842935; // 0x10100b7
    field public static final int windowIsFloating = 16842839; // 0x1010057
    field public static final int windowIsTranslucent = 16842840; // 0x1010058
@@ -36533,6 +36534,7 @@ package android.view {
    field public static final int SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN = 1024; // 0x400
    field public static final int SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION = 512; // 0x200
    field public static final int SYSTEM_UI_FLAG_LAYOUT_STABLE = 256; // 0x100
    field public static final int SYSTEM_UI_FLAG_LIGHT_STATUS_BAR = 8192; // 0x2000
    field public static final int SYSTEM_UI_FLAG_LOW_PROFILE = 1; // 0x1
    field public static final int SYSTEM_UI_FLAG_VISIBLE = 0; // 0x0
    field public static final int SYSTEM_UI_LAYOUT_FLAGS = 1536; // 0x600
+14 −0
Original line number Diff line number Diff line
@@ -2543,6 +2543,20 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     */
    public static final int SYSTEM_UI_FLAG_IMMERSIVE_STICKY = 0x00001000;
    /**
     * Flag for {@link #setSystemUiVisibility(int)}: Requests the status bar to draw in a mode that
     * is compatible with light status bar backgrounds.
     *
     * <p>For this to take effect, the window must request
     * {@link android.view.WindowManager.LayoutParams#FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
     *         FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS} but not
     * {@link android.view.WindowManager.LayoutParams#FLAG_TRANSLUCENT_STATUS
     *         FLAG_TRANSLUCENT_STATUS}.
     *
     * @see android.R.attr#windowHasLightStatusBar
     */
    public static final int SYSTEM_UI_FLAG_LIGHT_STATUS_BAR = 0x00002000;
    /**
     * @deprecated Use {@link #SYSTEM_UI_FLAG_LOW_PROFILE} instead.
     */
+10 −0
Original line number Diff line number Diff line
@@ -1952,6 +1952,16 @@

        <!-- Whether to clip window content to the outline of the window background. -->
        <attr name="windowClipToOutline" format="boolean" />

        <!-- If set, the status bar will be drawn such that it is compatible with a light
             status 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 status bar must not
             have been requested to be translucent with
             {@link android.R.attr#windowTranslucentStatus}.
             Corresponds to setting {@link android.view.View#SYSTEM_UI_FLAG_LIGHT_STATUS_BAR} on
             the decor view. -->
        <attr name="windowHasLightStatusBar" format="boolean" />
    </declare-styleable>

    <!-- The set of attributes that describe a AlertDialog's theme. -->
+1 −0
Original line number Diff line number Diff line
@@ -2613,6 +2613,7 @@
  <public type="attr" name="resizeableActivity" />
  <public type="attr" name="start" />
  <public type="attr" name="end" />
  <public type="attr" name="windowHasLightStatusBar" />

  <public type="style" name="Widget.Material.Button.Colored" />

Loading