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

Commit 1800cfbe authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Notify deprecation of MediaDrm SecureStop APIs"

parents 81d0ad94 abb60236
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -21662,9 +21662,9 @@ package android.media {
    method @NonNull public byte[] getPropertyByteArray(String);
    method @NonNull public String getPropertyString(@NonNull String);
    method @NonNull public android.media.MediaDrm.ProvisionRequest getProvisionRequest();
    method @NonNull public byte[] getSecureStop(@NonNull byte[]);
    method @NonNull public java.util.List<byte[]> getSecureStopIds();
    method @NonNull public java.util.List<byte[]> getSecureStops();
    method @Deprecated @NonNull public byte[] getSecureStop(@NonNull byte[]);
    method @Deprecated @NonNull public java.util.List<byte[]> getSecureStopIds();
    method @Deprecated @NonNull public java.util.List<byte[]> getSecureStops();
    method @android.media.MediaDrm.SecurityLevel public int getSecurityLevel(@NonNull byte[]);
    method @NonNull public static java.util.List<java.util.UUID> getSupportedCryptoSchemes();
    method public static boolean isCryptoSchemeSupported(@NonNull java.util.UUID);
@@ -21677,11 +21677,11 @@ package android.media {
    method @NonNull public java.util.HashMap<java.lang.String,java.lang.String> queryKeyStatus(@NonNull byte[]);
    method @Deprecated public void release();
    method @Deprecated public void releaseAllSecureStops();
    method public void releaseSecureStops(@NonNull byte[]);
    method public void removeAllSecureStops();
    method @Deprecated public void releaseSecureStops(@NonNull byte[]);
    method @Deprecated public void removeAllSecureStops();
    method public void removeKeys(@NonNull byte[]);
    method public void removeOfflineLicense(@NonNull byte[]);
    method public void removeSecureStop(@NonNull byte[]);
    method @Deprecated public void removeSecureStop(@NonNull byte[]);
    method public boolean requiresSecureDecoder(@NonNull String);
    method public boolean requiresSecureDecoder(@NonNull String, @android.media.MediaDrm.SecurityLevel int);
    method public void restoreKeys(@NonNull byte[], @NonNull byte[]);
+30 −1
Original line number Diff line number Diff line
@@ -41,9 +41,9 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.ref.WeakReference;
import java.nio.ByteBuffer;
import java.time.Instant;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Base64;
import java.util.HashMap;
@@ -1864,7 +1864,16 @@ public final class MediaDrm implements AutoCloseable {
     * <p>
     * Each secure stop has a unique ID that can be used to identify it during
     * enumeration, access and removal.
     *
     * @return a list of all secure stops from secure persistent memory
     * @deprecated This method is deprecated and may be removed in a future
     * release. Secure stops are a way to enforce limits on the number of
     * concurrent streams per subscriber across devices. They provide secure
     * monitoring of the lifetime of content decryption keys in MediaDrm
     * sessions. Limits on concurrent streams may also be enforced by
     * periodically renewing licenses. This can be achieved by calling
     * {@link #getKeyRequest} to initiate a renewal. MediaDrm users should
     * transition away from secure stops to periodic renewals.
     */
    @NonNull
    public native List<byte[]> getSecureStops();
@@ -1875,6 +1884,10 @@ public final class MediaDrm implements AutoCloseable {
     * secure stop.
     *
     * @return a list of secure stop IDs
     * @deprecated This method is deprecated and may be removed in a future
     * release. Use renewals by calling {@link #getKeyRequest} to track
     * concurrent playback. See additional information in
     * {@link #getSecureStops}
     */
    @NonNull
    public native List<byte[]> getSecureStopIds();
@@ -1885,6 +1898,10 @@ public final class MediaDrm implements AutoCloseable {
     *
     * @param ssid the ID of the secure stop to return
     * @return the secure stop identified by ssid
     * @deprecated This method is deprecated and may be removed in a future
     * release. Use renewals by calling {@link #getKeyRequest} to track
     * concurrent playback. See additional information in
     * {@link #getSecureStops}
     */
    @NonNull
    public native byte[] getSecureStop(@NonNull byte[] ssid);
@@ -1895,6 +1912,10 @@ public final class MediaDrm implements AutoCloseable {
     * response.
     *
     * @param ssRelease the server response indicating which secure stops to release
     * @deprecated This method is deprecated and may be removed in a future
     * release. Use renewals by calling {@link #getKeyRequest} to track
     * concurrent playback. See additional information in
     * {@link #getSecureStops}
     */
    public native void releaseSecureStops(@NonNull byte[] ssRelease);

@@ -1902,6 +1923,10 @@ public final class MediaDrm implements AutoCloseable {
     * Remove a specific secure stop without requiring a secure stop release message
     * from the license server.
     * @param ssid the ID of the secure stop to remove
     * @deprecated This method is deprecated and may be removed in a future
     * release. Use renewals by calling {@link #getKeyRequest} to track
     * concurrent playback. See additional information in
     * {@link #getSecureStops}
     */
    public native void removeSecureStop(@NonNull byte[] ssid);

@@ -1912,6 +1937,10 @@ public final class MediaDrm implements AutoCloseable {
     * This method was added in API 28. In API versions 18 through 27,
     * {@link #releaseAllSecureStops} should be called instead. There is no need to
     * do anything for API versions prior to 18.
     * @deprecated This method is deprecated and may be removed in a future
     * release. Use renewals by calling {@link #getKeyRequest} to track
     * concurrent playback. See additional information in
     * {@link #getSecureStops}
     */
    public native void removeAllSecureStops();