diff options
| author | wilsonshih <wilsonshih@google.com> | 2019-10-18 18:39:46 +0800 |
|---|---|---|
| committer | Riddle Hsu <riddlehsu@google.com> | 2020-01-17 15:33:56 +0000 |
| commit | e832194dd0614a9c6f496e0f2ff03fd70f037462 (patch) | |
| tree | df530a8220ef23945d03d065a0f2d612307f4aef /core/java/android | |
| parent | 873cbc0e14a96cc7ca51a17e074aff168060d62b (diff) | |
Split status bar window (1/N)
This is the first step to create another new window for status bar.
Small window => TYPE_STATUS_BAR: The bar on top of screen.
Large window => TYPE_NOTIFICATION_SHADE: Anything else.
Bug: 136993073
Test: build then flash
Test: atest WmTests SystemUITests
Test: atest RegisterStatusBarResultTest InsetsFlagsTest
Manual Test:
- Bouncer can show when leave showWhenLocked activity.
- StatusBar can show when comes HUN in fullscreen mode.
- StatusBar can play enter/leave animation in fullscreen mode.
- Able to drag notification panel when bubble/glow existing.
- Switch to market launcher, and run above tests.
- Drag notification panel from launcher several times and observe it
works fine.
Change-Id: Id9f72cd0e21f01b50d57f02ea60f97c6460926b7
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/view/WindowManager.java | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java index f7d9706a9fce..59b0b44f558b 100644 --- a/core/java/android/view/WindowManager.java +++ b/core/java/android/view/WindowManager.java @@ -1131,6 +1131,15 @@ public interface WindowManager extends ViewManager { public static final int TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY = FIRST_SYSTEM_WINDOW + 39; /** + * Window type: the notification shade and keyguard. There can be only one status bar + * window; it is placed at the top of the screen, and all other + * windows are shifted down so they are below it. + * In multiuser systems shows on all users' windows. + * @hide + */ + public static final int TYPE_NOTIFICATION_SHADE = FIRST_SYSTEM_WINDOW + 40; + + /** * End of types of system windows. */ public static final int LAST_SYSTEM_WINDOW = 2999; @@ -1732,14 +1741,6 @@ public interface WindowManager extends ViewManager { public static final int PRIVATE_FLAG_SYSTEM_ERROR = 0x00000100; /** - * Flag whether the current window is a keyguard window, meaning that it will hide all other - * windows behind it except for windows with flag {@link #FLAG_SHOW_WHEN_LOCKED} set. - * Further, this can only be set by {@link LayoutParams#TYPE_STATUS_BAR}. - * {@hide} - */ - public static final int PRIVATE_FLAG_KEYGUARD = 0x00000400; - - /** * Flag that prevents the wallpaper behind the current window from receiving touch events. * * {@hide} @@ -1748,12 +1749,12 @@ public interface WindowManager extends ViewManager { /** * Flag to force the status bar window to be visible all the time. If the bar is hidden when - * this flag is set it will be shown again and the bar will have a transparent background. + * this flag is set it will be shown again. * This can only be set by {@link LayoutParams#TYPE_STATUS_BAR}. * * {@hide} */ - public static final int PRIVATE_FLAG_FORCE_STATUS_BAR_VISIBLE_TRANSPARENT = 0x00001000; + public static final int PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR = 0x00001000; /** * Flag indicating that the x, y, width, and height members should be @@ -1917,17 +1918,13 @@ public interface WindowManager extends ViewManager { equals = PRIVATE_FLAG_SYSTEM_ERROR, name = "SYSTEM_ERROR"), @ViewDebug.FlagToString( - mask = PRIVATE_FLAG_KEYGUARD, - equals = PRIVATE_FLAG_KEYGUARD, - name = "KEYGUARD"), - @ViewDebug.FlagToString( mask = PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS, equals = PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS, name = "DISABLE_WALLPAPER_TOUCH_EVENTS"), @ViewDebug.FlagToString( - mask = PRIVATE_FLAG_FORCE_STATUS_BAR_VISIBLE_TRANSPARENT, - equals = PRIVATE_FLAG_FORCE_STATUS_BAR_VISIBLE_TRANSPARENT, - name = "FORCE_STATUS_BAR_VISIBLE_TRANSPARENT"), + mask = PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR, + equals = PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR, + name = "FORCE_STATUS_BAR_VISIBLE"), @ViewDebug.FlagToString( mask = PRIVATE_FLAG_PRESERVE_GEOMETRY, equals = PRIVATE_FLAG_PRESERVE_GEOMETRY, |
