Merge "Clarify that MediaCrypto.setMediaDrmSession cannot switch DRM schemes" am: 258d8f6321

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2260581

Change-Id: I7cc050ac65a21bc96e0ffdb8714b2f9a96783b5c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Ian Baker
2022-10-19 10:49:07 +00:00
committed by Automerger Merge Worker

View File

@@ -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)