Merge "Clarify that MediaCrypto.setMediaDrmSession cannot switch DRM schemes"

This commit is contained in:
Ian Baker
2022-10-19 09:58:49 +00:00
committed by Gerrit Code Review

View File

@@ -75,14 +75,17 @@ public final class MediaCrypto {
public final native boolean requiresSecureDecoderComponent(@NonNull String mime); public final native boolean requiresSecureDecoderComponent(@NonNull String mime);
/** /**
* Associate a MediaDrm session with this MediaCrypto instance. The * Associate a new MediaDrm session with this MediaCrypto instance.
* MediaDrm session is used to securely load decryption keys for a *
* crypto scheme. The crypto keys loaded through the MediaDrm session * <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 * may be selected for use during the decryption operation performed
* by {@link android.media.MediaCodec#queueSecureInputBuffer} by specifying * by {@link android.media.MediaCodec#queueSecureInputBuffer} by specifying
* their key ids in the {@link android.media.MediaCodec.CryptoInfo#key} field. * their key IDs in the {@link android.media.MediaCodec.CryptoInfo#key} field.
* @param sessionId the MediaDrm sessionId to associate with this *
* MediaCrypto instance * @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 * @throws MediaCryptoException on failure to set the sessionId
*/ */
public final native void setMediaDrmSession(@NonNull byte[] sessionId) public final native void setMediaDrmSession(@NonNull byte[] sessionId)