mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Remove deprecated DrmSessionEventListener.onDrmSessionAcquired method.
#cherrypick PiperOrigin-RevId: 647620751
This commit is contained in:
parent
47b1ca18ed
commit
e392084c4d
@ -59,6 +59,7 @@
|
|||||||
* Remove deprecated symbols:
|
* Remove deprecated symbols:
|
||||||
* Remove deprecated `Player#hasPrevious` method. Use
|
* Remove deprecated `Player#hasPrevious` method. Use
|
||||||
`Player#hasPreviousMediaItem()` instead.
|
`Player#hasPreviousMediaItem()` instead.
|
||||||
|
* Remove deprecated `DrmSessionEventListener.onDrmSessionAcquired` method.
|
||||||
|
|
||||||
## 1.4
|
## 1.4
|
||||||
|
|
||||||
|
@ -30,12 +30,6 @@ import java.util.concurrent.CopyOnWriteArrayList;
|
|||||||
@UnstableApi
|
@UnstableApi
|
||||||
public interface DrmSessionEventListener {
|
public interface DrmSessionEventListener {
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Implement {@link #onDrmSessionAcquired(int, MediaPeriodId, int)} instead.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default void onDrmSessionAcquired(int windowIndex, @Nullable MediaPeriodId mediaPeriodId) {}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called each time a drm session is acquired.
|
* Called each time a drm session is acquired.
|
||||||
*
|
*
|
||||||
@ -160,18 +154,13 @@ public interface DrmSessionEventListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Dispatches {@link #onDrmSessionAcquired(int, MediaPeriodId, int)}. */
|
||||||
* Dispatches {@link #onDrmSessionAcquired(int, MediaPeriodId, int)} and {@link
|
|
||||||
* #onDrmSessionAcquired(int, MediaPeriodId)}.
|
|
||||||
*/
|
|
||||||
@SuppressWarnings("deprecation") // Calls deprecated listener method.
|
|
||||||
public void drmSessionAcquired(@DrmSession.State int state) {
|
public void drmSessionAcquired(@DrmSession.State int state) {
|
||||||
for (ListenerAndHandler listenerAndHandler : listenerAndHandlers) {
|
for (ListenerAndHandler listenerAndHandler : listenerAndHandlers) {
|
||||||
DrmSessionEventListener listener = listenerAndHandler.listener;
|
DrmSessionEventListener listener = listenerAndHandler.listener;
|
||||||
postOrRun(
|
postOrRun(
|
||||||
listenerAndHandler.handler,
|
listenerAndHandler.handler,
|
||||||
() -> {
|
() -> {
|
||||||
listener.onDrmSessionAcquired(windowIndex, mediaPeriodId);
|
|
||||||
listener.onDrmSessionAcquired(windowIndex, mediaPeriodId, state);
|
listener.onDrmSessionAcquired(windowIndex, mediaPeriodId, state);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user