diff options
| author | Wale Ogunwale <ogunwale@google.com> | 2019-12-23 12:56:51 -0800 |
|---|---|---|
| committer | Wale Ogunwale <ogunwale@google.com> | 2019-12-26 12:56:09 -0800 |
| commit | 194435b5a26628b0d13e3fa9f4226e96cd8601f3 (patch) | |
| tree | 76ac96304a498d90b2c56b3496712d0fcde32c58 /core/java/android/app/WindowConfiguration.java | |
| parent | e6b623842f69bfba25d35cc526e4dd468d5547e7 (diff) | |
Introduce WINDOWING_MODE_MULTI_WINDOW
Generic multi-window with no presentation attribution from the wm-core.
Needed for wm-shell to correctly drive multi-window cases like Bubbles
and n-way-split.
Current windowing modes split and freeform will probably be migrated to
this once wm-shell drives their presentation.
Test: N/A
Bug: 139371701
Change-Id: I5247f41b4f67d21b2bb5929a52e8ec93c41644c2
Diffstat (limited to 'core/java/android/app/WindowConfiguration.java')
| -rw-r--r-- | core/java/android/app/WindowConfiguration.java | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/core/java/android/app/WindowConfiguration.java b/core/java/android/app/WindowConfiguration.java index 1e4f8f3f5b66..6b40890e17c7 100644 --- a/core/java/android/app/WindowConfiguration.java +++ b/core/java/android/app/WindowConfiguration.java @@ -50,7 +50,7 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu /** * bounds that can differ from app bounds, which may include things such as insets. * - * TODO: Investigate combining with {@link mAppBounds}. Can the latter be a product of the + * TODO: Investigate combining with {@link #mAppBounds}. Can the latter be a product of the * former? */ private Rect mBounds = new Rect(); @@ -87,6 +87,7 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu /** Always on-top (always visible). of other siblings in its parent container. */ public static final int WINDOWING_MODE_PINNED = 2; /** The primary container driving the screen to be in split-screen mode. */ + // TODO: Remove once split-screen is migrated to wm-shell. public static final int WINDOWING_MODE_SPLIT_SCREEN_PRIMARY = 3; /** * The containers adjacent to the {@link #WINDOWING_MODE_SPLIT_SCREEN_PRIMARY} container in @@ -97,6 +98,7 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu * mode * @see #WINDOWING_MODE_FULLSCREEN_OR_SPLIT_SCREEN_SECONDARY */ + // TODO: Remove once split-screen is migrated to wm-shell. public static final int WINDOWING_MODE_SPLIT_SCREEN_SECONDARY = 4; /** * Alias for {@link #WINDOWING_MODE_SPLIT_SCREEN_SECONDARY} that makes it clear that the usage @@ -104,15 +106,20 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu * will launch into fullscreen or split-screen secondary depending on if the device is currently * in fullscreen mode or split-screen mode. */ + // TODO: Remove once split-screen is migrated to wm-shell. public static final int WINDOWING_MODE_FULLSCREEN_OR_SPLIT_SCREEN_SECONDARY = WINDOWING_MODE_SPLIT_SCREEN_SECONDARY; /** Can be freely resized within its parent container. */ + // TODO: Remove once freeform is migrated to wm-shell. public static final int WINDOWING_MODE_FREEFORM = 5; + /** Generic multi-window with no presentation attribution from the window manager. */ + public static final int WINDOWING_MODE_MULTI_WINDOW = 6; /** @hide */ @IntDef(prefix = { "WINDOWING_MODE_" }, value = { WINDOWING_MODE_UNDEFINED, WINDOWING_MODE_FULLSCREEN, + WINDOWING_MODE_MULTI_WINDOW, WINDOWING_MODE_PINNED, WINDOWING_MODE_SPLIT_SCREEN_PRIMARY, WINDOWING_MODE_SPLIT_SCREEN_SECONDARY, @@ -669,7 +676,7 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu * @hide */ public boolean hasWindowShadow() { - return tasksAreFloating(); + return mWindowingMode != WINDOWING_MODE_MULTI_WINDOW && tasksAreFloating(); } /** @@ -688,7 +695,8 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu * @hide */ public boolean canResizeTask() { - return mWindowingMode == WINDOWING_MODE_FREEFORM; + return mWindowingMode == WINDOWING_MODE_FREEFORM + || mWindowingMode == WINDOWING_MODE_MULTI_WINDOW; } /** Returns true if the task bounds should persist across power cycles. @@ -738,8 +746,9 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu * @hide */ public boolean isAlwaysOnTop() { - return mWindowingMode == WINDOWING_MODE_PINNED - || (mWindowingMode == WINDOWING_MODE_FREEFORM && mAlwaysOnTop == ALWAYS_ON_TOP_ON); + return mWindowingMode == WINDOWING_MODE_PINNED || (mAlwaysOnTop == ALWAYS_ON_TOP_ON + && (mWindowingMode == WINDOWING_MODE_FREEFORM + || mWindowingMode == WINDOWING_MODE_MULTI_WINDOW)); } /** @@ -797,6 +806,7 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu switch (windowingMode) { case WINDOWING_MODE_UNDEFINED: return "undefined"; case WINDOWING_MODE_FULLSCREEN: return "fullscreen"; + case WINDOWING_MODE_MULTI_WINDOW: return "multi-window"; case WINDOWING_MODE_PINNED: return "pinned"; case WINDOWING_MODE_SPLIT_SCREEN_PRIMARY: return "split-screen-primary"; case WINDOWING_MODE_SPLIT_SCREEN_SECONDARY: return "split-screen-secondary"; |
