diff options
| author | Wale Ogunwale <ogunwale@google.com> | 2017-06-30 07:07:01 -0700 |
|---|---|---|
| committer | Wale Ogunwale <ogunwale@google.com> | 2017-06-30 14:27:38 -0700 |
| commit | 01ad4345f92080439a5ccde9cb085f3f90d8709b (patch) | |
| tree | 61e07f83e4af2ac29170f2860ba68650f6a68ce2 /core/java/android/view/WindowManager.java | |
| parent | 37f5f54ebe064bac71e5fb17e3e13b5d25fd435c (diff) | |
Added PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS window flag.
When a window with this flag is visible, then any other window added
by an application process that requires OP_SYSTEM_ALERT_WINDOW
permission or that are of TYPE_TOAST will be hidden.
Bug: 62196835
Test: go/wm-smoke
Test: Added the new flag to the RecentsActivity onCreate, launched FB
chat heads and observed the head head become invisible when Recents is
visible and the chat head become visible when Recents is no longer
visible.
Change-Id: I1a3e3c5b1696a5f5b95eac187acb5a03863b4a0b
Diffstat (limited to 'core/java/android/view/WindowManager.java')
| -rw-r--r-- | core/java/android/view/WindowManager.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java index 3fd459958ed4..050aa4d66c14 100644 --- a/core/java/android/view/WindowManager.java +++ b/core/java/android/view/WindowManager.java @@ -1403,15 +1403,14 @@ public interface WindowManager extends ViewManager { public static final int PRIVATE_FLAG_SUSTAINED_PERFORMANCE_MODE = 0x00040000; /** - * Flag to indicate that this window is used as a task snapshot window. A task snapshot - * window is a starting window that gets shown with a screenshot from the previous state - * that is active until the app has drawn its first frame. - * - * <p>If this flag is set, SystemUI flags are ignored such that the real window behind can - * set the SystemUI flags. + * Flag to indicate that any window added by an application process that is of type + * {@link #TYPE_TOAST} or that requires + * {@link android.app.AppOpsManager#OP_SYSTEM_ALERT_WINDOW} permission should be hidden when + * this window is visible. * @hide */ - public static final int PRIVATE_FLAG_TASK_SNAPSHOT = 0x00080000; + @RequiresPermission(android.Manifest.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS) + public static final int PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS = 0x00080000; /** * Flag to indicate that this window should be ignored when determining what parts of the |
