mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Rollback of fa6e01312b
*** Original commit *** Suppress warnings in preparation for Checker Framework 3.7.1 upgrade. *** PiperOrigin-RevId: 343085407
This commit is contained in:
parent
79e8295cd2
commit
44009ea686
25 changed files with 25 additions and 193 deletions
|
|
@ -139,11 +139,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
||||||
@Nullable private RequestHandler requestHandler;
|
@Nullable private RequestHandler requestHandler;
|
||||||
@Nullable private ExoMediaCrypto mediaCrypto;
|
@Nullable private ExoMediaCrypto mediaCrypto;
|
||||||
@Nullable private DrmSessionException lastException;
|
@Nullable private DrmSessionException lastException;
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable private byte[] sessionId;
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
private byte[] sessionId;
|
|
||||||
|
|
||||||
private byte @MonotonicNonNull [] offlineLicenseKeySetId;
|
private byte @MonotonicNonNull [] offlineLicenseKeySetId;
|
||||||
|
|
||||||
@Nullable private KeyRequest currentKeyRequest;
|
@Nullable private KeyRequest currentKeyRequest;
|
||||||
|
|
@ -168,8 +164,6 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
||||||
* @param loadErrorHandlingPolicy The {@link LoadErrorHandlingPolicy} for key and provisioning
|
* @param loadErrorHandlingPolicy The {@link LoadErrorHandlingPolicy} for key and provisioning
|
||||||
* requests.
|
* requests.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
public DefaultDrmSession(
|
public DefaultDrmSession(
|
||||||
UUID uuid,
|
UUID uuid,
|
||||||
ExoMediaDrm mediaDrm,
|
ExoMediaDrm mediaDrm,
|
||||||
|
|
@ -278,16 +272,12 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
||||||
return sessionId == null ? null : mediaDrm.queryKeyStatus(sessionId);
|
return sessionId == null ? null : mediaDrm.queryKeyStatus(sessionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public byte[] getOfflineLicenseKeySetId() {
|
public byte[] getOfflineLicenseKeySetId() {
|
||||||
return offlineLicenseKeySetId;
|
return offlineLicenseKeySetId;
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Override
|
@Override
|
||||||
public void acquire(@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher) {
|
public void acquire(@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher) {
|
||||||
checkState(referenceCount >= 0);
|
checkState(referenceCount >= 0);
|
||||||
|
|
@ -311,8 +301,6 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
||||||
referenceCountListener.onReferenceCountIncremented(this, referenceCount);
|
referenceCountListener.onReferenceCountIncremented(this, referenceCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Override
|
@Override
|
||||||
public void release(@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher) {
|
public void release(@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher) {
|
||||||
checkState(referenceCount > 0);
|
checkState(referenceCount > 0);
|
||||||
|
|
|
||||||
|
|
@ -290,10 +290,7 @@ public class DefaultDrmSessionManager implements DrmSessionManager {
|
||||||
@Nullable private Looper playbackLooper;
|
@Nullable private Looper playbackLooper;
|
||||||
private @MonotonicNonNull Handler sessionReleasingHandler;
|
private @MonotonicNonNull Handler sessionReleasingHandler;
|
||||||
private int mode;
|
private int mode;
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable private byte[] offlineLicenseKeySetId;
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
private byte[] offlineLicenseKeySetId;
|
|
||||||
|
|
||||||
/* package */ volatile @Nullable MediaDrmHandler mediaDrmHandler;
|
/* package */ volatile @Nullable MediaDrmHandler mediaDrmHandler;
|
||||||
|
|
||||||
|
|
@ -433,8 +430,6 @@ public class DefaultDrmSessionManager implements DrmSessionManager {
|
||||||
* @param mode The mode to be set.
|
* @param mode The mode to be set.
|
||||||
* @param offlineLicenseKeySetId The key set id of the license to be used with the given mode.
|
* @param offlineLicenseKeySetId The key set id of the license to be used with the given mode.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
public void setMode(@Mode int mode, @Nullable byte[] offlineLicenseKeySetId) {
|
public void setMode(@Mode int mode, @Nullable byte[] offlineLicenseKeySetId) {
|
||||||
Assertions.checkState(sessions.isEmpty());
|
Assertions.checkState(sessions.isEmpty());
|
||||||
if (mode == MODE_QUERY || mode == MODE_RELEASE) {
|
if (mode == MODE_QUERY || mode == MODE_RELEASE) {
|
||||||
|
|
@ -472,8 +467,6 @@ public class DefaultDrmSessionManager implements DrmSessionManager {
|
||||||
exoMediaDrm = null;
|
exoMediaDrm = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public DrmSession acquireSession(
|
public DrmSession acquireSession(
|
||||||
|
|
@ -625,8 +618,6 @@ public class DefaultDrmSessionManager implements DrmSessionManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
private DefaultDrmSession createAndAcquireSessionWithRetry(
|
private DefaultDrmSession createAndAcquireSessionWithRetry(
|
||||||
@Nullable List<SchemeData> schemeDatas,
|
@Nullable List<SchemeData> schemeDatas,
|
||||||
boolean isPlaceholderSession,
|
boolean isPlaceholderSession,
|
||||||
|
|
@ -666,8 +657,6 @@ public class DefaultDrmSessionManager implements DrmSessionManager {
|
||||||
* <p>If {@link #sessionKeepaliveMs} != {@link C#TIME_UNSET} then acquires it again to allow the
|
* <p>If {@link #sessionKeepaliveMs} != {@link C#TIME_UNSET} then acquires it again to allow the
|
||||||
* manager to keep it alive (passing in {@code eventDispatcher=null}.
|
* manager to keep it alive (passing in {@code eventDispatcher=null}.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
private DefaultDrmSession createAndAcquireSession(
|
private DefaultDrmSession createAndAcquireSession(
|
||||||
@Nullable List<SchemeData> schemeDatas,
|
@Nullable List<SchemeData> schemeDatas,
|
||||||
boolean isPlaceholderSession,
|
boolean isPlaceholderSession,
|
||||||
|
|
@ -828,8 +817,6 @@ public class DefaultDrmSessionManager implements DrmSessionManager {
|
||||||
|
|
||||||
private class MediaDrmEventListener implements OnEventListener {
|
private class MediaDrmEventListener implements OnEventListener {
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(
|
public void onEvent(
|
||||||
ExoMediaDrm md, @Nullable byte[] sessionId, int event, int extra, @Nullable byte[] data) {
|
ExoMediaDrm md, @Nullable byte[] sessionId, int event, int extra, @Nullable byte[] data) {
|
||||||
|
|
|
||||||
|
|
@ -131,8 +131,6 @@ public interface DrmSession {
|
||||||
* Returns the key set id of the offline license loaded into this session, or null if there isn't
|
* Returns the key set id of the offline license loaded into this session, or null if there isn't
|
||||||
* one.
|
* one.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
@Nullable
|
||||||
byte[] getOfflineLicenseKeySetId();
|
byte[] getOfflineLicenseKeySetId();
|
||||||
|
|
||||||
|
|
@ -144,8 +142,6 @@ public interface DrmSession {
|
||||||
* @param eventDispatcher The {@link DrmSessionEventListener.EventDispatcher} used to route
|
* @param eventDispatcher The {@link DrmSessionEventListener.EventDispatcher} used to route
|
||||||
* DRM-related events dispatched from this session, or null if no event handling is needed.
|
* DRM-related events dispatched from this session, or null if no event handling is needed.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
void acquire(@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher);
|
void acquire(@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -156,7 +152,5 @@ public interface DrmSession {
|
||||||
* the session is released (the same instance (possibly null) that was passed by the caller to
|
* the session is released (the same instance (possibly null) that was passed by the caller to
|
||||||
* {@link #acquire(DrmSessionEventListener.EventDispatcher)}).
|
* {@link #acquire(DrmSessionEventListener.EventDispatcher)}).
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
void release(@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher);
|
void release(@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,6 @@ public interface DrmSessionManager {
|
||||||
DrmSessionManager DUMMY =
|
DrmSessionManager DUMMY =
|
||||||
new DrmSessionManager() {
|
new DrmSessionManager() {
|
||||||
|
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public DrmSession acquireSession(
|
public DrmSession acquireSession(
|
||||||
|
|
@ -91,8 +89,6 @@ public interface DrmSessionManager {
|
||||||
* @param format The {@link Format} for which to acquire a {@link DrmSession}.
|
* @param format The {@link Format} for which to acquire a {@link DrmSession}.
|
||||||
* @return The DRM session. May be null if the given {@link Format#drmInitData} is null.
|
* @return The DRM session. May be null if the given {@link Format#drmInitData} is null.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
@Nullable
|
||||||
DrmSession acquireSession(
|
DrmSession acquireSession(
|
||||||
Looper playbackLooper,
|
Looper playbackLooper,
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,6 @@ public final class DummyExoMediaDrm implements ExoMediaDrm {
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public byte[] provideKeyResponse(byte[] scope, byte[] response) {
|
public byte[] provideKeyResponse(byte[] scope, byte[] response) {
|
||||||
|
|
|
||||||
|
|
@ -63,23 +63,17 @@ public final class ErrorStateDrmSession implements DrmSession {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public byte[] getOfflineLicenseKeySetId() {
|
public byte[] getOfflineLicenseKeySetId() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Override
|
@Override
|
||||||
public void acquire(@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher) {
|
public void acquire(@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher) {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Override
|
@Override
|
||||||
public void release(@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher) {
|
public void release(@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher) {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
|
|
|
||||||
|
|
@ -119,8 +119,6 @@ public interface ExoMediaDrm {
|
||||||
* @param extra A secondary error code.
|
* @param extra A secondary error code.
|
||||||
* @param data Optional byte array of data that may be associated with the event.
|
* @param data Optional byte array of data that may be associated with the event.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
void onEvent(
|
void onEvent(
|
||||||
ExoMediaDrm mediaDrm,
|
ExoMediaDrm mediaDrm,
|
||||||
@Nullable byte[] sessionId,
|
@Nullable byte[] sessionId,
|
||||||
|
|
@ -296,8 +294,6 @@ public interface ExoMediaDrm {
|
||||||
throws NotProvisionedException;
|
throws NotProvisionedException;
|
||||||
|
|
||||||
/** @see MediaDrm#provideKeyResponse(byte[], byte[]) */
|
/** @see MediaDrm#provideKeyResponse(byte[], byte[]) */
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
@Nullable
|
||||||
byte[] provideKeyResponse(byte[] scope, byte[] response)
|
byte[] provideKeyResponse(byte[] scope, byte[] response)
|
||||||
throws NotProvisionedException, DeniedByServerException;
|
throws NotProvisionedException, DeniedByServerException;
|
||||||
|
|
|
||||||
|
|
@ -112,8 +112,6 @@ public final class FrameworkMediaDrm implements ExoMediaDrm {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Override
|
@Override
|
||||||
public void setOnEventListener(@Nullable ExoMediaDrm.OnEventListener listener) {
|
public void setOnEventListener(@Nullable ExoMediaDrm.OnEventListener listener) {
|
||||||
mediaDrm.setOnEventListener(
|
mediaDrm.setOnEventListener(
|
||||||
|
|
@ -129,8 +127,6 @@ public final class FrameworkMediaDrm implements ExoMediaDrm {
|
||||||
* @param listener The listener to receive events, or {@code null} to stop receiving events.
|
* @param listener The listener to receive events, or {@code null} to stop receiving events.
|
||||||
* @throws UnsupportedOperationException on API levels lower than 23.
|
* @throws UnsupportedOperationException on API levels lower than 23.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Override
|
@Override
|
||||||
@RequiresApi(23)
|
@RequiresApi(23)
|
||||||
public void setOnKeyStatusChangeListener(
|
public void setOnKeyStatusChangeListener(
|
||||||
|
|
@ -217,8 +213,6 @@ public final class FrameworkMediaDrm implements ExoMediaDrm {
|
||||||
return new KeyRequest(requestData, licenseServerUrl);
|
return new KeyRequest(requestData, licenseServerUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public byte[] provideKeyResponse(byte[] scope, byte[] response)
|
public byte[] provideKeyResponse(byte[] scope, byte[] response)
|
||||||
|
|
|
||||||
|
|
@ -153,8 +153,6 @@ public final class HttpMediaDrmCallback implements MediaDrmCallback {
|
||||||
return executePost(dataSourceFactory, url, request.getData(), requestProperties);
|
return executePost(dataSourceFactory, url, request.getData(), requestProperties);
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
private static byte[] executePost(
|
private static byte[] executePost(
|
||||||
HttpDataSource.Factory dataSourceFactory,
|
HttpDataSource.Factory dataSourceFactory,
|
||||||
String url,
|
String url,
|
||||||
|
|
|
||||||
|
|
@ -262,8 +262,6 @@ public final class OfflineLicenseHelper {
|
||||||
handlerThread.quit();
|
handlerThread.quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
private byte[] blockingKeyRequest(
|
private byte[] blockingKeyRequest(
|
||||||
@Mode int licenseMode, @Nullable byte[] offlineLicenseKeySetId, Format format)
|
@Mode int licenseMode, @Nullable byte[] offlineLicenseKeySetId, Format format)
|
||||||
throws DrmSessionException {
|
throws DrmSessionException {
|
||||||
|
|
@ -279,8 +277,6 @@ public final class OfflineLicenseHelper {
|
||||||
return Assertions.checkNotNull(keySetId);
|
return Assertions.checkNotNull(keySetId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
private DrmSession openBlockingKeyRequest(
|
private DrmSession openBlockingKeyRequest(
|
||||||
@Mode int licenseMode, @Nullable byte[] offlineLicenseKeySetId, Format format) {
|
@Mode int licenseMode, @Nullable byte[] offlineLicenseKeySetId, Format format) {
|
||||||
Assertions.checkNotNull(format.drmInitData);
|
Assertions.checkNotNull(format.drmInitData);
|
||||||
|
|
|
||||||
|
|
@ -222,14 +222,8 @@ public class DefaultTimeBar extends View implements TimeBar {
|
||||||
private long position;
|
private long position;
|
||||||
private long bufferedPosition;
|
private long bufferedPosition;
|
||||||
private int adGroupCount;
|
private int adGroupCount;
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable private long[] adGroupTimesMs;
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
@Nullable private boolean[] playedAdGroups;
|
||||||
@Nullable
|
|
||||||
private long[] adGroupTimesMs;
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
private boolean[] playedAdGroups;
|
|
||||||
|
|
||||||
public DefaultTimeBar(Context context) {
|
public DefaultTimeBar(Context context) {
|
||||||
this(context, null);
|
this(context, null);
|
||||||
|
|
@ -533,11 +527,9 @@ public class DefaultTimeBar extends View implements TimeBar {
|
||||||
: duration / timeBarWidthDp;
|
: duration / timeBarWidthDp;
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Override
|
@Override
|
||||||
public void setAdGroupTimesMs(
|
public void setAdGroupTimesMs(@Nullable long[] adGroupTimesMs, @Nullable boolean[] playedAdGroups,
|
||||||
@Nullable long[] adGroupTimesMs, @Nullable boolean[] playedAdGroups, int adGroupCount) {
|
int adGroupCount) {
|
||||||
Assertions.checkArgument(adGroupCount == 0
|
Assertions.checkArgument(adGroupCount == 0
|
||||||
|| (adGroupTimesMs != null && playedAdGroups != null));
|
|| (adGroupTimesMs != null && playedAdGroups != null));
|
||||||
this.adGroupCount = adGroupCount;
|
this.adGroupCount = adGroupCount;
|
||||||
|
|
|
||||||
|
|
@ -568,8 +568,6 @@ public class PlayerControlView extends FrameLayout {
|
||||||
* @param extraPlayedAdGroups Whether each ad has been played. Must be the same length as {@code
|
* @param extraPlayedAdGroups Whether each ad has been played. Must be the same length as {@code
|
||||||
* extraAdGroupTimesMs}, or {@code null} if {@code extraAdGroupTimesMs} is {@code null}.
|
* extraAdGroupTimesMs}, or {@code null} if {@code extraAdGroupTimesMs} is {@code null}.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
public void setExtraAdGroupMarkers(
|
public void setExtraAdGroupMarkers(
|
||||||
@Nullable long[] extraAdGroupTimesMs, @Nullable boolean[] extraPlayedAdGroups) {
|
@Nullable long[] extraAdGroupTimesMs, @Nullable boolean[] extraPlayedAdGroups) {
|
||||||
if (extraAdGroupTimesMs == null) {
|
if (extraAdGroupTimesMs == null) {
|
||||||
|
|
|
||||||
|
|
@ -373,11 +373,7 @@ public class PlayerNotificationManager {
|
||||||
private final int instanceId;
|
private final int instanceId;
|
||||||
private final Timeline.Window window;
|
private final Timeline.Window window;
|
||||||
|
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable private NotificationCompat.Builder builder;
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
private NotificationCompat.Builder builder;
|
|
||||||
|
|
||||||
@Nullable private List<NotificationCompat.Action> builderActions;
|
@Nullable private List<NotificationCompat.Action> builderActions;
|
||||||
@Nullable private Player player;
|
@Nullable private Player player;
|
||||||
@Nullable private PlaybackPreparer playbackPreparer;
|
@Nullable private PlaybackPreparer playbackPreparer;
|
||||||
|
|
@ -385,11 +381,7 @@ public class PlayerNotificationManager {
|
||||||
private boolean isNotificationStarted;
|
private boolean isNotificationStarted;
|
||||||
private int currentNotificationTag;
|
private int currentNotificationTag;
|
||||||
@Nullable private NotificationListener notificationListener;
|
@Nullable private NotificationListener notificationListener;
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable private MediaSessionCompat.Token mediaSessionToken;
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
private MediaSessionCompat.Token mediaSessionToken;
|
|
||||||
|
|
||||||
private boolean useNavigationActions;
|
private boolean useNavigationActions;
|
||||||
private boolean useNavigationActionsInCompactView;
|
private boolean useNavigationActionsInCompactView;
|
||||||
private boolean usePlayPauseActions;
|
private boolean usePlayPauseActions;
|
||||||
|
|
@ -1047,8 +1039,6 @@ public class PlayerNotificationManager {
|
||||||
* NotificationCompat.Builder#build()} to obtain the notification, or {@code null} if no
|
* NotificationCompat.Builder#build()} to obtain the notification, or {@code null} if no
|
||||||
* notification should be displayed.
|
* notification should be displayed.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
@Nullable
|
||||||
protected NotificationCompat.Builder createNotification(
|
protected NotificationCompat.Builder createNotification(
|
||||||
Player player,
|
Player player,
|
||||||
|
|
@ -1064,8 +1054,6 @@ public class PlayerNotificationManager {
|
||||||
List<NotificationCompat.Action> actions = new ArrayList<>(actionNames.size());
|
List<NotificationCompat.Action> actions = new ArrayList<>(actionNames.size());
|
||||||
for (int i = 0; i < actionNames.size(); i++) {
|
for (int i = 0; i < actionNames.size(); i++) {
|
||||||
String actionName = actionNames.get(i);
|
String actionName = actionNames.get(i);
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
@Nullable
|
||||||
NotificationCompat.Action action =
|
NotificationCompat.Action action =
|
||||||
playbackActions.containsKey(actionName)
|
playbackActions.containsKey(actionName)
|
||||||
|
|
|
||||||
|
|
@ -309,11 +309,7 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
|
||||||
|
|
||||||
@Nullable private Player player;
|
@Nullable private Player player;
|
||||||
private boolean useController;
|
private boolean useController;
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable private PlayerControlView.VisibilityListener controllerVisibilityListener;
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
private PlayerControlView.VisibilityListener controllerVisibilityListener;
|
|
||||||
|
|
||||||
private boolean useArtwork;
|
private boolean useArtwork;
|
||||||
@Nullable private Drawable defaultArtwork;
|
@Nullable private Drawable defaultArtwork;
|
||||||
private @ShowBuffering int showBuffering;
|
private @ShowBuffering int showBuffering;
|
||||||
|
|
@ -568,10 +564,7 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
|
||||||
@Nullable Player oldPlayer = this.player;
|
@Nullable Player oldPlayer = this.player;
|
||||||
if (oldPlayer != null) {
|
if (oldPlayer != null) {
|
||||||
oldPlayer.removeListener(componentListener);
|
oldPlayer.removeListener(componentListener);
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable Player.VideoComponent oldVideoComponent = oldPlayer.getVideoComponent();
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
Player.VideoComponent oldVideoComponent = oldPlayer.getVideoComponent();
|
|
||||||
if (oldVideoComponent != null) {
|
if (oldVideoComponent != null) {
|
||||||
oldVideoComponent.removeVideoListener(componentListener);
|
oldVideoComponent.removeVideoListener(componentListener);
|
||||||
if (surfaceView instanceof TextureView) {
|
if (surfaceView instanceof TextureView) {
|
||||||
|
|
@ -584,10 +577,7 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
|
||||||
oldVideoComponent.clearVideoSurfaceView((SurfaceView) surfaceView);
|
oldVideoComponent.clearVideoSurfaceView((SurfaceView) surfaceView);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable Player.TextComponent oldTextComponent = oldPlayer.getTextComponent();
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
Player.TextComponent oldTextComponent = oldPlayer.getTextComponent();
|
|
||||||
if (oldTextComponent != null) {
|
if (oldTextComponent != null) {
|
||||||
oldTextComponent.removeTextOutput(componentListener);
|
oldTextComponent.removeTextOutput(componentListener);
|
||||||
}
|
}
|
||||||
|
|
@ -603,10 +593,7 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
|
||||||
updateErrorMessage();
|
updateErrorMessage();
|
||||||
updateForCurrentTrackSelections(/* isNewPlayer= */ true);
|
updateForCurrentTrackSelections(/* isNewPlayer= */ true);
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable Player.VideoComponent newVideoComponent = player.getVideoComponent();
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
Player.VideoComponent newVideoComponent = player.getVideoComponent();
|
|
||||||
if (newVideoComponent != null) {
|
if (newVideoComponent != null) {
|
||||||
if (surfaceView instanceof TextureView) {
|
if (surfaceView instanceof TextureView) {
|
||||||
newVideoComponent.setVideoTextureView((TextureView) surfaceView);
|
newVideoComponent.setVideoTextureView((TextureView) surfaceView);
|
||||||
|
|
@ -620,10 +607,7 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
|
||||||
}
|
}
|
||||||
newVideoComponent.addVideoListener(componentListener);
|
newVideoComponent.addVideoListener(componentListener);
|
||||||
}
|
}
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable Player.TextComponent newTextComponent = player.getTextComponent();
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
Player.TextComponent newTextComponent = player.getTextComponent();
|
|
||||||
if (newTextComponent != null) {
|
if (newTextComponent != null) {
|
||||||
newTextComponent.addTextOutput(componentListener);
|
newTextComponent.addTextOutput(componentListener);
|
||||||
if (subtitleView != null) {
|
if (subtitleView != null) {
|
||||||
|
|
@ -982,8 +966,6 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
|
||||||
* @param listener The listener to be notified about visibility changes, or null to remove the
|
* @param listener The listener to be notified about visibility changes, or null to remove the
|
||||||
* current listener.
|
* current listener.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
public void setControllerVisibilityListener(
|
public void setControllerVisibilityListener(
|
||||||
@Nullable PlayerControlView.VisibilityListener listener) {
|
@Nullable PlayerControlView.VisibilityListener listener) {
|
||||||
Assertions.checkStateNotNull(controller);
|
Assertions.checkStateNotNull(controller);
|
||||||
|
|
@ -1126,8 +1108,6 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
|
||||||
* @param extraPlayedAdGroups Whether each ad has been played, or {@code null} to show no extra ad
|
* @param extraPlayedAdGroups Whether each ad has been played, or {@code null} to show no extra ad
|
||||||
* markers.
|
* markers.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
public void setExtraAdGroupMarkers(
|
public void setExtraAdGroupMarkers(
|
||||||
@Nullable long[] extraAdGroupTimesMs, @Nullable boolean[] extraPlayedAdGroups) {
|
@Nullable long[] extraAdGroupTimesMs, @Nullable boolean[] extraPlayedAdGroups) {
|
||||||
Assertions.checkStateNotNull(controller);
|
Assertions.checkStateNotNull(controller);
|
||||||
|
|
@ -1140,8 +1120,6 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
|
||||||
* @param listener The listener to be notified about aspect ratios changes of the video content or
|
* @param listener The listener to be notified about aspect ratios changes of the video content or
|
||||||
* the content frame.
|
* the content frame.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
public void setAspectRatioListener(
|
public void setAspectRatioListener(
|
||||||
@Nullable AspectRatioFrameLayout.AspectRatioListener listener) {
|
@Nullable AspectRatioFrameLayout.AspectRatioListener listener) {
|
||||||
Assertions.checkStateNotNull(contentFrame);
|
Assertions.checkStateNotNull(contentFrame);
|
||||||
|
|
|
||||||
|
|
@ -791,8 +791,6 @@ public class StyledPlayerControlView extends FrameLayout {
|
||||||
* @param extraPlayedAdGroups Whether each ad has been played. Must be the same length as {@code
|
* @param extraPlayedAdGroups Whether each ad has been played. Must be the same length as {@code
|
||||||
* extraAdGroupTimesMs}, or {@code null} if {@code extraAdGroupTimesMs} is {@code null}.
|
* extraAdGroupTimesMs}, or {@code null} if {@code extraAdGroupTimesMs} is {@code null}.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
public void setExtraAdGroupMarkers(
|
public void setExtraAdGroupMarkers(
|
||||||
@Nullable long[] extraAdGroupTimesMs, @Nullable boolean[] extraPlayedAdGroups) {
|
@Nullable long[] extraAdGroupTimesMs, @Nullable boolean[] extraPlayedAdGroups) {
|
||||||
if (extraAdGroupTimesMs == null) {
|
if (extraAdGroupTimesMs == null) {
|
||||||
|
|
|
||||||
|
|
@ -311,11 +311,7 @@ public class StyledPlayerView extends FrameLayout implements AdsLoader.AdViewPro
|
||||||
|
|
||||||
@Nullable private Player player;
|
@Nullable private Player player;
|
||||||
private boolean useController;
|
private boolean useController;
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable private StyledPlayerControlView.VisibilityListener controllerVisibilityListener;
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
private StyledPlayerControlView.VisibilityListener controllerVisibilityListener;
|
|
||||||
|
|
||||||
private boolean useArtwork;
|
private boolean useArtwork;
|
||||||
@Nullable private Drawable defaultArtwork;
|
@Nullable private Drawable defaultArtwork;
|
||||||
private @ShowBuffering int showBuffering;
|
private @ShowBuffering int showBuffering;
|
||||||
|
|
@ -577,10 +573,7 @@ public class StyledPlayerView extends FrameLayout implements AdsLoader.AdViewPro
|
||||||
@Nullable Player oldPlayer = this.player;
|
@Nullable Player oldPlayer = this.player;
|
||||||
if (oldPlayer != null) {
|
if (oldPlayer != null) {
|
||||||
oldPlayer.removeListener(componentListener);
|
oldPlayer.removeListener(componentListener);
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable Player.VideoComponent oldVideoComponent = oldPlayer.getVideoComponent();
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
Player.VideoComponent oldVideoComponent = oldPlayer.getVideoComponent();
|
|
||||||
if (oldVideoComponent != null) {
|
if (oldVideoComponent != null) {
|
||||||
oldVideoComponent.removeVideoListener(componentListener);
|
oldVideoComponent.removeVideoListener(componentListener);
|
||||||
if (surfaceView instanceof TextureView) {
|
if (surfaceView instanceof TextureView) {
|
||||||
|
|
@ -593,10 +586,7 @@ public class StyledPlayerView extends FrameLayout implements AdsLoader.AdViewPro
|
||||||
oldVideoComponent.clearVideoSurfaceView((SurfaceView) surfaceView);
|
oldVideoComponent.clearVideoSurfaceView((SurfaceView) surfaceView);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable Player.TextComponent oldTextComponent = oldPlayer.getTextComponent();
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
Player.TextComponent oldTextComponent = oldPlayer.getTextComponent();
|
|
||||||
if (oldTextComponent != null) {
|
if (oldTextComponent != null) {
|
||||||
oldTextComponent.removeTextOutput(componentListener);
|
oldTextComponent.removeTextOutput(componentListener);
|
||||||
}
|
}
|
||||||
|
|
@ -612,10 +602,7 @@ public class StyledPlayerView extends FrameLayout implements AdsLoader.AdViewPro
|
||||||
updateErrorMessage();
|
updateErrorMessage();
|
||||||
updateForCurrentTrackSelections(/* isNewPlayer= */ true);
|
updateForCurrentTrackSelections(/* isNewPlayer= */ true);
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable Player.VideoComponent newVideoComponent = player.getVideoComponent();
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
Player.VideoComponent newVideoComponent = player.getVideoComponent();
|
|
||||||
if (newVideoComponent != null) {
|
if (newVideoComponent != null) {
|
||||||
if (surfaceView instanceof TextureView) {
|
if (surfaceView instanceof TextureView) {
|
||||||
newVideoComponent.setVideoTextureView((TextureView) surfaceView);
|
newVideoComponent.setVideoTextureView((TextureView) surfaceView);
|
||||||
|
|
@ -629,10 +616,7 @@ public class StyledPlayerView extends FrameLayout implements AdsLoader.AdViewPro
|
||||||
}
|
}
|
||||||
newVideoComponent.addVideoListener(componentListener);
|
newVideoComponent.addVideoListener(componentListener);
|
||||||
}
|
}
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable Player.TextComponent newTextComponent = player.getTextComponent();
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
Player.TextComponent newTextComponent = player.getTextComponent();
|
|
||||||
if (newTextComponent != null) {
|
if (newTextComponent != null) {
|
||||||
newTextComponent.addTextOutput(componentListener);
|
newTextComponent.addTextOutput(componentListener);
|
||||||
if (subtitleView != null) {
|
if (subtitleView != null) {
|
||||||
|
|
@ -966,8 +950,6 @@ public class StyledPlayerView extends FrameLayout implements AdsLoader.AdViewPro
|
||||||
* @param listener The listener to be notified about visibility changes, or null to remove the
|
* @param listener The listener to be notified about visibility changes, or null to remove the
|
||||||
* current listener.
|
* current listener.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
public void setControllerVisibilityListener(
|
public void setControllerVisibilityListener(
|
||||||
@Nullable StyledPlayerControlView.VisibilityListener listener) {
|
@Nullable StyledPlayerControlView.VisibilityListener listener) {
|
||||||
Assertions.checkStateNotNull(controller);
|
Assertions.checkStateNotNull(controller);
|
||||||
|
|
@ -989,8 +971,6 @@ public class StyledPlayerView extends FrameLayout implements AdsLoader.AdViewPro
|
||||||
* @param listener The listener to be notified when the fullscreen button is clicked, or null to
|
* @param listener The listener to be notified when the fullscreen button is clicked, or null to
|
||||||
* remove the current listener and hide the fullscreen button.
|
* remove the current listener and hide the fullscreen button.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
public void setControllerOnFullScreenModeChangedListener(
|
public void setControllerOnFullScreenModeChangedListener(
|
||||||
@Nullable StyledPlayerControlView.OnFullScreenModeChangedListener listener) {
|
@Nullable StyledPlayerControlView.OnFullScreenModeChangedListener listener) {
|
||||||
Assertions.checkStateNotNull(controller);
|
Assertions.checkStateNotNull(controller);
|
||||||
|
|
@ -1122,8 +1102,6 @@ public class StyledPlayerView extends FrameLayout implements AdsLoader.AdViewPro
|
||||||
* @param extraPlayedAdGroups Whether each ad has been played, or {@code null} to show no extra ad
|
* @param extraPlayedAdGroups Whether each ad has been played, or {@code null} to show no extra ad
|
||||||
* markers.
|
* markers.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
public void setExtraAdGroupMarkers(
|
public void setExtraAdGroupMarkers(
|
||||||
@Nullable long[] extraAdGroupTimesMs, @Nullable boolean[] extraPlayedAdGroups) {
|
@Nullable long[] extraAdGroupTimesMs, @Nullable boolean[] extraPlayedAdGroups) {
|
||||||
Assertions.checkStateNotNull(controller);
|
Assertions.checkStateNotNull(controller);
|
||||||
|
|
@ -1136,8 +1114,6 @@ public class StyledPlayerView extends FrameLayout implements AdsLoader.AdViewPro
|
||||||
* @param listener The listener to be notified about aspect ratios changes of the video content or
|
* @param listener The listener to be notified about aspect ratios changes of the video content or
|
||||||
* the content frame.
|
* the content frame.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
public void setAspectRatioListener(
|
public void setAspectRatioListener(
|
||||||
@Nullable AspectRatioFrameLayout.AspectRatioListener listener) {
|
@Nullable AspectRatioFrameLayout.AspectRatioListener listener) {
|
||||||
Assertions.checkStateNotNull(contentFrame);
|
Assertions.checkStateNotNull(contentFrame);
|
||||||
|
|
|
||||||
|
|
@ -102,10 +102,8 @@ public interface TimeBar {
|
||||||
* groups.
|
* groups.
|
||||||
* @param adGroupCount The number of ad groups.
|
* @param adGroupCount The number of ad groups.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to primitive types
|
void setAdGroupTimesMs(@Nullable long[] adGroupTimesMs, @Nullable boolean[] playedAdGroups,
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
int adGroupCount);
|
||||||
void setAdGroupTimesMs(
|
|
||||||
@Nullable long[] adGroupTimesMs, @Nullable boolean[] playedAdGroups, int adGroupCount);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Listener for scrubbing events.
|
* Listener for scrubbing events.
|
||||||
|
|
|
||||||
|
|
@ -374,8 +374,6 @@ import java.util.Map;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
private static String convertAlignmentToCss(@Nullable Layout.Alignment alignment) {
|
private static String convertAlignmentToCss(@Nullable Layout.Alignment alignment) {
|
||||||
if (alignment == null) {
|
if (alignment == null) {
|
||||||
return "center";
|
return "center";
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,6 @@ public final class CapturingAudioSink extends ForwardingAudioSink implements Dum
|
||||||
interceptedData = new ArrayList<>();
|
interceptedData = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Override
|
@Override
|
||||||
public void configure(Format inputFormat, int specifiedBufferSize, @Nullable int[] outputChannels)
|
public void configure(Format inputFormat, int specifiedBufferSize, @Nullable int[] outputChannels)
|
||||||
throws ConfigurationException {
|
throws ConfigurationException {
|
||||||
|
|
|
||||||
|
|
@ -41,11 +41,7 @@ public final class DownloadBuilder {
|
||||||
private Uri uri;
|
private Uri uri;
|
||||||
@Nullable private String mimeType;
|
@Nullable private String mimeType;
|
||||||
private List<StreamKey> streamKeys;
|
private List<StreamKey> streamKeys;
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable private byte[] keySetId;
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
private byte[] keySetId;
|
|
||||||
|
|
||||||
@Nullable private String cacheKey;
|
@Nullable private String cacheKey;
|
||||||
private byte[] customMetadata;
|
private byte[] customMetadata;
|
||||||
|
|
||||||
|
|
@ -89,8 +85,6 @@ public final class DownloadBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Creates a download builder. */
|
/** Creates a download builder. */
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
private DownloadBuilder(
|
private DownloadBuilder(
|
||||||
String id,
|
String id,
|
||||||
Uri uri,
|
Uri uri,
|
||||||
|
|
|
||||||
|
|
@ -54,8 +54,6 @@ public final class Dumper {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
public Dumper add(String field, @Nullable byte[] value) {
|
public Dumper add(String field, @Nullable byte[] value) {
|
||||||
String string =
|
String string =
|
||||||
String.format(
|
String.format(
|
||||||
|
|
|
||||||
|
|
@ -80,11 +80,7 @@ public class FakeDataSet {
|
||||||
public static final class Segment {
|
public static final class Segment {
|
||||||
|
|
||||||
@Nullable public final IOException exception;
|
@Nullable public final IOException exception;
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable public final byte[] data;
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
public final byte[] data;
|
|
||||||
|
|
||||||
public final int length;
|
public final int length;
|
||||||
public final long byteOffset;
|
public final long byteOffset;
|
||||||
@Nullable public final Runnable action;
|
@Nullable public final Runnable action;
|
||||||
|
|
@ -109,8 +105,6 @@ public class FakeDataSet {
|
||||||
this(null, 0, null, action, previousSegment);
|
this(null, 0, null, action, previousSegment);
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
private Segment(
|
private Segment(
|
||||||
@Nullable byte[] data,
|
@Nullable byte[] data,
|
||||||
int length,
|
int length,
|
||||||
|
|
|
||||||
|
|
@ -170,8 +170,6 @@ public final class FakeExoMediaDrm implements ExoMediaDrm {
|
||||||
return new KeyRequest(requestData.toByteArray(), /* licenseServerUrl= */ "");
|
return new KeyRequest(requestData.toByteArray(), /* licenseServerUrl= */ "");
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to primitive types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public byte[] provideKeyResponse(byte[] scope, byte[] response)
|
public byte[] provideKeyResponse(byte[] scope, byte[] response)
|
||||||
|
|
@ -245,10 +243,7 @@ public final class FakeExoMediaDrm implements ExoMediaDrm {
|
||||||
@Override
|
@Override
|
||||||
public byte[] getPropertyByteArray(String propertyName) {
|
public byte[] getPropertyByteArray(String propertyName) {
|
||||||
Assertions.checkState(referenceCount > 0);
|
Assertions.checkState(referenceCount > 0);
|
||||||
// nullness annotations are not applicable to primitive types
|
@Nullable byte[] value = byteProperties.get(propertyName);
|
||||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
|
||||||
@Nullable
|
|
||||||
byte[] value = byteProperties.get(propertyName);
|
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
throw new IllegalArgumentException("Unrecognized propertyName: " + propertyName);
|
throw new IllegalArgumentException("Unrecognized propertyName: " + propertyName);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,11 +81,7 @@ public class FakeMediaSource extends BaseMediaSource {
|
||||||
private static final int MANIFEST_LOAD_BYTES = 100;
|
private static final int MANIFEST_LOAD_BYTES = 100;
|
||||||
|
|
||||||
private final TrackGroupArray trackGroupArray;
|
private final TrackGroupArray trackGroupArray;
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable private final FakeMediaPeriod.TrackDataFactory trackDataFactory;
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
private final FakeMediaPeriod.TrackDataFactory trackDataFactory;
|
|
||||||
|
|
||||||
private final ArrayList<FakeMediaPeriod> activeMediaPeriods;
|
private final ArrayList<FakeMediaPeriod> activeMediaPeriods;
|
||||||
private final ArrayList<MediaPeriodId> createdMediaPeriods;
|
private final ArrayList<MediaPeriodId> createdMediaPeriods;
|
||||||
private final DrmSessionManager drmSessionManager;
|
private final DrmSessionManager drmSessionManager;
|
||||||
|
|
@ -125,8 +121,6 @@ public class FakeMediaSource extends BaseMediaSource {
|
||||||
* null to prevent an immediate source info refresh message when preparing the media source. It
|
* null to prevent an immediate source info refresh message when preparing the media source. It
|
||||||
* can be manually set later using {@link #setNewSourceInfo(Timeline)}.
|
* can be manually set later using {@link #setNewSourceInfo(Timeline)}.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
public FakeMediaSource(
|
public FakeMediaSource(
|
||||||
@Nullable Timeline timeline,
|
@Nullable Timeline timeline,
|
||||||
DrmSessionManager drmSessionManager,
|
DrmSessionManager drmSessionManager,
|
||||||
|
|
@ -142,8 +136,6 @@ public class FakeMediaSource extends BaseMediaSource {
|
||||||
* immediate source info refresh message when preparing the media source. It can be manually set
|
* immediate source info refresh message when preparing the media source. It can be manually set
|
||||||
* later using {@link #setNewSourceInfo(Timeline)}.
|
* later using {@link #setNewSourceInfo(Timeline)}.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
public FakeMediaSource(
|
public FakeMediaSource(
|
||||||
@Nullable Timeline timeline,
|
@Nullable Timeline timeline,
|
||||||
DrmSessionManager drmSessionManager,
|
DrmSessionManager drmSessionManager,
|
||||||
|
|
|
||||||
|
|
@ -126,11 +126,7 @@ public class FakeSampleStream implements SampleStream {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// nullness annotations are not applicable to outer types
|
@Nullable private final MediaSourceEventListener.EventDispatcher mediaSourceEventDispatcher;
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
@Nullable
|
|
||||||
private final MediaSourceEventListener.EventDispatcher mediaSourceEventDispatcher;
|
|
||||||
|
|
||||||
private final Format initialFormat;
|
private final Format initialFormat;
|
||||||
private final List<FakeSampleStreamItem> fakeSampleStreamItems;
|
private final List<FakeSampleStreamItem> fakeSampleStreamItems;
|
||||||
private final DrmSessionManager drmSessionManager;
|
private final DrmSessionManager drmSessionManager;
|
||||||
|
|
@ -157,8 +153,6 @@ public class FakeSampleStream implements SampleStream {
|
||||||
* return every time readData is called. This should usually end with {@link
|
* return every time readData is called. This should usually end with {@link
|
||||||
* FakeSampleStreamItem#END_OF_STREAM_ITEM}.
|
* FakeSampleStreamItem#END_OF_STREAM_ITEM}.
|
||||||
*/
|
*/
|
||||||
// nullness annotations are not applicable to outer types
|
|
||||||
@SuppressWarnings("nullness:nullness.on.outer")
|
|
||||||
public FakeSampleStream(
|
public FakeSampleStream(
|
||||||
@Nullable MediaSourceEventListener.EventDispatcher mediaSourceEventDispatcher,
|
@Nullable MediaSourceEventListener.EventDispatcher mediaSourceEventDispatcher,
|
||||||
DrmSessionManager drmSessionManager,
|
DrmSessionManager drmSessionManager,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue