Loading api/current.txt +8 −2 Original line number Original line Diff line number Diff line Loading @@ -1226,6 +1226,8 @@ package android { field public static final int windowTitleBackgroundStyle = 16842844; // 0x101005c field public static final int windowTitleBackgroundStyle = 16842844; // 0x101005c field public static final int windowTitleSize = 16842842; // 0x101005a field public static final int windowTitleSize = 16842842; // 0x101005a field public static final int windowTitleStyle = 16842843; // 0x101005b field public static final int windowTitleStyle = 16842843; // 0x101005b field public static final int windowTranslucentNavigation = 16843760; // 0x10103f0 field public static final int windowTranslucentStatus = 16843759; // 0x10103ef field public static final int writePermission = 16842760; // 0x1010008 field public static final int writePermission = 16842760; // 0x1010008 field public static final int x = 16842924; // 0x10100ac field public static final int x = 16842924; // 0x10100ac field public static final int xlargeScreens = 16843455; // 0x10102bf field public static final int xlargeScreens = 16843455; // 0x10102bf Loading Loading @@ -1758,10 +1760,12 @@ package android { field public static final int Theme_DeviceDefault_Light_NoActionBar = 16974124; // 0x103012c field public static final int Theme_DeviceDefault_Light_NoActionBar = 16974124; // 0x103012c field public static final int Theme_DeviceDefault_Light_NoActionBar_Fullscreen = 16974125; // 0x103012d field public static final int Theme_DeviceDefault_Light_NoActionBar_Fullscreen = 16974125; // 0x103012d field public static final int Theme_DeviceDefault_Light_NoActionBar_Overscan = 16974304; // 0x10301e0 field public static final int Theme_DeviceDefault_Light_NoActionBar_Overscan = 16974304; // 0x10301e0 field public static final int Theme_DeviceDefault_Light_NoActionBar_TranslucentDecor = 16974308; // 0x10301e4 field public static final int Theme_DeviceDefault_Light_Panel = 16974139; // 0x103013b field public static final int Theme_DeviceDefault_Light_Panel = 16974139; // 0x103013b field public static final int Theme_DeviceDefault_NoActionBar = 16974121; // 0x1030129 field public static final int Theme_DeviceDefault_NoActionBar = 16974121; // 0x1030129 field public static final int Theme_DeviceDefault_NoActionBar_Fullscreen = 16974122; // 0x103012a field public static final int Theme_DeviceDefault_NoActionBar_Fullscreen = 16974122; // 0x103012a field public static final int Theme_DeviceDefault_NoActionBar_Overscan = 16974303; // 0x10301df field public static final int Theme_DeviceDefault_NoActionBar_Overscan = 16974303; // 0x10301df field public static final int Theme_DeviceDefault_NoActionBar_TranslucentDecor = 16974307; // 0x10301e3 field public static final int Theme_DeviceDefault_Panel = 16974138; // 0x103013a field public static final int Theme_DeviceDefault_Panel = 16974138; // 0x103013a field public static final int Theme_DeviceDefault_Wallpaper = 16974140; // 0x103013c field public static final int Theme_DeviceDefault_Wallpaper = 16974140; // 0x103013c field public static final int Theme_DeviceDefault_Wallpaper_NoTitleBar = 16974141; // 0x103013d field public static final int Theme_DeviceDefault_Wallpaper_NoTitleBar = 16974141; // 0x103013d Loading @@ -1785,10 +1789,12 @@ package android { field public static final int Theme_Holo_Light_NoActionBar = 16974064; // 0x10300f0 field public static final int Theme_Holo_Light_NoActionBar = 16974064; // 0x10300f0 field public static final int Theme_Holo_Light_NoActionBar_Fullscreen = 16974065; // 0x10300f1 field public static final int Theme_Holo_Light_NoActionBar_Fullscreen = 16974065; // 0x10300f1 field public static final int Theme_Holo_Light_NoActionBar_Overscan = 16974302; // 0x10301de field public static final int Theme_Holo_Light_NoActionBar_Overscan = 16974302; // 0x10301de field public static final int Theme_Holo_Light_NoActionBar_TranslucentDecor = 16974306; // 0x10301e2 field public static final int Theme_Holo_Light_Panel = 16973948; // 0x103007c field public static final int Theme_Holo_Light_Panel = 16973948; // 0x103007c field public static final int Theme_Holo_NoActionBar = 16973932; // 0x103006c field public static final int Theme_Holo_NoActionBar = 16973932; // 0x103006c field public static final int Theme_Holo_NoActionBar_Fullscreen = 16973933; // 0x103006d field public static final int Theme_Holo_NoActionBar_Fullscreen = 16973933; // 0x103006d field public static final int Theme_Holo_NoActionBar_Overscan = 16974301; // 0x10301dd field public static final int Theme_Holo_NoActionBar_Overscan = 16974301; // 0x10301dd field public static final int Theme_Holo_NoActionBar_TranslucentDecor = 16974305; // 0x10301e1 field public static final int Theme_Holo_Panel = 16973947; // 0x103007b field public static final int Theme_Holo_Panel = 16973947; // 0x103007b field public static final int Theme_Holo_Wallpaper = 16973949; // 0x103007d field public static final int Theme_Holo_Wallpaper = 16973949; // 0x103007d field public static final int Theme_Holo_Wallpaper_NoTitleBar = 16973950; // 0x103007e field public static final int Theme_Holo_Wallpaper_NoTitleBar = 16973950; // 0x103007e Loading Loading @@ -28395,8 +28401,6 @@ package android.view { field public static final int SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION = 512; // 0x200 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_LAYOUT_STABLE = 256; // 0x100 field public static final int SYSTEM_UI_FLAG_LOW_PROFILE = 1; // 0x1 field public static final int SYSTEM_UI_FLAG_LOW_PROFILE = 1; // 0x1 field public static final int SYSTEM_UI_FLAG_TRANSPARENT_NAVIGATION = 8192; // 0x2000 field public static final int SYSTEM_UI_FLAG_TRANSPARENT_STATUS = 4096; // 0x1000 field public static final int SYSTEM_UI_FLAG_VISIBLE = 0; // 0x0 field public static final int SYSTEM_UI_FLAG_VISIBLE = 0; // 0x0 field public static final int SYSTEM_UI_LAYOUT_FLAGS = 1536; // 0x600 field public static final int SYSTEM_UI_LAYOUT_FLAGS = 1536; // 0x600 field public static final int TEXT_ALIGNMENT_CENTER = 4; // 0x4 field public static final int TEXT_ALIGNMENT_CENTER = 4; // 0x4 Loading Loading @@ -29132,6 +29136,8 @@ package android.view { field public static final int FLAG_SHOW_WHEN_LOCKED = 524288; // 0x80000 field public static final int FLAG_SHOW_WHEN_LOCKED = 524288; // 0x80000 field public static final int FLAG_SPLIT_TOUCH = 8388608; // 0x800000 field public static final int FLAG_SPLIT_TOUCH = 8388608; // 0x800000 field public static final int FLAG_TOUCHABLE_WHEN_WAKING = 64; // 0x40 field public static final int FLAG_TOUCHABLE_WHEN_WAKING = 64; // 0x40 field public static final int FLAG_TRANSLUCENT_NAVIGATION = 134217728; // 0x8000000 field public static final int FLAG_TRANSLUCENT_STATUS = 67108864; // 0x4000000 field public static final int FLAG_TURN_SCREEN_ON = 2097152; // 0x200000 field public static final int FLAG_TURN_SCREEN_ON = 2097152; // 0x200000 field public static final int FLAG_WATCH_OUTSIDE_TOUCH = 262144; // 0x40000 field public static final int FLAG_WATCH_OUTSIDE_TOUCH = 262144; // 0x40000 field public static final int FORMAT_CHANGED = 8; // 0x8 field public static final int FORMAT_CHANGED = 8; // 0x8 core/java/android/view/View.java +22 −24 Original line number Original line Diff line number Diff line Loading @@ -2447,24 +2447,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ */ public static final int SYSTEM_UI_FLAG_IMMERSIVE = 0x00000800; public static final int SYSTEM_UI_FLAG_IMMERSIVE = 0x00000800; /** * Flag for {@link #setSystemUiVisibility(int)}: View would like the status bar to have * transparency. * * <p>The transparency request may be denied if the bar is in another mode with a specific * style, like {@link #SYSTEM_UI_FLAG_IMMERSIVE immersive mode}. */ public static final int SYSTEM_UI_FLAG_TRANSPARENT_STATUS = 0x00001000; /** * Flag for {@link #setSystemUiVisibility(int)}: View would like the navigation bar to have * transparency. * * <p>The transparency request may be denied if the bar is in another mode with a specific * style, like {@link #SYSTEM_UI_FLAG_IMMERSIVE immersive mode}. */ public static final int SYSTEM_UI_FLAG_TRANSPARENT_NAVIGATION = 0x00002000; /** /** * @deprecated Use {@link #SYSTEM_UI_FLAG_LOW_PROFILE} instead. * @deprecated Use {@link #SYSTEM_UI_FLAG_LOW_PROFILE} instead. */ */ Loading Loading @@ -2624,6 +2606,26 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ */ public static final int NAVIGATION_BAR_UNHIDE = 0x20000000; public static final int NAVIGATION_BAR_UNHIDE = 0x20000000; /** * @hide * * NOTE: This flag may only be used in subtreeSystemUiVisibility. It is masked * out of the public fields to keep the undefined bits out of the developer's way. * * Flag to specify that the status bar is displayed in translucent mode. */ public static final int STATUS_BAR_TRANSLUCENT = 0x40000000; /** * @hide * * NOTE: This flag may only be used in subtreeSystemUiVisibility. It is masked * out of the public fields to keep the undefined bits out of the developer's way. * * Flag to specify that the navigation bar is displayed in translucent mode. */ public static final int NAVIGATION_BAR_TRANSLUCENT = 0x80000000; /** /** * @hide * @hide */ */ Loading Loading @@ -16934,9 +16936,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @param visibility Bitwise-or of flags {@link #SYSTEM_UI_FLAG_LOW_PROFILE}, * @param visibility Bitwise-or of flags {@link #SYSTEM_UI_FLAG_LOW_PROFILE}, * {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION}, {@link #SYSTEM_UI_FLAG_FULLSCREEN}, * {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION}, {@link #SYSTEM_UI_FLAG_FULLSCREEN}, * {@link #SYSTEM_UI_FLAG_LAYOUT_STABLE}, {@link #SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION}, * {@link #SYSTEM_UI_FLAG_LAYOUT_STABLE}, {@link #SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION}, * {@link #SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}, {@link #SYSTEM_UI_FLAG_IMMERSIVE}, * {@link #SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}, and {@link #SYSTEM_UI_FLAG_IMMERSIVE}. * {@link #SYSTEM_UI_FLAG_TRANSPARENT_STATUS}, * and {@link #SYSTEM_UI_FLAG_TRANSPARENT_NAVIGATION}. */ */ public void setSystemUiVisibility(int visibility) { public void setSystemUiVisibility(int visibility) { if (visibility != mSystemUiVisibility) { if (visibility != mSystemUiVisibility) { Loading @@ -16952,9 +16952,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @return Bitwise-or of flags {@link #SYSTEM_UI_FLAG_LOW_PROFILE}, * @return Bitwise-or of flags {@link #SYSTEM_UI_FLAG_LOW_PROFILE}, * {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION}, {@link #SYSTEM_UI_FLAG_FULLSCREEN}, * {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION}, {@link #SYSTEM_UI_FLAG_FULLSCREEN}, * {@link #SYSTEM_UI_FLAG_LAYOUT_STABLE}, {@link #SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION}, * {@link #SYSTEM_UI_FLAG_LAYOUT_STABLE}, {@link #SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION}, * {@link #SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}, {@link #SYSTEM_UI_FLAG_IMMERSIVE}, * {@link #SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}, and {@link #SYSTEM_UI_FLAG_IMMERSIVE}. * {@link #SYSTEM_UI_FLAG_TRANSPARENT_STATUS}, * and {@link #SYSTEM_UI_FLAG_TRANSPARENT_NAVIGATION}. */ */ public int getSystemUiVisibility() { public int getSystemUiVisibility() { return mSystemUiVisibility; return mSystemUiVisibility; core/java/android/view/ViewRootImpl.java +18 −0 Original line number Original line Diff line number Diff line Loading @@ -754,6 +754,11 @@ public final class ViewRootImpl implements ViewParent, attrs.systemUiVisibility = mWindowAttributes.systemUiVisibility; attrs.systemUiVisibility = mWindowAttributes.systemUiVisibility; attrs.subtreeSystemUiVisibility = mWindowAttributes.subtreeSystemUiVisibility; attrs.subtreeSystemUiVisibility = mWindowAttributes.subtreeSystemUiVisibility; mWindowAttributesChangesFlag = mWindowAttributes.copyFrom(attrs); mWindowAttributesChangesFlag = mWindowAttributes.copyFrom(attrs); if ((mWindowAttributesChangesFlag & WindowManager.LayoutParams.TRANSLUCENT_FLAGS_CHANGED) != 0) { // Recompute system ui visibility. mAttachInfo.mRecomputeGlobalAttributes = true; } if (mWindowAttributes.packageName == null) { if (mWindowAttributes.packageName == null) { mWindowAttributes.packageName = mBasePackageName; mWindowAttributes.packageName = mBasePackageName; } } Loading Loading @@ -1026,6 +1031,7 @@ public final class ViewRootImpl implements ViewParent, mView.dispatchCollectViewAttributes(attachInfo, 0); mView.dispatchCollectViewAttributes(attachInfo, 0); attachInfo.mSystemUiVisibility &= ~attachInfo.mDisabledSystemUiVisibility; attachInfo.mSystemUiVisibility &= ~attachInfo.mDisabledSystemUiVisibility; WindowManager.LayoutParams params = mWindowAttributes; WindowManager.LayoutParams params = mWindowAttributes; attachInfo.mSystemUiVisibility |= getImpliedSystemUiVisibility(params); if (attachInfo.mKeepScreenOn != oldScreenOn if (attachInfo.mKeepScreenOn != oldScreenOn || attachInfo.mSystemUiVisibility != params.subtreeSystemUiVisibility || attachInfo.mSystemUiVisibility != params.subtreeSystemUiVisibility || attachInfo.mHasSystemUiListeners != params.hasSystemUiListeners) { || attachInfo.mHasSystemUiListeners != params.hasSystemUiListeners) { Loading @@ -1039,6 +1045,18 @@ public final class ViewRootImpl implements ViewParent, return false; return false; } } private int getImpliedSystemUiVisibility(WindowManager.LayoutParams params) { int vis = 0; // Translucent decor window flags imply stable system ui visibility. if ((params.flags & WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS) != 0) { vis |= View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN; } if ((params.flags & WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION) != 0) { vis |= View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION; } return vis; } private boolean measureHierarchy(final View host, final WindowManager.LayoutParams lp, private boolean measureHierarchy(final View host, final WindowManager.LayoutParams lp, final Resources res, final int desiredWindowWidth, final int desiredWindowHeight) { final Resources res, final int desiredWindowWidth, final int desiredWindowHeight) { int childWidthMeasureSpec; int childWidthMeasureSpec; Loading core/java/android/view/WindowManager.java +54 −1 Original line number Original line Diff line number Diff line Loading @@ -838,6 +838,44 @@ public interface WindowManager extends ViewManager { */ */ public static final int FLAG_LAYOUT_IN_OVERSCAN = 0x02000000; public static final int FLAG_LAYOUT_IN_OVERSCAN = 0x02000000; /** * Window flag: request a translucent status bar with minimal system-provided * background protection. * * <p>This flag can be controlled in your theme through the * {@link android.R.attr#windowTranslucentStatus} attribute; this attribute * is automatically set for you in the standard translucent decor themes * such as * {@link android.R.style#Theme_Holo_NoActionBar_TranslucentDecor}, * {@link android.R.style#Theme_Holo_Light_NoActionBar_TranslucentDecor}, * {@link android.R.style#Theme_DeviceDefault_NoActionBar_TranslucentDecor}, and * {@link android.R.style#Theme_DeviceDefault_Light_NoActionBar_TranslucentDecor}.</p> * * <p>When this flag is enabled for a window, it automatically sets * the system UI visibility flags {@link View#SYSTEM_UI_FLAG_LAYOUT_STABLE} and * {@link View#SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}.</p> */ public static final int FLAG_TRANSLUCENT_STATUS = 0x04000000; /** * Window flag: request a translucent navigation bar with minimal system-provided * background protection. * * <p>This flag can be controlled in your theme through the * {@link android.R.attr#windowTranslucentNavigation} attribute; this attribute * is automatically set for you in the standard translucent decor themes * such as * {@link android.R.style#Theme_Holo_NoActionBar_TranslucentDecor}, * {@link android.R.style#Theme_Holo_Light_NoActionBar_TranslucentDecor}, * {@link android.R.style#Theme_DeviceDefault_NoActionBar_TranslucentDecor}, and * {@link android.R.style#Theme_DeviceDefault_Light_NoActionBar_TranslucentDecor}.</p> * * <p>When this flag is enabled for a window, it automatically sets * the system UI visibility flags {@link View#SYSTEM_UI_FLAG_LAYOUT_STABLE} and * {@link View#SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION}.</p> */ public static final int FLAG_TRANSLUCENT_NAVIGATION = 0x08000000; // ----- HIDDEN FLAGS. // ----- HIDDEN FLAGS. // These start at the high bit and go down. // These start at the high bit and go down. Loading Loading @@ -956,7 +994,11 @@ public interface WindowManager extends ViewManager { @ViewDebug.FlagToString(mask = FLAG_HARDWARE_ACCELERATED, equals = FLAG_HARDWARE_ACCELERATED, @ViewDebug.FlagToString(mask = FLAG_HARDWARE_ACCELERATED, equals = FLAG_HARDWARE_ACCELERATED, name = "FLAG_HARDWARE_ACCELERATED"), name = "FLAG_HARDWARE_ACCELERATED"), @ViewDebug.FlagToString(mask = FLAG_LOCAL_FOCUS_MODE, equals = FLAG_LOCAL_FOCUS_MODE, @ViewDebug.FlagToString(mask = FLAG_LOCAL_FOCUS_MODE, equals = FLAG_LOCAL_FOCUS_MODE, name = "FLAG_LOCAL_FOCUS_MODE") name = "FLAG_LOCAL_FOCUS_MODE"), @ViewDebug.FlagToString(mask = FLAG_TRANSLUCENT_STATUS, equals = FLAG_TRANSLUCENT_STATUS, name = "FLAG_TRANSLUCENT_STATUS"), @ViewDebug.FlagToString(mask = FLAG_TRANSLUCENT_NAVIGATION, equals = FLAG_TRANSLUCENT_NAVIGATION, name = "FLAG_TRANSLUCENT_NAVIGATION") }) }) public int flags; public int flags; Loading Loading @@ -1046,6 +1088,11 @@ public interface WindowManager extends ViewManager { * {@hide} */ * {@hide} */ public static final int PRIVATE_FLAG_SYSTEM_ERROR = 0x00000100; public static final int PRIVATE_FLAG_SYSTEM_ERROR = 0x00000100; /** Window flag: maintain the previous transparent decor state when this window * becomes top-most. * {@hide} */ public static final int PRIVATE_FLAG_INHERIT_TRANSLUCENT_DECOR = 0x00000200; /** /** * Control flags that are private to the platform. * Control flags that are private to the platform. * @hide * @hide Loading Loading @@ -1576,6 +1623,8 @@ public interface WindowManager extends ViewManager { /** {@hide} */ /** {@hide} */ public static final int USER_ACTIVITY_TIMEOUT_CHANGED = 1<<18; public static final int USER_ACTIVITY_TIMEOUT_CHANGED = 1<<18; /** {@hide} */ /** {@hide} */ public static final int TRANSLUCENT_FLAGS_CHANGED = 1<<19; /** {@hide} */ public static final int EVERYTHING_CHANGED = 0xffffffff; public static final int EVERYTHING_CHANGED = 0xffffffff; // internal buffer to backup/restore parameters under compatibility mode. // internal buffer to backup/restore parameters under compatibility mode. Loading Loading @@ -1621,6 +1670,10 @@ public interface WindowManager extends ViewManager { changes |= TYPE_CHANGED; changes |= TYPE_CHANGED; } } if (flags != o.flags) { if (flags != o.flags) { final int diff = flags ^ o.flags; if ((diff & (FLAG_TRANSLUCENT_STATUS | FLAG_TRANSLUCENT_NAVIGATION)) != 0) { changes |= TRANSLUCENT_FLAGS_CHANGED; } flags = o.flags; flags = o.flags; changes |= FLAGS_CHANGED; changes |= FLAGS_CHANGED; } } Loading core/res/res/values/attrs.xml +10 −0 Original line number Original line Diff line number Diff line Loading @@ -439,6 +439,14 @@ or later. --> or later. --> <attr name="windowCloseOnTouchOutside" format="boolean" /> <attr name="windowCloseOnTouchOutside" format="boolean" /> <!-- Flag indicating whether this window requests a translucent status bar. Corresponds to {@link android.view.WindowManager.LayoutParams#FLAG_TRANSLUCENT_STATUS}. --> <attr name="windowTranslucentStatus" format="boolean" /> <!-- Flag indicating whether this window requests a translucent navigation bar. Corresponds to {@link android.view.WindowManager.LayoutParams#FLAG_TRANSLUCENT_NAVIGATION}. --> <attr name="windowTranslucentNavigation" format="boolean" /> <!-- ============ --> <!-- ============ --> <!-- Alert Dialog styles --> <!-- Alert Dialog styles --> <!-- ============ --> <!-- ============ --> Loading Loading @@ -1594,6 +1602,8 @@ <attr name="windowSplitActionBar" /> <attr name="windowSplitActionBar" /> <attr name="windowEnableSplitTouch" /> <attr name="windowEnableSplitTouch" /> <attr name="windowCloseOnTouchOutside" /> <attr name="windowCloseOnTouchOutside" /> <attr name="windowTranslucentStatus" /> <attr name="windowTranslucentNavigation" /> <!-- The minimum width the window is allowed to be, along the major <!-- The minimum width the window is allowed to be, along the major axis of the screen. That is, when in landscape. Can be either axis of the screen. That is, when in landscape. Can be either an absolute dimension or a fraction of the screen size in that an absolute dimension or a fraction of the screen size in that Loading Loading
api/current.txt +8 −2 Original line number Original line Diff line number Diff line Loading @@ -1226,6 +1226,8 @@ package android { field public static final int windowTitleBackgroundStyle = 16842844; // 0x101005c field public static final int windowTitleBackgroundStyle = 16842844; // 0x101005c field public static final int windowTitleSize = 16842842; // 0x101005a field public static final int windowTitleSize = 16842842; // 0x101005a field public static final int windowTitleStyle = 16842843; // 0x101005b field public static final int windowTitleStyle = 16842843; // 0x101005b field public static final int windowTranslucentNavigation = 16843760; // 0x10103f0 field public static final int windowTranslucentStatus = 16843759; // 0x10103ef field public static final int writePermission = 16842760; // 0x1010008 field public static final int writePermission = 16842760; // 0x1010008 field public static final int x = 16842924; // 0x10100ac field public static final int x = 16842924; // 0x10100ac field public static final int xlargeScreens = 16843455; // 0x10102bf field public static final int xlargeScreens = 16843455; // 0x10102bf Loading Loading @@ -1758,10 +1760,12 @@ package android { field public static final int Theme_DeviceDefault_Light_NoActionBar = 16974124; // 0x103012c field public static final int Theme_DeviceDefault_Light_NoActionBar = 16974124; // 0x103012c field public static final int Theme_DeviceDefault_Light_NoActionBar_Fullscreen = 16974125; // 0x103012d field public static final int Theme_DeviceDefault_Light_NoActionBar_Fullscreen = 16974125; // 0x103012d field public static final int Theme_DeviceDefault_Light_NoActionBar_Overscan = 16974304; // 0x10301e0 field public static final int Theme_DeviceDefault_Light_NoActionBar_Overscan = 16974304; // 0x10301e0 field public static final int Theme_DeviceDefault_Light_NoActionBar_TranslucentDecor = 16974308; // 0x10301e4 field public static final int Theme_DeviceDefault_Light_Panel = 16974139; // 0x103013b field public static final int Theme_DeviceDefault_Light_Panel = 16974139; // 0x103013b field public static final int Theme_DeviceDefault_NoActionBar = 16974121; // 0x1030129 field public static final int Theme_DeviceDefault_NoActionBar = 16974121; // 0x1030129 field public static final int Theme_DeviceDefault_NoActionBar_Fullscreen = 16974122; // 0x103012a field public static final int Theme_DeviceDefault_NoActionBar_Fullscreen = 16974122; // 0x103012a field public static final int Theme_DeviceDefault_NoActionBar_Overscan = 16974303; // 0x10301df field public static final int Theme_DeviceDefault_NoActionBar_Overscan = 16974303; // 0x10301df field public static final int Theme_DeviceDefault_NoActionBar_TranslucentDecor = 16974307; // 0x10301e3 field public static final int Theme_DeviceDefault_Panel = 16974138; // 0x103013a field public static final int Theme_DeviceDefault_Panel = 16974138; // 0x103013a field public static final int Theme_DeviceDefault_Wallpaper = 16974140; // 0x103013c field public static final int Theme_DeviceDefault_Wallpaper = 16974140; // 0x103013c field public static final int Theme_DeviceDefault_Wallpaper_NoTitleBar = 16974141; // 0x103013d field public static final int Theme_DeviceDefault_Wallpaper_NoTitleBar = 16974141; // 0x103013d Loading @@ -1785,10 +1789,12 @@ package android { field public static final int Theme_Holo_Light_NoActionBar = 16974064; // 0x10300f0 field public static final int Theme_Holo_Light_NoActionBar = 16974064; // 0x10300f0 field public static final int Theme_Holo_Light_NoActionBar_Fullscreen = 16974065; // 0x10300f1 field public static final int Theme_Holo_Light_NoActionBar_Fullscreen = 16974065; // 0x10300f1 field public static final int Theme_Holo_Light_NoActionBar_Overscan = 16974302; // 0x10301de field public static final int Theme_Holo_Light_NoActionBar_Overscan = 16974302; // 0x10301de field public static final int Theme_Holo_Light_NoActionBar_TranslucentDecor = 16974306; // 0x10301e2 field public static final int Theme_Holo_Light_Panel = 16973948; // 0x103007c field public static final int Theme_Holo_Light_Panel = 16973948; // 0x103007c field public static final int Theme_Holo_NoActionBar = 16973932; // 0x103006c field public static final int Theme_Holo_NoActionBar = 16973932; // 0x103006c field public static final int Theme_Holo_NoActionBar_Fullscreen = 16973933; // 0x103006d field public static final int Theme_Holo_NoActionBar_Fullscreen = 16973933; // 0x103006d field public static final int Theme_Holo_NoActionBar_Overscan = 16974301; // 0x10301dd field public static final int Theme_Holo_NoActionBar_Overscan = 16974301; // 0x10301dd field public static final int Theme_Holo_NoActionBar_TranslucentDecor = 16974305; // 0x10301e1 field public static final int Theme_Holo_Panel = 16973947; // 0x103007b field public static final int Theme_Holo_Panel = 16973947; // 0x103007b field public static final int Theme_Holo_Wallpaper = 16973949; // 0x103007d field public static final int Theme_Holo_Wallpaper = 16973949; // 0x103007d field public static final int Theme_Holo_Wallpaper_NoTitleBar = 16973950; // 0x103007e field public static final int Theme_Holo_Wallpaper_NoTitleBar = 16973950; // 0x103007e Loading Loading @@ -28395,8 +28401,6 @@ package android.view { field public static final int SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION = 512; // 0x200 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_LAYOUT_STABLE = 256; // 0x100 field public static final int SYSTEM_UI_FLAG_LOW_PROFILE = 1; // 0x1 field public static final int SYSTEM_UI_FLAG_LOW_PROFILE = 1; // 0x1 field public static final int SYSTEM_UI_FLAG_TRANSPARENT_NAVIGATION = 8192; // 0x2000 field public static final int SYSTEM_UI_FLAG_TRANSPARENT_STATUS = 4096; // 0x1000 field public static final int SYSTEM_UI_FLAG_VISIBLE = 0; // 0x0 field public static final int SYSTEM_UI_FLAG_VISIBLE = 0; // 0x0 field public static final int SYSTEM_UI_LAYOUT_FLAGS = 1536; // 0x600 field public static final int SYSTEM_UI_LAYOUT_FLAGS = 1536; // 0x600 field public static final int TEXT_ALIGNMENT_CENTER = 4; // 0x4 field public static final int TEXT_ALIGNMENT_CENTER = 4; // 0x4 Loading Loading @@ -29132,6 +29136,8 @@ package android.view { field public static final int FLAG_SHOW_WHEN_LOCKED = 524288; // 0x80000 field public static final int FLAG_SHOW_WHEN_LOCKED = 524288; // 0x80000 field public static final int FLAG_SPLIT_TOUCH = 8388608; // 0x800000 field public static final int FLAG_SPLIT_TOUCH = 8388608; // 0x800000 field public static final int FLAG_TOUCHABLE_WHEN_WAKING = 64; // 0x40 field public static final int FLAG_TOUCHABLE_WHEN_WAKING = 64; // 0x40 field public static final int FLAG_TRANSLUCENT_NAVIGATION = 134217728; // 0x8000000 field public static final int FLAG_TRANSLUCENT_STATUS = 67108864; // 0x4000000 field public static final int FLAG_TURN_SCREEN_ON = 2097152; // 0x200000 field public static final int FLAG_TURN_SCREEN_ON = 2097152; // 0x200000 field public static final int FLAG_WATCH_OUTSIDE_TOUCH = 262144; // 0x40000 field public static final int FLAG_WATCH_OUTSIDE_TOUCH = 262144; // 0x40000 field public static final int FORMAT_CHANGED = 8; // 0x8 field public static final int FORMAT_CHANGED = 8; // 0x8
core/java/android/view/View.java +22 −24 Original line number Original line Diff line number Diff line Loading @@ -2447,24 +2447,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ */ public static final int SYSTEM_UI_FLAG_IMMERSIVE = 0x00000800; public static final int SYSTEM_UI_FLAG_IMMERSIVE = 0x00000800; /** * Flag for {@link #setSystemUiVisibility(int)}: View would like the status bar to have * transparency. * * <p>The transparency request may be denied if the bar is in another mode with a specific * style, like {@link #SYSTEM_UI_FLAG_IMMERSIVE immersive mode}. */ public static final int SYSTEM_UI_FLAG_TRANSPARENT_STATUS = 0x00001000; /** * Flag for {@link #setSystemUiVisibility(int)}: View would like the navigation bar to have * transparency. * * <p>The transparency request may be denied if the bar is in another mode with a specific * style, like {@link #SYSTEM_UI_FLAG_IMMERSIVE immersive mode}. */ public static final int SYSTEM_UI_FLAG_TRANSPARENT_NAVIGATION = 0x00002000; /** /** * @deprecated Use {@link #SYSTEM_UI_FLAG_LOW_PROFILE} instead. * @deprecated Use {@link #SYSTEM_UI_FLAG_LOW_PROFILE} instead. */ */ Loading Loading @@ -2624,6 +2606,26 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ */ public static final int NAVIGATION_BAR_UNHIDE = 0x20000000; public static final int NAVIGATION_BAR_UNHIDE = 0x20000000; /** * @hide * * NOTE: This flag may only be used in subtreeSystemUiVisibility. It is masked * out of the public fields to keep the undefined bits out of the developer's way. * * Flag to specify that the status bar is displayed in translucent mode. */ public static final int STATUS_BAR_TRANSLUCENT = 0x40000000; /** * @hide * * NOTE: This flag may only be used in subtreeSystemUiVisibility. It is masked * out of the public fields to keep the undefined bits out of the developer's way. * * Flag to specify that the navigation bar is displayed in translucent mode. */ public static final int NAVIGATION_BAR_TRANSLUCENT = 0x80000000; /** /** * @hide * @hide */ */ Loading Loading @@ -16934,9 +16936,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @param visibility Bitwise-or of flags {@link #SYSTEM_UI_FLAG_LOW_PROFILE}, * @param visibility Bitwise-or of flags {@link #SYSTEM_UI_FLAG_LOW_PROFILE}, * {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION}, {@link #SYSTEM_UI_FLAG_FULLSCREEN}, * {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION}, {@link #SYSTEM_UI_FLAG_FULLSCREEN}, * {@link #SYSTEM_UI_FLAG_LAYOUT_STABLE}, {@link #SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION}, * {@link #SYSTEM_UI_FLAG_LAYOUT_STABLE}, {@link #SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION}, * {@link #SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}, {@link #SYSTEM_UI_FLAG_IMMERSIVE}, * {@link #SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}, and {@link #SYSTEM_UI_FLAG_IMMERSIVE}. * {@link #SYSTEM_UI_FLAG_TRANSPARENT_STATUS}, * and {@link #SYSTEM_UI_FLAG_TRANSPARENT_NAVIGATION}. */ */ public void setSystemUiVisibility(int visibility) { public void setSystemUiVisibility(int visibility) { if (visibility != mSystemUiVisibility) { if (visibility != mSystemUiVisibility) { Loading @@ -16952,9 +16952,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @return Bitwise-or of flags {@link #SYSTEM_UI_FLAG_LOW_PROFILE}, * @return Bitwise-or of flags {@link #SYSTEM_UI_FLAG_LOW_PROFILE}, * {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION}, {@link #SYSTEM_UI_FLAG_FULLSCREEN}, * {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION}, {@link #SYSTEM_UI_FLAG_FULLSCREEN}, * {@link #SYSTEM_UI_FLAG_LAYOUT_STABLE}, {@link #SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION}, * {@link #SYSTEM_UI_FLAG_LAYOUT_STABLE}, {@link #SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION}, * {@link #SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}, {@link #SYSTEM_UI_FLAG_IMMERSIVE}, * {@link #SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}, and {@link #SYSTEM_UI_FLAG_IMMERSIVE}. * {@link #SYSTEM_UI_FLAG_TRANSPARENT_STATUS}, * and {@link #SYSTEM_UI_FLAG_TRANSPARENT_NAVIGATION}. */ */ public int getSystemUiVisibility() { public int getSystemUiVisibility() { return mSystemUiVisibility; return mSystemUiVisibility;
core/java/android/view/ViewRootImpl.java +18 −0 Original line number Original line Diff line number Diff line Loading @@ -754,6 +754,11 @@ public final class ViewRootImpl implements ViewParent, attrs.systemUiVisibility = mWindowAttributes.systemUiVisibility; attrs.systemUiVisibility = mWindowAttributes.systemUiVisibility; attrs.subtreeSystemUiVisibility = mWindowAttributes.subtreeSystemUiVisibility; attrs.subtreeSystemUiVisibility = mWindowAttributes.subtreeSystemUiVisibility; mWindowAttributesChangesFlag = mWindowAttributes.copyFrom(attrs); mWindowAttributesChangesFlag = mWindowAttributes.copyFrom(attrs); if ((mWindowAttributesChangesFlag & WindowManager.LayoutParams.TRANSLUCENT_FLAGS_CHANGED) != 0) { // Recompute system ui visibility. mAttachInfo.mRecomputeGlobalAttributes = true; } if (mWindowAttributes.packageName == null) { if (mWindowAttributes.packageName == null) { mWindowAttributes.packageName = mBasePackageName; mWindowAttributes.packageName = mBasePackageName; } } Loading Loading @@ -1026,6 +1031,7 @@ public final class ViewRootImpl implements ViewParent, mView.dispatchCollectViewAttributes(attachInfo, 0); mView.dispatchCollectViewAttributes(attachInfo, 0); attachInfo.mSystemUiVisibility &= ~attachInfo.mDisabledSystemUiVisibility; attachInfo.mSystemUiVisibility &= ~attachInfo.mDisabledSystemUiVisibility; WindowManager.LayoutParams params = mWindowAttributes; WindowManager.LayoutParams params = mWindowAttributes; attachInfo.mSystemUiVisibility |= getImpliedSystemUiVisibility(params); if (attachInfo.mKeepScreenOn != oldScreenOn if (attachInfo.mKeepScreenOn != oldScreenOn || attachInfo.mSystemUiVisibility != params.subtreeSystemUiVisibility || attachInfo.mSystemUiVisibility != params.subtreeSystemUiVisibility || attachInfo.mHasSystemUiListeners != params.hasSystemUiListeners) { || attachInfo.mHasSystemUiListeners != params.hasSystemUiListeners) { Loading @@ -1039,6 +1045,18 @@ public final class ViewRootImpl implements ViewParent, return false; return false; } } private int getImpliedSystemUiVisibility(WindowManager.LayoutParams params) { int vis = 0; // Translucent decor window flags imply stable system ui visibility. if ((params.flags & WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS) != 0) { vis |= View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN; } if ((params.flags & WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION) != 0) { vis |= View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION; } return vis; } private boolean measureHierarchy(final View host, final WindowManager.LayoutParams lp, private boolean measureHierarchy(final View host, final WindowManager.LayoutParams lp, final Resources res, final int desiredWindowWidth, final int desiredWindowHeight) { final Resources res, final int desiredWindowWidth, final int desiredWindowHeight) { int childWidthMeasureSpec; int childWidthMeasureSpec; Loading
core/java/android/view/WindowManager.java +54 −1 Original line number Original line Diff line number Diff line Loading @@ -838,6 +838,44 @@ public interface WindowManager extends ViewManager { */ */ public static final int FLAG_LAYOUT_IN_OVERSCAN = 0x02000000; public static final int FLAG_LAYOUT_IN_OVERSCAN = 0x02000000; /** * Window flag: request a translucent status bar with minimal system-provided * background protection. * * <p>This flag can be controlled in your theme through the * {@link android.R.attr#windowTranslucentStatus} attribute; this attribute * is automatically set for you in the standard translucent decor themes * such as * {@link android.R.style#Theme_Holo_NoActionBar_TranslucentDecor}, * {@link android.R.style#Theme_Holo_Light_NoActionBar_TranslucentDecor}, * {@link android.R.style#Theme_DeviceDefault_NoActionBar_TranslucentDecor}, and * {@link android.R.style#Theme_DeviceDefault_Light_NoActionBar_TranslucentDecor}.</p> * * <p>When this flag is enabled for a window, it automatically sets * the system UI visibility flags {@link View#SYSTEM_UI_FLAG_LAYOUT_STABLE} and * {@link View#SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}.</p> */ public static final int FLAG_TRANSLUCENT_STATUS = 0x04000000; /** * Window flag: request a translucent navigation bar with minimal system-provided * background protection. * * <p>This flag can be controlled in your theme through the * {@link android.R.attr#windowTranslucentNavigation} attribute; this attribute * is automatically set for you in the standard translucent decor themes * such as * {@link android.R.style#Theme_Holo_NoActionBar_TranslucentDecor}, * {@link android.R.style#Theme_Holo_Light_NoActionBar_TranslucentDecor}, * {@link android.R.style#Theme_DeviceDefault_NoActionBar_TranslucentDecor}, and * {@link android.R.style#Theme_DeviceDefault_Light_NoActionBar_TranslucentDecor}.</p> * * <p>When this flag is enabled for a window, it automatically sets * the system UI visibility flags {@link View#SYSTEM_UI_FLAG_LAYOUT_STABLE} and * {@link View#SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION}.</p> */ public static final int FLAG_TRANSLUCENT_NAVIGATION = 0x08000000; // ----- HIDDEN FLAGS. // ----- HIDDEN FLAGS. // These start at the high bit and go down. // These start at the high bit and go down. Loading Loading @@ -956,7 +994,11 @@ public interface WindowManager extends ViewManager { @ViewDebug.FlagToString(mask = FLAG_HARDWARE_ACCELERATED, equals = FLAG_HARDWARE_ACCELERATED, @ViewDebug.FlagToString(mask = FLAG_HARDWARE_ACCELERATED, equals = FLAG_HARDWARE_ACCELERATED, name = "FLAG_HARDWARE_ACCELERATED"), name = "FLAG_HARDWARE_ACCELERATED"), @ViewDebug.FlagToString(mask = FLAG_LOCAL_FOCUS_MODE, equals = FLAG_LOCAL_FOCUS_MODE, @ViewDebug.FlagToString(mask = FLAG_LOCAL_FOCUS_MODE, equals = FLAG_LOCAL_FOCUS_MODE, name = "FLAG_LOCAL_FOCUS_MODE") name = "FLAG_LOCAL_FOCUS_MODE"), @ViewDebug.FlagToString(mask = FLAG_TRANSLUCENT_STATUS, equals = FLAG_TRANSLUCENT_STATUS, name = "FLAG_TRANSLUCENT_STATUS"), @ViewDebug.FlagToString(mask = FLAG_TRANSLUCENT_NAVIGATION, equals = FLAG_TRANSLUCENT_NAVIGATION, name = "FLAG_TRANSLUCENT_NAVIGATION") }) }) public int flags; public int flags; Loading Loading @@ -1046,6 +1088,11 @@ public interface WindowManager extends ViewManager { * {@hide} */ * {@hide} */ public static final int PRIVATE_FLAG_SYSTEM_ERROR = 0x00000100; public static final int PRIVATE_FLAG_SYSTEM_ERROR = 0x00000100; /** Window flag: maintain the previous transparent decor state when this window * becomes top-most. * {@hide} */ public static final int PRIVATE_FLAG_INHERIT_TRANSLUCENT_DECOR = 0x00000200; /** /** * Control flags that are private to the platform. * Control flags that are private to the platform. * @hide * @hide Loading Loading @@ -1576,6 +1623,8 @@ public interface WindowManager extends ViewManager { /** {@hide} */ /** {@hide} */ public static final int USER_ACTIVITY_TIMEOUT_CHANGED = 1<<18; public static final int USER_ACTIVITY_TIMEOUT_CHANGED = 1<<18; /** {@hide} */ /** {@hide} */ public static final int TRANSLUCENT_FLAGS_CHANGED = 1<<19; /** {@hide} */ public static final int EVERYTHING_CHANGED = 0xffffffff; public static final int EVERYTHING_CHANGED = 0xffffffff; // internal buffer to backup/restore parameters under compatibility mode. // internal buffer to backup/restore parameters under compatibility mode. Loading Loading @@ -1621,6 +1670,10 @@ public interface WindowManager extends ViewManager { changes |= TYPE_CHANGED; changes |= TYPE_CHANGED; } } if (flags != o.flags) { if (flags != o.flags) { final int diff = flags ^ o.flags; if ((diff & (FLAG_TRANSLUCENT_STATUS | FLAG_TRANSLUCENT_NAVIGATION)) != 0) { changes |= TRANSLUCENT_FLAGS_CHANGED; } flags = o.flags; flags = o.flags; changes |= FLAGS_CHANGED; changes |= FLAGS_CHANGED; } } Loading
core/res/res/values/attrs.xml +10 −0 Original line number Original line Diff line number Diff line Loading @@ -439,6 +439,14 @@ or later. --> or later. --> <attr name="windowCloseOnTouchOutside" format="boolean" /> <attr name="windowCloseOnTouchOutside" format="boolean" /> <!-- Flag indicating whether this window requests a translucent status bar. Corresponds to {@link android.view.WindowManager.LayoutParams#FLAG_TRANSLUCENT_STATUS}. --> <attr name="windowTranslucentStatus" format="boolean" /> <!-- Flag indicating whether this window requests a translucent navigation bar. Corresponds to {@link android.view.WindowManager.LayoutParams#FLAG_TRANSLUCENT_NAVIGATION}. --> <attr name="windowTranslucentNavigation" format="boolean" /> <!-- ============ --> <!-- ============ --> <!-- Alert Dialog styles --> <!-- Alert Dialog styles --> <!-- ============ --> <!-- ============ --> Loading Loading @@ -1594,6 +1602,8 @@ <attr name="windowSplitActionBar" /> <attr name="windowSplitActionBar" /> <attr name="windowEnableSplitTouch" /> <attr name="windowEnableSplitTouch" /> <attr name="windowCloseOnTouchOutside" /> <attr name="windowCloseOnTouchOutside" /> <attr name="windowTranslucentStatus" /> <attr name="windowTranslucentNavigation" /> <!-- The minimum width the window is allowed to be, along the major <!-- The minimum width the window is allowed to be, along the major axis of the screen. That is, when in landscape. Can be either axis of the screen. That is, when in landscape. Can be either an absolute dimension or a fraction of the screen size in that an absolute dimension or a fraction of the screen size in that Loading