mirror of
https://github.com/androidx/media.git
synced 2025-05-03 21:57:46 +08:00
Fix some local & comment references is DefaultDrmSessionManager
This field changed name during the code review, but these names and references weren't updated to match. Also use an ImmutableSet since the field is a Set. PiperOrigin-RevId: 353021268
This commit is contained in:
parent
20df512c74
commit
ba803a2e79
@ -36,6 +36,7 @@ import com.google.android.exoplayer2.util.Log;
|
|||||||
import com.google.android.exoplayer2.util.MimeTypes;
|
import com.google.android.exoplayer2.util.MimeTypes;
|
||||||
import com.google.android.exoplayer2.util.Util;
|
import com.google.android.exoplayer2.util.Util;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
|
import com.google.common.collect.ImmutableSet;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
import java.lang.annotation.Documented;
|
import java.lang.annotation.Documented;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
@ -632,12 +633,12 @@ public class DefaultDrmSessionManager implements DrmSessionManager {
|
|||||||
// ResourceBusyException is only available at API 19, so on earlier versions we always
|
// ResourceBusyException is only available at API 19, so on earlier versions we always
|
||||||
// eagerly release regardless of the underlying error.
|
// eagerly release regardless of the underlying error.
|
||||||
if (!keepaliveSessions.isEmpty()) {
|
if (!keepaliveSessions.isEmpty()) {
|
||||||
// Make a local copy, because sessions are removed from this.timingOutSessions during
|
// Make a local copy, because sessions are removed from this.keepaliveSessions during
|
||||||
// release (via callback).
|
// release (via callback).
|
||||||
ImmutableList<DefaultDrmSession> timingOutSessions =
|
ImmutableSet<DefaultDrmSession> keepaliveSessions =
|
||||||
ImmutableList.copyOf(this.keepaliveSessions);
|
ImmutableSet.copyOf(this.keepaliveSessions);
|
||||||
for (DrmSession timingOutSession : timingOutSessions) {
|
for (DrmSession keepaliveSession : keepaliveSessions) {
|
||||||
timingOutSession.release(/* eventDispatcher= */ null);
|
keepaliveSession.release(/* eventDispatcher= */ null);
|
||||||
}
|
}
|
||||||
// Undo the acquisitions from createAndAcquireSession().
|
// Undo the acquisitions from createAndAcquireSession().
|
||||||
session.release(eventDispatcher);
|
session.release(eventDispatcher);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user