diff --git a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/drm/ExoMediaDrm.java b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/drm/ExoMediaDrm.java index 9bd4205a7d..3d41aa667f 100644 --- a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/drm/ExoMediaDrm.java +++ b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/drm/ExoMediaDrm.java @@ -523,6 +523,40 @@ public interface ExoMediaDrm { */ void restoreKeys(byte[] sessionId, byte[] keySetId); + /** + * Removes an offline license. + * + *
This method is generally not needed, and should only be used if the preferred approach of + * generating a license release request by passing {@link #KEY_TYPE_RELEASE} to {@link + * #getKeyRequest} is not possible. + * + *
This is an optional method, and some implementations may only support it on certain Android + * API levels. + * + *
See {@link MediaDrm#removeOfflineLicense(byte[])} for more details. + * + * @param keySetId The {@code keySetId} of the license to remove. + * @throws UnsupportedOperationException if the implementation doesn't support this method. + */ + default void removeOfflineLicense(byte[] keySetId) { + throw new UnsupportedOperationException(); + } + + /** + * Returns a list of the {@code keySetIds} for all offline licenses. + * + *
This is an optional method, and some implementations may only support it on certain Android + * API levels. + * + *
See {@link MediaDrm#getOfflineLicenseKeySetIds()} for more details.
+ *
+ * @return The list of {@code keySetIds} for all offline licenses.
+ * @throws UnsupportedOperationException if the implementation doesn't support this method.
+ */
+ default List