From 90f97fe26db78b2e005956585b49aac337f50f15 Mon Sep 17 00:00:00 2001 From: Vishnu Nair Date: Wed, 20 Mar 2019 10:09:43 -0700 Subject: [PATCH] WM: Change Z-Order of internal TYPE_SYSTEM_ALERT windows to be higher than TYPE_APPLICATION_OVERLAY Bug: 128494358 Test: go/wm-smoke Test: run repro steps in b/128494358 Change-Id: I96cf4d06249745fdfb9ee27acc17677c1f36dadd --- .../com/android/server/policy/WindowManagerPolicy.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/services/core/java/com/android/server/policy/WindowManagerPolicy.java b/services/core/java/com/android/server/policy/WindowManagerPolicy.java index 5d0ae90c2e858..b196754796e9b 100644 --- a/services/core/java/com/android/server/policy/WindowManagerPolicy.java +++ b/services/core/java/com/android/server/policy/WindowManagerPolicy.java @@ -829,18 +829,20 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants { return 9; case TYPE_SYSTEM_ALERT: // like the ANR / app crashed dialogs - return canAddInternalSystemWindow ? 11 : 10; + // Type is deprecated for non-system apps. For system apps, this type should be + // in a higher layer than TYPE_APPLICATION_OVERLAY. + return canAddInternalSystemWindow ? 13 : 10; case TYPE_APPLICATION_OVERLAY: return 12; case TYPE_DREAM: // used for Dreams (screensavers with TYPE_DREAM windows) - return 13; + return 14; case TYPE_INPUT_METHOD: // on-screen keyboards and other such input method user interfaces go here. - return 14; + return 15; case TYPE_INPUT_METHOD_DIALOG: // on-screen keyboards and other such input method user interfaces go here. - return 15; + return 16; case TYPE_STATUS_BAR: return 17; case TYPE_STATUS_BAR_PANEL: