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

Commit 27116e35 authored by keunyoung's avatar keunyoung Committed by Android (Google) Code Review
Browse files

Merge "add TYPE_PRIVATE_PRESENTATION window type"

parents e5ff7d81 a446bf0e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -27836,6 +27836,7 @@ package android.view {
    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 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
+8 −1
Original line number Diff line number Diff line
@@ -219,7 +219,8 @@ public interface WindowManager extends ViewManager {
            @ViewDebug.IntToString(from = TYPE_DREAM, to = "TYPE_DREAM"),
            @ViewDebug.IntToString(from = TYPE_NAVIGATION_BAR_PANEL, to = "TYPE_NAVIGATION_BAR_PANEL"),
            @ViewDebug.IntToString(from = TYPE_DISPLAY_OVERLAY, to = "TYPE_DISPLAY_OVERLAY"),
            @ViewDebug.IntToString(from = TYPE_MAGNIFICATION_OVERLAY, to = "TYPE_MAGNIFICATION_OVERLAY")
            @ViewDebug.IntToString(from = TYPE_MAGNIFICATION_OVERLAY, to = "TYPE_MAGNIFICATION_OVERLAY"),
            @ViewDebug.IntToString(from = TYPE_PRIVATE_PRESENTATION, to = "TYPE_PRIVATE_PRESENTATION"),
        })
        public int type;
    
@@ -535,6 +536,12 @@ public interface WindowManager extends ViewManager {
         */
        public static final int TYPE_KEYGUARD_SCRIM           = FIRST_SYSTEM_WINDOW+29;

        /**
         * Window type: Window for Presentation on top of private
         * virtual display.
         */
        public static final int TYPE_PRIVATE_PRESENTATION = FIRST_SYSTEM_WINDOW+30;

        /**
         * End of types of system windows.
         */
+4 −0
Original line number Diff line number Diff line
@@ -1232,6 +1232,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            case TYPE_DREAM:
            case TYPE_INPUT_METHOD:
            case TYPE_WALLPAPER:
            case TYPE_PRIVATE_PRESENTATION:
                // The window manager will check these.
                break;
            case TYPE_PHONE:
@@ -1294,6 +1295,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            case TYPE_SYSTEM_DIALOG:
            case TYPE_UNIVERSE_BACKGROUND:
            case TYPE_VOLUME_OVERLAY:
            case TYPE_PRIVATE_PRESENTATION:
                break;
        }

@@ -1366,6 +1368,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        switch (type) {
        case TYPE_UNIVERSE_BACKGROUND:
            return 1;
        case TYPE_PRIVATE_PRESENTATION:
            return 2;
        case TYPE_WALLPAPER:
            // wallpaper is at the bottom, though the window manager may move it.
            return 2;
+4 −0
Original line number Diff line number Diff line
@@ -156,6 +156,10 @@ class DisplayContent {
        mStackHistory.add(toTop ? mStackHistory.size() : 0, stack);
    }

    public boolean isPrivate() {
        return (mDisplay.getFlags() & Display.FLAG_PRIVATE) != 0;
    }

    /**
     * Retrieve the tasks on this display in stack order from the bottommost TaskStack up.
     * @return All the Tasks, in order, on this display.
+5 −0
Original line number Diff line number Diff line
@@ -2137,6 +2137,11 @@ public class WindowManagerService extends IWindowManager.Stub
                }
            }

            if (type == TYPE_PRIVATE_PRESENTATION && !displayContent.isPrivate()) {
                Slog.w(TAG, "Attempted to add private presentation window to a non-private display.  Aborting.");
                return WindowManagerGlobal.ADD_PERMISSION_DENIED;
            }

            boolean addToken = false;
            WindowToken token = mTokenMap.get(attrs.token);
            if (token == null) {