diff options
| author | Phil Weaver <pweaver@google.com> | 2017-07-18 21:23:16 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-07-18 21:23:16 +0000 |
| commit | 0b0834fbe8d71e46a7372a0c6737d440cd1dc533 (patch) | |
| tree | 54311354e395c216cdf5f5d606efe9f4d59bfff9 /core/java | |
| parent | bbb567757f97f619d621531bf7e6c8553a484366 (diff) | |
| parent | 7a237059c6d500f7f8005f90bba96427eb499265 (diff) | |
Merge "Back-port fixes for b/62196835" into nyc-dev
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 fe2423093c88..dfeeb1aa26ca 100644 --- a/core/java/android/view/WindowManager.java +++ b/core/java/android/view/WindowManager.java @@ -646,6 +646,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; @@ -1254,6 +1273,15 @@ public interface WindowManager extends ViewManager { public static final int PRIVATE_FLAG_SUSTAINED_PERFORMANCE_MODE = 0x00040000; /** + * 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 */ |
