summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2014-01-07 18:13:09 -0800
committerJeff Brown <jeffbrown@google.com>2014-01-07 19:30:07 -0800
commitd14c8c9039c0056e1f30ad5d410c8fde20d63df5 (patch)
tree747f90b656e028ae9281d0c7d79498ef32d14b61 /core/java
parent080d1bdd7f80ce4d68a99f5c3433bfc5f70d2e4b (diff)
downloadframeworks_base-d14c8c9039c0056e1f30ad5d410c8fde20d63df5.zip
frameworks_base-d14c8c9039c0056e1f30ad5d410c8fde20d63df5.tar.gz
frameworks_base-d14c8c9039c0056e1f30ad5d410c8fde20d63df5.tar.bz2
Add flag to force public virtual display to show own content.
Change-Id: I1039f2ef3154169ec90411a4c7ba2c94629f72c4
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/hardware/display/DisplayManager.java21
1 files changed, 19 insertions, 2 deletions
diff --git a/core/java/android/hardware/display/DisplayManager.java b/core/java/android/hardware/display/DisplayManager.java
index 093e0e9..a517bc5 100644
--- a/core/java/android/hardware/display/DisplayManager.java
+++ b/core/java/android/hardware/display/DisplayManager.java
@@ -115,6 +115,7 @@ public final class DisplayManager {
* </p>
*
* @see #createVirtualDisplay
+ * @see #VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY
*/
public static final int VIRTUAL_DISPLAY_FLAG_PUBLIC = 1 << 0;
@@ -171,6 +172,22 @@ public final class DisplayManager {
*/
public static final int VIRTUAL_DISPLAY_FLAG_SECURE = 1 << 2;
+ /**
+ * Virtual display flag: Only show this display's own content; do not mirror
+ * the content of another display.
+ *
+ * <p>
+ * This flag is used in conjunction with {@link #VIRTUAL_DISPLAY_FLAG_PUBLIC}.
+ * Ordinarily public virtual displays will automatically mirror the content of the
+ * default display if they have no windows of their own. When this flag is
+ * specified, the virtual display will only ever show its own content and
+ * will be blanked instead if it has no windows.
+ * </p>
+ *
+ * @see #createVirtualDisplay
+ */
+ public static final int VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY = 1 << 3;
+
/** @hide */
public DisplayManager(Context context) {
mContext = context;
@@ -429,8 +446,8 @@ public final class DisplayManager {
* @param surface The surface to which the content of the virtual display should
* be rendered, must be non-null.
* @param flags A combination of virtual display flags:
- * {@link #VIRTUAL_DISPLAY_FLAG_PUBLIC}, {@link #VIRTUAL_DISPLAY_FLAG_PRESENTATION}
- * or {@link #VIRTUAL_DISPLAY_FLAG_SECURE}.
+ * {@link #VIRTUAL_DISPLAY_FLAG_PUBLIC}, {@link #VIRTUAL_DISPLAY_FLAG_PRESENTATION},
+ * {@link #VIRTUAL_DISPLAY_FLAG_SECURE}, or {@link #VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY}.
* @return The newly created virtual display, or null if the application could
* not create the virtual display.
*