diff options
| author | Phil Weaver <pweaver@google.com> | 2017-07-12 14:04:16 -0700 |
|---|---|---|
| committer | Phil Weaver <pweaver@google.com> | 2017-07-12 23:25:00 +0000 |
| commit | 24fdc53cfeb5ce060007ec38226caff65781fe30 (patch) | |
| tree | aaf34ac0c2a588f24f4d3d8441226ea2e1503f9d /core/java | |
| parent | 9a4a34afd801b075228795382a63b690765ee977 (diff) | |
DO NOT MERGE Back-port fixes for b/62196835
Bug: 62196835
Test: Created an accessibility service that displays a system
and a toast overlay, confirmed that it disappeared when we
reached the accessibility permission screen that uses this
flag.
Change-Id: Ic51ead670fc480e549512ba1d02f49d9c13bc3f0
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/view/WindowManager.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java index 47ee52e25116..3faaf3669f96 100644 --- a/core/java/android/view/WindowManager.java +++ b/core/java/android/view/WindowManager.java @@ -555,6 +555,25 @@ public interface WindowManager extends ViewManager { */ public static final int LAST_SYSTEM_WINDOW = 2999; + /** + * Return true if the window type is an alert window. + * + * @param type The window type. + * @return If the window type is an alert window. + * @hide + */ + public static boolean isSystemAlertWindowType(int type) { + switch (type) { + case TYPE_PHONE: + case TYPE_PRIORITY_PHONE: + case TYPE_SYSTEM_ALERT: + case TYPE_SYSTEM_ERROR: + case TYPE_SYSTEM_OVERLAY: + return true; + } + return false; + } + /** @deprecated this is ignored, this value is set automatically when needed. */ @Deprecated public static final int MEMORY_TYPE_NORMAL = 0; @@ -1116,6 +1135,15 @@ public interface WindowManager extends ViewManager { public static final int PRIVATE_FLAG_KEYGUARD = 0x00000400; /** + * 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_HIDE_NON_SYSTEM_OVERLAY_WINDOWS = 0x00080000; + + /** * Control flags that are private to the platform. * @hide */ |
