diff options
| author | 2019-03-21 21:17:31 +0000 | |
|---|---|---|
| committer | 2019-03-21 21:17:31 +0000 | |
| commit | ff002f54d4d197c479b9013ff0c1d52be153a141 (patch) | |
| tree | 1b1ccbca3ef0207dd1935912ed95e3eb5aa0cb54 | |
| parent | 4a7bb6e115d29879ffdee4958ae5660a17cbcf52 (diff) | |
| parent | 90f97fe26db78b2e005956585b49aac337f50f15 (diff) | |
Merge changes I96cf4d06,Ic706c0d1
* changes:
WM: Change Z-Order of internal TYPE_SYSTEM_ALERT windows to be higher than TYPE_APPLICATION_OVERLAY
Revert "WM: Switch to using APPLICATION_OVERLAY window type for ErrorDialogs"
4 files changed, 8 insertions, 9 deletions
diff --git a/services/core/java/com/android/server/am/BaseErrorDialog.java b/services/core/java/com/android/server/am/BaseErrorDialog.java index dc9a4bf1ad94..aabb5877764e 100644 --- a/services/core/java/com/android/server/am/BaseErrorDialog.java +++ b/services/core/java/com/android/server/am/BaseErrorDialog.java @@ -16,6 +16,8 @@ package com.android.server.am; +import com.android.internal.R; + import android.app.AlertDialog; import android.content.Context; import android.os.Handler; @@ -24,8 +26,6 @@ import android.view.KeyEvent; import android.view.WindowManager; import android.widget.Button; -import com.android.internal.R; - public class BaseErrorDialog extends AlertDialog { private static final int ENABLE_BUTTONS = 0; private static final int DISABLE_BUTTONS = 1; @@ -36,7 +36,7 @@ public class BaseErrorDialog extends AlertDialog { super(context, com.android.internal.R.style.Theme_DeviceDefault_Dialog_AppError); context.assertRuntimeOverlayThemable(); - getWindow().setType(WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY); + getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT); getWindow().setFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM, WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM); WindowManager.LayoutParams attrs = getWindow().getAttributes(); diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index 1f898409af34..5a32aa0539ec 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -2522,7 +2522,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { } private static final int[] WINDOW_TYPES_WHERE_HOME_DOESNT_WORK = { - WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY, WindowManager.LayoutParams.TYPE_SYSTEM_ALERT, WindowManager.LayoutParams.TYPE_SYSTEM_ERROR, }; diff --git a/services/core/java/com/android/server/policy/WindowManagerPolicy.java b/services/core/java/com/android/server/policy/WindowManagerPolicy.java index 2af234252e0f..b196754796e9 100644 --- a/services/core/java/com/android/server/policy/WindowManagerPolicy.java +++ b/services/core/java/com/android/server/policy/WindowManagerPolicy.java @@ -829,9 +829,11 @@ 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 canAddInternalSystemWindow ? 13 : 12; + return 12; case TYPE_DREAM: // used for Dreams (screensavers with TYPE_DREAM windows) return 14; diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java index ba1dfbba06f8..ff4e2564a696 100644 --- a/services/core/java/com/android/server/wm/DisplayPolicy.java +++ b/services/core/java/com/android/server/wm/DisplayPolicy.java @@ -59,7 +59,6 @@ import static android.view.WindowManager.LayoutParams.ROTATION_ANIMATION_SEAMLES import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING; import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE; import static android.view.WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST; -import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION; import static android.view.WindowManager.LayoutParams.TYPE_BOOT_PROGRESS; import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER; @@ -2067,8 +2066,7 @@ public class DisplayPolicy { of.set(displayFrames.mRestricted); df.set(displayFrames.mRestricted); pf.set(displayFrames.mRestricted); - } else if (type == TYPE_TOAST || type == TYPE_SYSTEM_ALERT - || type == TYPE_APPLICATION_OVERLAY) { + } else if (type == TYPE_TOAST || type == TYPE_SYSTEM_ALERT) { // These dialogs are stable to interim decor changes. cf.set(displayFrames.mStable); of.set(displayFrames.mStable); |