Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62e1a050 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Alert Windows behavioral changes"

parents c21f12d4 5cd907d3
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -45685,6 +45685,7 @@ package android.view {
    field public static final int TYPE_APPLICATION = 2; // 0x2
    field public static final int TYPE_APPLICATION_ATTACHED_DIALOG = 1003; // 0x3eb
    field public static final int TYPE_APPLICATION_MEDIA = 1001; // 0x3e9
    field public static final int TYPE_APPLICATION_OVERLAY = 2038; // 0x7f6
    field public static final int TYPE_APPLICATION_PANEL = 1000; // 0x3e8
    field public static final int TYPE_APPLICATION_STARTING = 3; // 0x3
    field public static final int TYPE_APPLICATION_SUB_PANEL = 1002; // 0x3ea
@@ -45694,17 +45695,17 @@ package android.view {
    field public static final int TYPE_INPUT_METHOD = 2011; // 0x7db
    field public static final int TYPE_INPUT_METHOD_DIALOG = 2012; // 0x7dc
    field public static final int TYPE_KEYGUARD_DIALOG = 2009; // 0x7d9
    field public static final int TYPE_PHONE = 2002; // 0x7d2
    field public static final int TYPE_PRIORITY_PHONE = 2007; // 0x7d7
    field public static final deprecated int TYPE_PHONE = 2002; // 0x7d2
    field public static final deprecated int TYPE_PRIORITY_PHONE = 2007; // 0x7d7
    field public static final int TYPE_PRIVATE_PRESENTATION = 2030; // 0x7ee
    field public static final int TYPE_SEARCH_BAR = 2001; // 0x7d1
    field public static final int TYPE_STATUS_BAR = 2000; // 0x7d0
    field public static final int TYPE_STATUS_BAR_PANEL = 2014; // 0x7de
    field public static final int TYPE_SYSTEM_ALERT = 2003; // 0x7d3
    field public static final deprecated int TYPE_SYSTEM_ALERT = 2003; // 0x7d3
    field public static final int TYPE_SYSTEM_DIALOG = 2008; // 0x7d8
    field public static final int TYPE_SYSTEM_ERROR = 2010; // 0x7da
    field public static final int TYPE_SYSTEM_OVERLAY = 2006; // 0x7d6
    field public static final int TYPE_TOAST = 2005; // 0x7d5
    field public static final deprecated int TYPE_SYSTEM_ERROR = 2010; // 0x7da
    field public static final deprecated int TYPE_SYSTEM_OVERLAY = 2006; // 0x7d6
    field public static final deprecated int TYPE_TOAST = 2005; // 0x7d5
    field public static final int TYPE_WALLPAPER = 2013; // 0x7dd
    field public float alpha;
    field public float buttonBrightness;
+7 −6
Original line number Diff line number Diff line
@@ -49094,6 +49094,7 @@ package android.view {
    field public static final int TYPE_APPLICATION = 2; // 0x2
    field public static final int TYPE_APPLICATION_ATTACHED_DIALOG = 1003; // 0x3eb
    field public static final int TYPE_APPLICATION_MEDIA = 1001; // 0x3e9
    field public static final int TYPE_APPLICATION_OVERLAY = 2038; // 0x7f6
    field public static final int TYPE_APPLICATION_PANEL = 1000; // 0x3e8
    field public static final int TYPE_APPLICATION_STARTING = 3; // 0x3
    field public static final int TYPE_APPLICATION_SUB_PANEL = 1002; // 0x3ea
@@ -49103,17 +49104,17 @@ package android.view {
    field public static final int TYPE_INPUT_METHOD = 2011; // 0x7db
    field public static final int TYPE_INPUT_METHOD_DIALOG = 2012; // 0x7dc
    field public static final int TYPE_KEYGUARD_DIALOG = 2009; // 0x7d9
    field public static final int TYPE_PHONE = 2002; // 0x7d2
    field public static final int TYPE_PRIORITY_PHONE = 2007; // 0x7d7
    field public static final deprecated int TYPE_PHONE = 2002; // 0x7d2
    field public static final deprecated int TYPE_PRIORITY_PHONE = 2007; // 0x7d7
    field public static final int TYPE_PRIVATE_PRESENTATION = 2030; // 0x7ee
    field public static final int TYPE_SEARCH_BAR = 2001; // 0x7d1
    field public static final int TYPE_STATUS_BAR = 2000; // 0x7d0
    field public static final int TYPE_STATUS_BAR_PANEL = 2014; // 0x7de
    field public static final int TYPE_SYSTEM_ALERT = 2003; // 0x7d3
    field public static final deprecated int TYPE_SYSTEM_ALERT = 2003; // 0x7d3
    field public static final int TYPE_SYSTEM_DIALOG = 2008; // 0x7d8
    field public static final int TYPE_SYSTEM_ERROR = 2010; // 0x7da
    field public static final int TYPE_SYSTEM_OVERLAY = 2006; // 0x7d6
    field public static final int TYPE_TOAST = 2005; // 0x7d5
    field public static final deprecated int TYPE_SYSTEM_ERROR = 2010; // 0x7da
    field public static final deprecated int TYPE_SYSTEM_OVERLAY = 2006; // 0x7d6
    field public static final deprecated int TYPE_TOAST = 2005; // 0x7d5
    field public static final int TYPE_WALLPAPER = 2013; // 0x7dd
    field public float alpha;
    field public float buttonBrightness;
+7 −6
Original line number Diff line number Diff line
@@ -45996,6 +45996,7 @@ package android.view {
    field public static final int TYPE_APPLICATION = 2; // 0x2
    field public static final int TYPE_APPLICATION_ATTACHED_DIALOG = 1003; // 0x3eb
    field public static final int TYPE_APPLICATION_MEDIA = 1001; // 0x3e9
    field public static final int TYPE_APPLICATION_OVERLAY = 2038; // 0x7f6
    field public static final int TYPE_APPLICATION_PANEL = 1000; // 0x3e8
    field public static final int TYPE_APPLICATION_STARTING = 3; // 0x3
    field public static final int TYPE_APPLICATION_SUB_PANEL = 1002; // 0x3ea
@@ -46005,17 +46006,17 @@ package android.view {
    field public static final int TYPE_INPUT_METHOD = 2011; // 0x7db
    field public static final int TYPE_INPUT_METHOD_DIALOG = 2012; // 0x7dc
    field public static final int TYPE_KEYGUARD_DIALOG = 2009; // 0x7d9
    field public static final int TYPE_PHONE = 2002; // 0x7d2
    field public static final int TYPE_PRIORITY_PHONE = 2007; // 0x7d7
    field public static final deprecated int TYPE_PHONE = 2002; // 0x7d2
    field public static final deprecated int TYPE_PRIORITY_PHONE = 2007; // 0x7d7
    field public static final int TYPE_PRIVATE_PRESENTATION = 2030; // 0x7ee
    field public static final int TYPE_SEARCH_BAR = 2001; // 0x7d1
    field public static final int TYPE_STATUS_BAR = 2000; // 0x7d0
    field public static final int TYPE_STATUS_BAR_PANEL = 2014; // 0x7de
    field public static final int TYPE_SYSTEM_ALERT = 2003; // 0x7d3
    field public static final deprecated int TYPE_SYSTEM_ALERT = 2003; // 0x7d3
    field public static final int TYPE_SYSTEM_DIALOG = 2008; // 0x7d8
    field public static final int TYPE_SYSTEM_ERROR = 2010; // 0x7da
    field public static final int TYPE_SYSTEM_OVERLAY = 2006; // 0x7d6
    field public static final int TYPE_TOAST = 2005; // 0x7d5
    field public static final deprecated int TYPE_SYSTEM_ERROR = 2010; // 0x7da
    field public static final deprecated int TYPE_SYSTEM_OVERLAY = 2006; // 0x7d6
    field public static final deprecated int TYPE_TOAST = 2005; // 0x7d5
    field public static final int TYPE_WALLPAPER = 2013; // 0x7dd
    field public float alpha;
    field public float buttonBrightness;
+1 −0
Original line number Diff line number Diff line
@@ -516,6 +516,7 @@ public class UserManager {
     * <li>{@link LayoutParams#TYPE_SYSTEM_ALERT}</li>
     * <li>{@link LayoutParams#TYPE_SYSTEM_ERROR}</li>
     * <li>{@link LayoutParams#TYPE_SYSTEM_OVERLAY}</li>
     * <li>{@link LayoutParams#TYPE_APPLICATION_OVERLAY}</li>
     *
     * <p>This can only be set by device owners and profile owners on the primary user.
     * The default value is <code>false</code>.
+49 −1
Original line number Diff line number Diff line
@@ -335,7 +335,9 @@ public interface WindowManager extends ViewManager {
                @ViewDebug.IntToString(from = TYPE_QS_DIALOG,
                        to = "TYPE_QS_DIALOG"),
                @ViewDebug.IntToString(from = TYPE_SCREENSHOT,
                        to = "TYPE_SCREENSHOT")
                        to = "TYPE_SCREENSHOT"),
                @ViewDebug.IntToString(from = TYPE_APPLICATION_OVERLAY,
                        to = "TYPE_APPLICATION_OVERLAY")
        })
        public int type;

@@ -462,14 +464,18 @@ public interface WindowManager extends ViewManager {
         * These windows are normally placed above all applications, but behind
         * the status bar.
         * In multiuser systems shows on all users' windows.
         * @deprecated for non-system apps. Use {@link #TYPE_APPLICATION_OVERLAY} instead.
         */
        @Deprecated
        public static final int TYPE_PHONE              = FIRST_SYSTEM_WINDOW+2;

        /**
         * Window type: system window, such as low power alert. These windows
         * are always on top of application windows.
         * In multiuser systems shows only on the owning user's window.
         * @deprecated for non-system apps. Use {@link #TYPE_APPLICATION_OVERLAY} instead.
         */
        @Deprecated
        public static final int TYPE_SYSTEM_ALERT       = FIRST_SYSTEM_WINDOW+3;

        /**
@@ -482,7 +488,9 @@ public interface WindowManager extends ViewManager {
        /**
         * Window type: transient notifications.
         * In multiuser systems shows only on the owning user's window.
         * @deprecated for non-system apps. Use {@link #TYPE_APPLICATION_OVERLAY} instead.
         */
        @Deprecated
        public static final int TYPE_TOAST              = FIRST_SYSTEM_WINDOW+5;

        /**
@@ -490,7 +498,9 @@ public interface WindowManager extends ViewManager {
         * on top of everything else.  These windows must not take input
         * focus, or they will interfere with the keyguard.
         * In multiuser systems shows only on the owning user's window.
         * @deprecated for non-system apps. Use {@link #TYPE_APPLICATION_OVERLAY} instead.
         */
        @Deprecated
        public static final int TYPE_SYSTEM_OVERLAY     = FIRST_SYSTEM_WINDOW+6;

        /**
@@ -498,7 +508,9 @@ public interface WindowManager extends ViewManager {
         * the keyguard is active.  These windows must not take input
         * focus, or they will interfere with the keyguard.
         * In multiuser systems shows on all users' windows.
         * @deprecated for non-system apps. Use {@link #TYPE_APPLICATION_OVERLAY} instead.
         */
        @Deprecated
        public static final int TYPE_PRIORITY_PHONE     = FIRST_SYSTEM_WINDOW+7;

        /**
@@ -517,7 +529,9 @@ public interface WindowManager extends ViewManager {
         * Window type: internal system error windows, appear on top of
         * everything they can.
         * In multiuser systems shows only on the owning user's window.
         * @deprecated for non-system apps. Use {@link #TYPE_APPLICATION_OVERLAY} instead.
         */
        @Deprecated
        public static final int TYPE_SYSTEM_ERROR       = FIRST_SYSTEM_WINDOW+10;

        /**
@@ -702,11 +716,45 @@ public interface WindowManager extends ViewManager {
         */
        public static final int TYPE_PRESENTATION = FIRST_SYSTEM_WINDOW + 37;

        /**
         * Window type: Application overlay windows are displayed above all activity windows
         * (types between {@link #FIRST_APPLICATION_WINDOW} and {@link #LAST_APPLICATION_WINDOW})
         * but below critical system windows like the status bar or IME.
         * <p>
         * The system may change the position, size, or visibility of these windows at anytime
         * to reduce visual clutter to the user and also manage resources.
         * <p>
         * Requires {@link android.Manifest.permission#SYSTEM_ALERT_WINDOW} permission.
         * <p>
         * In mult-iuser systems shows only on the owning user's screen.
         */
        public static final int TYPE_APPLICATION_OVERLAY = FIRST_SYSTEM_WINDOW + 38;

        /**
         * End of types of system windows.
         */
        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:
                case TYPE_APPLICATION_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;
Loading