From 9c2aae6d959dc0f0b5fe1d413cac885ec779efb1 Mon Sep 17 00:00:00 2001 From: Robert Shih Date: Mon, 5 Apr 2021 13:03:50 -0700 Subject: [PATCH] MediaDrm#requiresSecureDecoder: Clarify mime type handling and result Bug: 181350499 Test: build Change-Id: I1b48dac58b2e47e28e83638e93cb989fd52f171d --- media/java/android/media/MediaDrm.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/media/java/android/media/MediaDrm.java b/media/java/android/media/MediaDrm.java index 10b99dce53b0d..66fe7d46fcaa8 100644 --- a/media/java/android/media/MediaDrm.java +++ b/media/java/android/media/MediaDrm.java @@ -2495,7 +2495,10 @@ public final class MediaDrm implements AutoCloseable { * The default security level is defined as the highest security level * supported on the device. * - * @param mime The mime type of the media data + * @param mime The mime type of the media data. Please use {@link + * #isCryptoSchemeSupported(UUID, String)} to query mime type support separately; + * for unsupported mime types the return value of {@link + * #requiresSecureDecoder(String)} is crypto scheme dependent. */ public boolean requiresSecureDecoder(@NonNull String mime) { return requiresSecureDecoder(mime, getMaxSecurityLevel()); @@ -2505,7 +2508,10 @@ public final class MediaDrm implements AutoCloseable { * Query if the crypto scheme requires the use of a secure decoder * to decode data of the given mime type at the given security level. * - * @param mime The mime type of the media data + * @param mime The mime type of the media data. Please use {@link + * #isCryptoSchemeSupported(UUID, String, int)} to query mime type support + * separately; for unsupported mime types the return value of {@link + * #requiresSecureDecoder(String, int)} is crypto scheme dependent. * @param level a security level between {@link #SECURITY_LEVEL_SW_SECURE_CRYPTO} * and {@link #SECURITY_LEVEL_HW_SECURE_ALL}. Otherwise the special value * {@link #getMaxSecurityLevel()} is also permitted;