diff options
| author | Jeff Brown <jeffbrown@google.com> | 2012-09-13 11:45:07 -0700 |
|---|---|---|
| committer | Jeff Brown <jeffbrown@google.com> | 2012-09-13 11:45:07 -0700 |
| commit | c5df37c285221d0fb113f55b9e78b35632241d3f (patch) | |
| tree | d93875bc2e5d255aa455004ff0848835a92a14fc /core/java/android/view/Display.java | |
| parent | f69c812f49cb2dea296cd319984e58af026f4c3a (diff) | |
Add preliminary API for reporting display capabilities.
Change-Id: Ie18dce5b5d130f9a7cdfca08cddbf9b099312277
Diffstat (limited to 'core/java/android/view/Display.java')
| -rw-r--r-- | core/java/android/view/Display.java | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java index 8ac84f7ae641..01b37c81ca24 100644 --- a/core/java/android/view/Display.java +++ b/core/java/android/view/Display.java @@ -79,6 +79,40 @@ public final class Display { public static final int DEFAULT_DISPLAY = 0; /** + * Display flag: Indicates that the display supports secure video output. + * <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. + * </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 decrypted 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. + * </p> + * + * @hide pending review + */ + public static final int FLAG_SUPPORTS_SECURE_VIDEO_BUFFERS = 1 << 1; + + /** * Internal method to create a display. * Applications should use {@link android.view.WindowManager#getDefaultDisplay()} * or {@link android.hardware.display.DisplayManager#getDisplay} @@ -158,6 +192,20 @@ public final class Display { } /** + * Returns a combination of flags that describe the capabilities of the display. + * + * @return The display flags. + * + * @hide pending review + */ + public int getFlags() { + synchronized (this) { + updateDisplayInfoLocked(); + return mDisplayInfo.flags; + } + } + + /** * Gets the compatibility info used by this display instance. * * @return The compatibility info holder, or null if none is required. |
