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

Commit 709b9434 authored by Jeff Brown's avatar Jeff Brown Committed by Android Git Automerger
Browse files

am bcbe9cf4: Merge "Add new Display API for secure video capabilities." into jb-mr1-dev

* commit 'bcbe9cf4':
  Add new Display API for secure video capabilities.
parents 65e7f05c bcbe9cf4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -23714,6 +23714,7 @@ package android.view {
  public final class Display {
    method public void getCurrentSizeRange(android.graphics.Point, android.graphics.Point);
    method public int getDisplayId();
    method public int getFlags();
    method public deprecated int getHeight();
    method public void getMetrics(android.util.DisplayMetrics);
    method public java.lang.String getName();
@@ -23728,6 +23729,7 @@ package android.view {
    method public deprecated int getWidth();
    method public boolean isValid();
    field public static final int DEFAULT_DISPLAY = 0; // 0x0
    field public static final int FLAG_SUPPORTS_PROTECTED_BUFFERS = 1; // 0x1
  }
  public class DragEvent implements android.os.Parcelable {
+2 −0
Original line number Diff line number Diff line
@@ -23738,6 +23738,7 @@ package android.view {
  public final class Display {
    method public void getCurrentSizeRange(android.graphics.Point, android.graphics.Point);
    method public int getDisplayId();
    method public int getFlags();
    method public deprecated int getHeight();
    method public void getMetrics(android.util.DisplayMetrics);
    method public java.lang.String getName();
@@ -23752,6 +23753,7 @@ package android.view {
    method public deprecated int getWidth();
    method public boolean isValid();
    field public static final int DEFAULT_DISPLAY = 0; // 0x0
    field public static final int FLAG_SUPPORTS_PROTECTED_BUFFERS = 1; // 0x1
  }
  public class DragEvent implements android.os.Parcelable {
+14 −29
Original line number Diff line number Diff line
@@ -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) {
+2 −5
Original line number Diff line number Diff line
@@ -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();
    }
+14 −0
Original line number Diff line number Diff line
@@ -967,4 +967,18 @@
    <!-- Whether safe headphone volume is enabled or not (country specific). -->
    <bool name="config_safe_media_volume_enabled">true</bool>

    <!-- Set to true if the wifi display supports compositing content stored
         in gralloc protected buffers.  For this to be true, there must exist
         a protected hardware path for surface flinger to composite and send
         protected buffers to the wifi display video encoder.

         If this flag is false, we advise applications not to use protected
         buffers (if possible) when presenting content to a wifi display because
         the content may be blanked.

         This flag controls whether the {@link Display#FLAG_SUPPORTS_PROTECTED_BUFFERS}
         flag is set for wifi displays.
    -->
    <bool name="config_wifiDisplaySupportsProtectedBuffers">false</bool>

</resources>
Loading