mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +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 ExoMediaCrypto mediaCrypto;
|
||||
@Nullable private DrmSessionException lastException;
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
@Nullable
|
||||
private byte[] sessionId;
|
||||
|
||||
@Nullable private byte[] sessionId;
|
||||
private byte @MonotonicNonNull [] offlineLicenseKeySetId;
|
||||
|
||||
@Nullable private KeyRequest currentKeyRequest;
|
||||
|
|
@ -168,8 +164,6 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
|||
* @param loadErrorHandlingPolicy The {@link LoadErrorHandlingPolicy} for key and provisioning
|
||||
* requests.
|
||||
*/
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
public DefaultDrmSession(
|
||||
UUID uuid,
|
||||
ExoMediaDrm mediaDrm,
|
||||
|
|
@ -278,16 +272,12 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
|||
return sessionId == null ? null : mediaDrm.queryKeyStatus(sessionId);
|
||||
}
|
||||
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
@Override
|
||||
@Nullable
|
||||
public byte[] getOfflineLicenseKeySetId() {
|
||||
return offlineLicenseKeySetId;
|
||||
}
|
||||
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Override
|
||||
public void acquire(@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher) {
|
||||
checkState(referenceCount >= 0);
|
||||
|
|
@ -311,8 +301,6 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
|||
referenceCountListener.onReferenceCountIncremented(this, referenceCount);
|
||||
}
|
||||
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Override
|
||||
public void release(@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher) {
|
||||
checkState(referenceCount > 0);
|
||||
|
|
|
|||
|
|
@ -290,10 +290,7 @@ public class DefaultDrmSessionManager implements DrmSessionManager {
|
|||
@Nullable private Looper playbackLooper;
|
||||
private @MonotonicNonNull Handler sessionReleasingHandler;
|
||||
private int mode;
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
@Nullable
|
||||
private byte[] offlineLicenseKeySetId;
|
||||
@Nullable private byte[] offlineLicenseKeySetId;
|
||||
|
||||
/* package */ volatile @Nullable MediaDrmHandler mediaDrmHandler;
|
||||
|
||||
|
|
@ -433,8 +430,6 @@ public class DefaultDrmSessionManager implements DrmSessionManager {
|
|||
* @param mode The mode to be set.
|
||||
* @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) {
|
||||
Assertions.checkState(sessions.isEmpty());
|
||||
if (mode == MODE_QUERY || mode == MODE_RELEASE) {
|
||||
|
|
@ -472,8 +467,6 @@ public class DefaultDrmSessionManager implements DrmSessionManager {
|
|||
exoMediaDrm = null;
|
||||
}
|
||||
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Override
|
||||
@Nullable
|
||||
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(
|
||||
@Nullable List<SchemeData> schemeDatas,
|
||||
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
|
||||
* 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(
|
||||
@Nullable List<SchemeData> schemeDatas,
|
||||
boolean isPlaceholderSession,
|
||||
|
|
@ -828,8 +817,6 @@ public class DefaultDrmSessionManager implements DrmSessionManager {
|
|||
|
||||
private class MediaDrmEventListener implements OnEventListener {
|
||||
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
@Override
|
||||
public void onEvent(
|
||||
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
|
||||
* one.
|
||||
*/
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
@Nullable
|
||||
byte[] getOfflineLicenseKeySetId();
|
||||
|
||||
|
|
@ -144,8 +142,6 @@ public interface DrmSession {
|
|||
* @param eventDispatcher The {@link DrmSessionEventListener.EventDispatcher} used to route
|
||||
* 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);
|
||||
|
||||
/**
|
||||
|
|
@ -156,7 +152,5 @@ public interface DrmSession {
|
|||
* the session is released (the same instance (possibly null) that was passed by the caller to
|
||||
* {@link #acquire(DrmSessionEventListener.EventDispatcher)}).
|
||||
*/
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
void release(@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@ public interface DrmSessionManager {
|
|||
DrmSessionManager DUMMY =
|
||||
new DrmSessionManager() {
|
||||
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Override
|
||||
@Nullable
|
||||
public DrmSession acquireSession(
|
||||
|
|
@ -91,8 +89,6 @@ public interface DrmSessionManager {
|
|||
* @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.
|
||||
*/
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Nullable
|
||||
DrmSession acquireSession(
|
||||
Looper playbackLooper,
|
||||
|
|
|
|||
|
|
@ -68,8 +68,6 @@ public final class DummyExoMediaDrm implements ExoMediaDrm {
|
|||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
@Override
|
||||
@Nullable
|
||||
public byte[] provideKeyResponse(byte[] scope, byte[] response) {
|
||||
|
|
|
|||
|
|
@ -63,23 +63,17 @@ public final class ErrorStateDrmSession implements DrmSession {
|
|||
return null;
|
||||
}
|
||||
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
@Override
|
||||
@Nullable
|
||||
public byte[] getOfflineLicenseKeySetId() {
|
||||
return null;
|
||||
}
|
||||
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Override
|
||||
public void acquire(@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher) {
|
||||
// Do nothing.
|
||||
}
|
||||
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Override
|
||||
public void release(@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher) {
|
||||
// Do nothing.
|
||||
|
|
|
|||
|
|
@ -119,8 +119,6 @@ public interface ExoMediaDrm {
|
|||
* @param extra A secondary error code.
|
||||
* @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(
|
||||
ExoMediaDrm mediaDrm,
|
||||
@Nullable byte[] sessionId,
|
||||
|
|
@ -296,8 +294,6 @@ public interface ExoMediaDrm {
|
|||
throws NotProvisionedException;
|
||||
|
||||
/** @see MediaDrm#provideKeyResponse(byte[], byte[]) */
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
@Nullable
|
||||
byte[] provideKeyResponse(byte[] scope, byte[] response)
|
||||
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
|
||||
public void setOnEventListener(@Nullable ExoMediaDrm.OnEventListener listener) {
|
||||
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.
|
||||
* @throws UnsupportedOperationException on API levels lower than 23.
|
||||
*/
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Override
|
||||
@RequiresApi(23)
|
||||
public void setOnKeyStatusChangeListener(
|
||||
|
|
@ -217,8 +213,6 @@ public final class FrameworkMediaDrm implements ExoMediaDrm {
|
|||
return new KeyRequest(requestData, licenseServerUrl);
|
||||
}
|
||||
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
@Override
|
||||
@Nullable
|
||||
public byte[] provideKeyResponse(byte[] scope, byte[] response)
|
||||
|
|
|
|||
|
|
@ -153,8 +153,6 @@ public final class HttpMediaDrmCallback implements MediaDrmCallback {
|
|||
return executePost(dataSourceFactory, url, request.getData(), requestProperties);
|
||||
}
|
||||
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
private static byte[] executePost(
|
||||
HttpDataSource.Factory dataSourceFactory,
|
||||
String url,
|
||||
|
|
|
|||
|
|
@ -262,8 +262,6 @@ public final class OfflineLicenseHelper {
|
|||
handlerThread.quit();
|
||||
}
|
||||
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
private byte[] blockingKeyRequest(
|
||||
@Mode int licenseMode, @Nullable byte[] offlineLicenseKeySetId, Format format)
|
||||
throws DrmSessionException {
|
||||
|
|
@ -279,8 +277,6 @@ public final class OfflineLicenseHelper {
|
|||
return Assertions.checkNotNull(keySetId);
|
||||
}
|
||||
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
private DrmSession openBlockingKeyRequest(
|
||||
@Mode int licenseMode, @Nullable byte[] offlineLicenseKeySetId, Format format) {
|
||||
Assertions.checkNotNull(format.drmInitData);
|
||||
|
|
|
|||
|
|
@ -222,14 +222,8 @@ public class DefaultTimeBar extends View implements TimeBar {
|
|||
private long position;
|
||||
private long bufferedPosition;
|
||||
private int adGroupCount;
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
@Nullable
|
||||
private long[] adGroupTimesMs;
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
@Nullable
|
||||
private boolean[] playedAdGroups;
|
||||
@Nullable private long[] adGroupTimesMs;
|
||||
@Nullable private boolean[] playedAdGroups;
|
||||
|
||||
public DefaultTimeBar(Context context) {
|
||||
this(context, null);
|
||||
|
|
@ -533,11 +527,9 @@ public class DefaultTimeBar extends View implements TimeBar {
|
|||
: duration / timeBarWidthDp;
|
||||
}
|
||||
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
@Override
|
||||
public void setAdGroupTimesMs(
|
||||
@Nullable long[] adGroupTimesMs, @Nullable boolean[] playedAdGroups, int adGroupCount) {
|
||||
public void setAdGroupTimesMs(@Nullable long[] adGroupTimesMs, @Nullable boolean[] playedAdGroups,
|
||||
int adGroupCount) {
|
||||
Assertions.checkArgument(adGroupCount == 0
|
||||
|| (adGroupTimesMs != null && playedAdGroups != null));
|
||||
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
|
||||
* 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(
|
||||
@Nullable long[] extraAdGroupTimesMs, @Nullable boolean[] extraPlayedAdGroups) {
|
||||
if (extraAdGroupTimesMs == null) {
|
||||
|
|
|
|||
|
|
@ -373,11 +373,7 @@ public class PlayerNotificationManager {
|
|||
private final int instanceId;
|
||||
private final Timeline.Window window;
|
||||
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Nullable
|
||||
private NotificationCompat.Builder builder;
|
||||
|
||||
@Nullable private NotificationCompat.Builder builder;
|
||||
@Nullable private List<NotificationCompat.Action> builderActions;
|
||||
@Nullable private Player player;
|
||||
@Nullable private PlaybackPreparer playbackPreparer;
|
||||
|
|
@ -385,11 +381,7 @@ public class PlayerNotificationManager {
|
|||
private boolean isNotificationStarted;
|
||||
private int currentNotificationTag;
|
||||
@Nullable private NotificationListener notificationListener;
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Nullable
|
||||
private MediaSessionCompat.Token mediaSessionToken;
|
||||
|
||||
@Nullable private MediaSessionCompat.Token mediaSessionToken;
|
||||
private boolean useNavigationActions;
|
||||
private boolean useNavigationActionsInCompactView;
|
||||
private boolean usePlayPauseActions;
|
||||
|
|
@ -1047,8 +1039,6 @@ public class PlayerNotificationManager {
|
|||
* NotificationCompat.Builder#build()} to obtain the notification, or {@code null} if no
|
||||
* notification should be displayed.
|
||||
*/
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Nullable
|
||||
protected NotificationCompat.Builder createNotification(
|
||||
Player player,
|
||||
|
|
@ -1064,8 +1054,6 @@ public class PlayerNotificationManager {
|
|||
List<NotificationCompat.Action> actions = new ArrayList<>(actionNames.size());
|
||||
for (int i = 0; i < actionNames.size(); i++) {
|
||||
String actionName = actionNames.get(i);
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Nullable
|
||||
NotificationCompat.Action action =
|
||||
playbackActions.containsKey(actionName)
|
||||
|
|
|
|||
|
|
@ -309,11 +309,7 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
|
|||
|
||||
@Nullable private Player player;
|
||||
private boolean useController;
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Nullable
|
||||
private PlayerControlView.VisibilityListener controllerVisibilityListener;
|
||||
|
||||
@Nullable private PlayerControlView.VisibilityListener controllerVisibilityListener;
|
||||
private boolean useArtwork;
|
||||
@Nullable private Drawable defaultArtwork;
|
||||
private @ShowBuffering int showBuffering;
|
||||
|
|
@ -568,10 +564,7 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
|
|||
@Nullable Player oldPlayer = this.player;
|
||||
if (oldPlayer != null) {
|
||||
oldPlayer.removeListener(componentListener);
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Nullable
|
||||
Player.VideoComponent oldVideoComponent = oldPlayer.getVideoComponent();
|
||||
@Nullable Player.VideoComponent oldVideoComponent = oldPlayer.getVideoComponent();
|
||||
if (oldVideoComponent != null) {
|
||||
oldVideoComponent.removeVideoListener(componentListener);
|
||||
if (surfaceView instanceof TextureView) {
|
||||
|
|
@ -584,10 +577,7 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
|
|||
oldVideoComponent.clearVideoSurfaceView((SurfaceView) surfaceView);
|
||||
}
|
||||
}
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Nullable
|
||||
Player.TextComponent oldTextComponent = oldPlayer.getTextComponent();
|
||||
@Nullable Player.TextComponent oldTextComponent = oldPlayer.getTextComponent();
|
||||
if (oldTextComponent != null) {
|
||||
oldTextComponent.removeTextOutput(componentListener);
|
||||
}
|
||||
|
|
@ -603,10 +593,7 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
|
|||
updateErrorMessage();
|
||||
updateForCurrentTrackSelections(/* isNewPlayer= */ true);
|
||||
if (player != null) {
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Nullable
|
||||
Player.VideoComponent newVideoComponent = player.getVideoComponent();
|
||||
@Nullable Player.VideoComponent newVideoComponent = player.getVideoComponent();
|
||||
if (newVideoComponent != null) {
|
||||
if (surfaceView instanceof TextureView) {
|
||||
newVideoComponent.setVideoTextureView((TextureView) surfaceView);
|
||||
|
|
@ -620,10 +607,7 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
|
|||
}
|
||||
newVideoComponent.addVideoListener(componentListener);
|
||||
}
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Nullable
|
||||
Player.TextComponent newTextComponent = player.getTextComponent();
|
||||
@Nullable Player.TextComponent newTextComponent = player.getTextComponent();
|
||||
if (newTextComponent != null) {
|
||||
newTextComponent.addTextOutput(componentListener);
|
||||
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
|
||||
* current listener.
|
||||
*/
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
public void setControllerVisibilityListener(
|
||||
@Nullable PlayerControlView.VisibilityListener listener) {
|
||||
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
|
||||
* markers.
|
||||
*/
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
public void setExtraAdGroupMarkers(
|
||||
@Nullable long[] extraAdGroupTimesMs, @Nullable boolean[] extraPlayedAdGroups) {
|
||||
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
|
||||
* the content frame.
|
||||
*/
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
public void setAspectRatioListener(
|
||||
@Nullable AspectRatioFrameLayout.AspectRatioListener listener) {
|
||||
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
|
||||
* 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(
|
||||
@Nullable long[] extraAdGroupTimesMs, @Nullable boolean[] extraPlayedAdGroups) {
|
||||
if (extraAdGroupTimesMs == null) {
|
||||
|
|
|
|||
|
|
@ -311,11 +311,7 @@ public class StyledPlayerView extends FrameLayout implements AdsLoader.AdViewPro
|
|||
|
||||
@Nullable private Player player;
|
||||
private boolean useController;
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Nullable
|
||||
private StyledPlayerControlView.VisibilityListener controllerVisibilityListener;
|
||||
|
||||
@Nullable private StyledPlayerControlView.VisibilityListener controllerVisibilityListener;
|
||||
private boolean useArtwork;
|
||||
@Nullable private Drawable defaultArtwork;
|
||||
private @ShowBuffering int showBuffering;
|
||||
|
|
@ -577,10 +573,7 @@ public class StyledPlayerView extends FrameLayout implements AdsLoader.AdViewPro
|
|||
@Nullable Player oldPlayer = this.player;
|
||||
if (oldPlayer != null) {
|
||||
oldPlayer.removeListener(componentListener);
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Nullable
|
||||
Player.VideoComponent oldVideoComponent = oldPlayer.getVideoComponent();
|
||||
@Nullable Player.VideoComponent oldVideoComponent = oldPlayer.getVideoComponent();
|
||||
if (oldVideoComponent != null) {
|
||||
oldVideoComponent.removeVideoListener(componentListener);
|
||||
if (surfaceView instanceof TextureView) {
|
||||
|
|
@ -593,10 +586,7 @@ public class StyledPlayerView extends FrameLayout implements AdsLoader.AdViewPro
|
|||
oldVideoComponent.clearVideoSurfaceView((SurfaceView) surfaceView);
|
||||
}
|
||||
}
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Nullable
|
||||
Player.TextComponent oldTextComponent = oldPlayer.getTextComponent();
|
||||
@Nullable Player.TextComponent oldTextComponent = oldPlayer.getTextComponent();
|
||||
if (oldTextComponent != null) {
|
||||
oldTextComponent.removeTextOutput(componentListener);
|
||||
}
|
||||
|
|
@ -612,10 +602,7 @@ public class StyledPlayerView extends FrameLayout implements AdsLoader.AdViewPro
|
|||
updateErrorMessage();
|
||||
updateForCurrentTrackSelections(/* isNewPlayer= */ true);
|
||||
if (player != null) {
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Nullable
|
||||
Player.VideoComponent newVideoComponent = player.getVideoComponent();
|
||||
@Nullable Player.VideoComponent newVideoComponent = player.getVideoComponent();
|
||||
if (newVideoComponent != null) {
|
||||
if (surfaceView instanceof TextureView) {
|
||||
newVideoComponent.setVideoTextureView((TextureView) surfaceView);
|
||||
|
|
@ -629,10 +616,7 @@ public class StyledPlayerView extends FrameLayout implements AdsLoader.AdViewPro
|
|||
}
|
||||
newVideoComponent.addVideoListener(componentListener);
|
||||
}
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Nullable
|
||||
Player.TextComponent newTextComponent = player.getTextComponent();
|
||||
@Nullable Player.TextComponent newTextComponent = player.getTextComponent();
|
||||
if (newTextComponent != null) {
|
||||
newTextComponent.addTextOutput(componentListener);
|
||||
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
|
||||
* current listener.
|
||||
*/
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
public void setControllerVisibilityListener(
|
||||
@Nullable StyledPlayerControlView.VisibilityListener listener) {
|
||||
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
|
||||
* 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(
|
||||
@Nullable StyledPlayerControlView.OnFullScreenModeChangedListener listener) {
|
||||
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
|
||||
* markers.
|
||||
*/
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
public void setExtraAdGroupMarkers(
|
||||
@Nullable long[] extraAdGroupTimesMs, @Nullable boolean[] extraPlayedAdGroups) {
|
||||
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
|
||||
* the content frame.
|
||||
*/
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
public void setAspectRatioListener(
|
||||
@Nullable AspectRatioFrameLayout.AspectRatioListener listener) {
|
||||
Assertions.checkStateNotNull(contentFrame);
|
||||
|
|
|
|||
|
|
@ -102,10 +102,8 @@ public interface TimeBar {
|
|||
* groups.
|
||||
* @param adGroupCount The number of ad groups.
|
||||
*/
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
void setAdGroupTimesMs(
|
||||
@Nullable long[] adGroupTimesMs, @Nullable boolean[] playedAdGroups, int adGroupCount);
|
||||
void setAdGroupTimesMs(@Nullable long[] adGroupTimesMs, @Nullable boolean[] playedAdGroups,
|
||||
int adGroupCount);
|
||||
|
||||
/**
|
||||
* 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) {
|
||||
if (alignment == null) {
|
||||
return "center";
|
||||
|
|
|
|||
|
|
@ -36,8 +36,6 @@ public final class CapturingAudioSink extends ForwardingAudioSink implements Dum
|
|||
interceptedData = new ArrayList<>();
|
||||
}
|
||||
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
@Override
|
||||
public void configure(Format inputFormat, int specifiedBufferSize, @Nullable int[] outputChannels)
|
||||
throws ConfigurationException {
|
||||
|
|
|
|||
|
|
@ -41,11 +41,7 @@ public final class DownloadBuilder {
|
|||
private Uri uri;
|
||||
@Nullable private String mimeType;
|
||||
private List<StreamKey> streamKeys;
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
@Nullable
|
||||
private byte[] keySetId;
|
||||
|
||||
@Nullable private byte[] keySetId;
|
||||
@Nullable private String cacheKey;
|
||||
private byte[] customMetadata;
|
||||
|
||||
|
|
@ -89,8 +85,6 @@ public final class DownloadBuilder {
|
|||
}
|
||||
|
||||
/** Creates a download builder. */
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
private DownloadBuilder(
|
||||
String id,
|
||||
Uri uri,
|
||||
|
|
|
|||
|
|
@ -54,8 +54,6 @@ public final class Dumper {
|
|||
return this;
|
||||
}
|
||||
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
public Dumper add(String field, @Nullable byte[] value) {
|
||||
String string =
|
||||
String.format(
|
||||
|
|
|
|||
|
|
@ -80,11 +80,7 @@ public class FakeDataSet {
|
|||
public static final class Segment {
|
||||
|
||||
@Nullable public final IOException exception;
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
@Nullable
|
||||
public final byte[] data;
|
||||
|
||||
@Nullable public final byte[] data;
|
||||
public final int length;
|
||||
public final long byteOffset;
|
||||
@Nullable public final Runnable action;
|
||||
|
|
@ -109,8 +105,6 @@ public class FakeDataSet {
|
|||
this(null, 0, null, action, previousSegment);
|
||||
}
|
||||
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
private Segment(
|
||||
@Nullable byte[] data,
|
||||
int length,
|
||||
|
|
|
|||
|
|
@ -170,8 +170,6 @@ public final class FakeExoMediaDrm implements ExoMediaDrm {
|
|||
return new KeyRequest(requestData.toByteArray(), /* licenseServerUrl= */ "");
|
||||
}
|
||||
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
@Nullable
|
||||
@Override
|
||||
public byte[] provideKeyResponse(byte[] scope, byte[] response)
|
||||
|
|
@ -245,10 +243,7 @@ public final class FakeExoMediaDrm implements ExoMediaDrm {
|
|||
@Override
|
||||
public byte[] getPropertyByteArray(String propertyName) {
|
||||
Assertions.checkState(referenceCount > 0);
|
||||
// nullness annotations are not applicable to primitive types
|
||||
@SuppressWarnings("nullness:nullness.on.primitive")
|
||||
@Nullable
|
||||
byte[] value = byteProperties.get(propertyName);
|
||||
@Nullable byte[] value = byteProperties.get(propertyName);
|
||||
if (value == null) {
|
||||
throw new IllegalArgumentException("Unrecognized propertyName: " + propertyName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,11 +81,7 @@ public class FakeMediaSource extends BaseMediaSource {
|
|||
private static final int MANIFEST_LOAD_BYTES = 100;
|
||||
|
||||
private final TrackGroupArray trackGroupArray;
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Nullable
|
||||
private final FakeMediaPeriod.TrackDataFactory trackDataFactory;
|
||||
|
||||
@Nullable private final FakeMediaPeriod.TrackDataFactory trackDataFactory;
|
||||
private final ArrayList<FakeMediaPeriod> activeMediaPeriods;
|
||||
private final ArrayList<MediaPeriodId> createdMediaPeriods;
|
||||
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
|
||||
* can be manually set later using {@link #setNewSourceInfo(Timeline)}.
|
||||
*/
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
public FakeMediaSource(
|
||||
@Nullable Timeline timeline,
|
||||
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
|
||||
* later using {@link #setNewSourceInfo(Timeline)}.
|
||||
*/
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
public FakeMediaSource(
|
||||
@Nullable Timeline timeline,
|
||||
DrmSessionManager drmSessionManager,
|
||||
|
|
|
|||
|
|
@ -126,11 +126,7 @@ public class FakeSampleStream implements SampleStream {
|
|||
}
|
||||
}
|
||||
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
@Nullable
|
||||
private final MediaSourceEventListener.EventDispatcher mediaSourceEventDispatcher;
|
||||
|
||||
@Nullable private final MediaSourceEventListener.EventDispatcher mediaSourceEventDispatcher;
|
||||
private final Format initialFormat;
|
||||
private final List<FakeSampleStreamItem> fakeSampleStreamItems;
|
||||
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
|
||||
* FakeSampleStreamItem#END_OF_STREAM_ITEM}.
|
||||
*/
|
||||
// nullness annotations are not applicable to outer types
|
||||
@SuppressWarnings("nullness:nullness.on.outer")
|
||||
public FakeSampleStream(
|
||||
@Nullable MediaSourceEventListener.EventDispatcher mediaSourceEventDispatcher,
|
||||
DrmSessionManager drmSessionManager,
|
||||
|
|
|
|||
Loading…
Reference in a new issue