summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-10-01 21:07:03 -0700
committerJeff Brown <jeffbrown@google.com>2012-10-02 16:25:10 -0700
commit77aebfdbae489c3712ae3f9bca29d01fb1f09dc2 (patch)
tree5f3cf170ce629f5b2f74374ea4b21197ed7a841d /core/java
parent4253abbcfa3165ad7d06c4de97cd780c4e96f94a (diff)
downloadframeworks_base-77aebfdbae489c3712ae3f9bca29d01fb1f09dc2.zip
frameworks_base-77aebfdbae489c3712ae3f9bca29d01fb1f09dc2.tar.gz
frameworks_base-77aebfdbae489c3712ae3f9bca29d01fb1f09dc2.tar.bz2
Add new Display API for secure video capabilities.
Added a new API to determine whether the display supports protected buffers so that an application can choose a different content stream or change how it decodes the content so that it will be viewable on the display. At present, wifi display does not fully support protected buffers although this may be enhanced in the future. Bug: 6986623 Change-Id: If53a53d72b0ec92753cc4b29f99fcb131e00449b
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/view/Display.java43
-rw-r--r--core/java/android/view/DisplayInfo.java7
2 files changed, 16 insertions, 34 deletions
diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java
index cf58458..662dc45 100644
--- a/core/java/android/view/Display.java
+++ b/core/java/android/view/Display.java
@@ -79,38 +79,23 @@ public final class Display {
public static final int DEFAULT_DISPLAY = 0;
/**
- * Display flag: Indicates that the display supports secure video output.
+ * Display flag: Indicates that the display supports compositing content
+ * that is stored in protected graphics buffers.
* <p>
- * This flag is used to indicate that the display supports content protection
- * mechanisms for secure video output at the display interface, such as HDCP.
- * These mechanisms may be used to protect secure content as it leaves the device.
+ * Secure (DRM) video decoders may allocate protected graphics buffers to request that
+ * a hardware-protected path be provided between the video decoder and the external
+ * display sink. If a hardware-protected path is not available, then content stored
+ * in protected graphics buffers may not be composited.
* </p><p>
- * While mirroring content to multiple displays, it can happen that certain
- * display devices support secure video output while other display devices do not.
- * The secure content will be shown only on the display devices that support
- * secure video output and will be blanked on other display devices that do
- * not support secure video output.
- * </p><p>
- * This flag mainly applies to external display devices such as HDMI or
- * Wifi display. Built-in display devices are usually considered secure.
- * </p>
- *
- * @hide pending review
- */
- public static final int FLAG_SUPPORTS_SECURE_VIDEO_OUTPUT = 1 << 0;
-
- /**
- * Display flag: Indicates that the display supports secure in-memory video buffers.
- * <p>
- * This flag is used to indicate that the display supports content protection
- * mechanisms for in-memory video buffers, such as secure memory areas.
- * These mechanisms may be used to protect secure video buffers in memory from
- * the video decoder to the display compositor and the video interface.
+ * If this flag is not set, then the display device does not support compositing
+ * protected buffers; the user may see a blank region on the screen instead of
+ * the protected content. An application can use this flag as a hint that it should
+ * select an alternate content stream or adopt a different strategy for decoding
+ * content that does not rely on protected buffers so as to ensure that the user
+ * can view the content on the display as expected.
* </p>
- *
- * @hide pending review
*/
- public static final int FLAG_SUPPORTS_SECURE_VIDEO_BUFFERS = 1 << 1;
+ public static final int FLAG_SUPPORTS_PROTECTED_BUFFERS = 1 << 0;
/**
* Internal method to create a display.
@@ -196,7 +181,7 @@ public final class Display {
*
* @return The display flags.
*
- * @hide pending review
+ * @see #FLAG_SUPPORTS_PROTECTED_BUFFERS
*/
public int getFlags() {
synchronized (this) {
diff --git a/core/java/android/view/DisplayInfo.java b/core/java/android/view/DisplayInfo.java
index c968ec5..fe05634 100644
--- a/core/java/android/view/DisplayInfo.java
+++ b/core/java/android/view/DisplayInfo.java
@@ -299,11 +299,8 @@ public final class DisplayInfo implements Parcelable {
private static String flagsToString(int flags) {
StringBuilder result = new StringBuilder();
- if ((flags & Display.FLAG_SUPPORTS_SECURE_VIDEO_OUTPUT) != 0) {
- result.append(", FLAG_SUPPORTS_SECURE_VIDEO_OUTPUT");
- }
- if ((flags & Display.FLAG_SUPPORTS_SECURE_VIDEO_BUFFERS) != 0) {
- result.append(", FLAG_SUPPORTS_SECURE_VIDEO_BUFFERS");
+ if ((flags & Display.FLAG_SUPPORTS_PROTECTED_BUFFERS) != 0) {
+ result.append(", FLAG_SUPPORTS_PROTECTED_BUFFERS");
}
return result.toString();
}