diff options
author | Ian Baker <ibaker@google.com> | 2022-10-18 17:03:26 +0000 |
---|---|---|
committer | Ian Baker <ibaker@google.com> | 2022-10-18 17:03:31 +0000 |
commit | 07f35e7e2ba8e485701401fa1a610e02ae9c900c (patch) | |
tree | 03164d6b913aed52fa48823b1aab2a7425ebec38 | |
parent | 14e32e179eadb590e29cdb0bc4257dd5b03576ca (diff) | |
download | base-07f35e7e2ba8e485701401fa1a610e02ae9c900c.tar.gz |
Clarify that MediaCrypto.setMediaDrmSession cannot switch DRM schemes
Bug: 244832508
Change-Id: I88cf4936554731354e326890ea7b66143c8d7c15
-rw-r--r-- | media/java/android/media/MediaCrypto.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/media/java/android/media/MediaCrypto.java b/media/java/android/media/MediaCrypto.java index 889a5f7efbb2..1930262ea253 100644 --- a/media/java/android/media/MediaCrypto.java +++ b/media/java/android/media/MediaCrypto.java @@ -75,14 +75,17 @@ public final class MediaCrypto { public final native boolean requiresSecureDecoderComponent(@NonNull String mime); /** - * Associate a MediaDrm session with this MediaCrypto instance. The - * MediaDrm session is used to securely load decryption keys for a - * crypto scheme. The crypto keys loaded through the MediaDrm session + * Associate a new MediaDrm session with this MediaCrypto instance. + * + * <p>The MediaDrm session is used to securely load decryption keys for a + * crypto scheme. The crypto keys loaded through the MediaDrm session * may be selected for use during the decryption operation performed * by {@link android.media.MediaCodec#queueSecureInputBuffer} by specifying - * their key ids in the {@link android.media.MediaCodec.CryptoInfo#key} field. - * @param sessionId the MediaDrm sessionId to associate with this - * MediaCrypto instance + * their key IDs in the {@link android.media.MediaCodec.CryptoInfo#key} field. + * + * @param sessionId The MediaDrm sessionId to associate with this MediaCrypto + * instance. The session's scheme must match the scheme UUID used when + * constructing this MediaCrypto instance. * @throws MediaCryptoException on failure to set the sessionId */ public final native void setMediaDrmSession(@NonNull byte[] sessionId) |