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
@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;
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.
*/
public static final int LAST_SYSTEM_WINDOW = 2999;
case TYPE_DREAM:
case TYPE_INPUT_METHOD:
case TYPE_WALLPAPER:
+ case TYPE_PRIVATE_PRESENTATION:
// The window manager will check these.
break;
case TYPE_PHONE:
case TYPE_SYSTEM_DIALOG:
case TYPE_UNIVERSE_BACKGROUND:
case TYPE_VOLUME_OVERLAY:
+ case TYPE_PRIVATE_PRESENTATION:
break;
}
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;
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.
}
}
+ 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) {