Commit d4e19046 by tonihei Committed by kim-vde

Rollback of https://github.com/google/ExoPlayer/commit/483a350e84367f0c1bacbea293ba0108ffd3ca9e

*** Original commit ***

Suppress warnings in preparation for Checker Framework 3.7.1 upgrade.

LSC: go/checker-lsc

Tested:
    TAP train for global presubmit queue
    http://test/OCL:342788973:BASE:342817196:1605636478036:6c558c0c

***

PiperOrigin-RevId: 343895651
parent 64d11a98
Showing with 23 additions and 183 deletions
...@@ -52,14 +52,8 @@ import javax.microedition.khronos.opengles.GL10; ...@@ -52,14 +52,8 @@ import javax.microedition.khronos.opengles.GL10;
private final Canvas overlayCanvas; private final Canvas overlayCanvas;
private int program; private int program;
// nullness annotations are not applicable to outer types @Nullable private GlUtil.Attribute[] attributes;
@SuppressWarnings("nullness:nullness.on.outer") @Nullable private GlUtil.Uniform[] uniforms;
@Nullable
private GlUtil.Attribute[] attributes;
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable
private GlUtil.Uniform[] uniforms;
private float bitmapScaleX; private float bitmapScaleX;
private float bitmapScaleY; private float bitmapScaleY;
......
...@@ -72,10 +72,7 @@ public final class VideoProcessingGLSurfaceView extends GLSurfaceView { ...@@ -72,10 +72,7 @@ public final class VideoProcessingGLSurfaceView extends GLSurfaceView {
@Nullable private SurfaceTexture surfaceTexture; @Nullable private SurfaceTexture surfaceTexture;
@Nullable private Surface surface; @Nullable private Surface surface;
// nullness annotations are not applicable to outer types @Nullable private Player.VideoComponent videoComponent;
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable
private Player.VideoComponent videoComponent;
/** /**
* Creates a new instance. Pass {@code true} for {@code requireSecureContext} if the {@link * Creates a new instance. Pass {@code true} for {@code requireSecureContext} if the {@link
...@@ -154,8 +151,6 @@ public final class VideoProcessingGLSurfaceView extends GLSurfaceView { ...@@ -154,8 +151,6 @@ public final class VideoProcessingGLSurfaceView extends GLSurfaceView {
* *
* @param newVideoComponent The new video component, or {@code null} to detach this view. * @param newVideoComponent The new video component, or {@code null} to detach this view.
*/ */
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
public void setVideoComponent(@Nullable Player.VideoComponent newVideoComponent) { public void setVideoComponent(@Nullable Player.VideoComponent newVideoComponent) {
if (newVideoComponent == videoComponent) { if (newVideoComponent == videoComponent) {
return; return;
......
...@@ -670,10 +670,7 @@ import java.util.Map; ...@@ -670,10 +670,7 @@ import java.util.Map;
return lastVolumePercent; return lastVolumePercent;
} }
// nullness annotations are not applicable to outer types @Nullable Player.AudioComponent audioComponent = player.getAudioComponent();
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable
Player.AudioComponent audioComponent = player.getAudioComponent();
if (audioComponent != null) { if (audioComponent != null) {
return (int) (audioComponent.getVolume() * 100); return (int) (audioComponent.getVolume() * 100);
} }
......
...@@ -110,11 +110,7 @@ public final class ImaAdsLoader implements Player.EventListener, AdsLoader { ...@@ -110,11 +110,7 @@ public final class ImaAdsLoader implements Player.EventListener, AdsLoader {
@Nullable private ImaSdkSettings imaSdkSettings; @Nullable private ImaSdkSettings imaSdkSettings;
@Nullable private AdErrorListener adErrorListener; @Nullable private AdErrorListener adErrorListener;
@Nullable private AdEventListener adEventListener; @Nullable private AdEventListener adEventListener;
// nullness annotations are not applicable to outer types @Nullable private VideoAdPlayer.VideoAdPlayerCallback videoAdPlayerCallback;
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable
private VideoAdPlayer.VideoAdPlayerCallback videoAdPlayerCallback;
@Nullable private List<String> adMediaMimeTypes; @Nullable private List<String> adMediaMimeTypes;
@Nullable private Set<UiElement> adUiElements; @Nullable private Set<UiElement> adUiElements;
@Nullable private Collection<CompanionAdSlot> companionAdSlots; @Nullable private Collection<CompanionAdSlot> companionAdSlots;
...@@ -400,8 +396,6 @@ public final class ImaAdsLoader implements Player.EventListener, AdsLoader { ...@@ -400,8 +396,6 @@ public final class ImaAdsLoader implements Player.EventListener, AdsLoader {
* Returns the underlying {@link com.google.ads.interactivemedia.v3.api.AdsLoader} wrapped by this * Returns the underlying {@link com.google.ads.interactivemedia.v3.api.AdsLoader} wrapped by this
* instance, or {@code null} if ads have not been requested yet. * instance, or {@code null} if ads have not been requested yet.
*/ */
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable @Nullable
public com.google.ads.interactivemedia.v3.api.AdsLoader getAdsLoader() { public com.google.ads.interactivemedia.v3.api.AdsLoader getAdsLoader() {
return currentAdTagLoader != null ? currentAdTagLoader.getAdsLoader() : null; return currentAdTagLoader != null ? currentAdTagLoader.getAdsLoader() : null;
......
...@@ -92,24 +92,12 @@ import java.util.Set; ...@@ -92,24 +92,12 @@ import java.util.Set;
@Nullable public final List<String> adMediaMimeTypes; @Nullable public final List<String> adMediaMimeTypes;
@Nullable public final Set<UiElement> adUiElements; @Nullable public final Set<UiElement> adUiElements;
@Nullable public final Collection<CompanionAdSlot> companionAdSlots; @Nullable public final Collection<CompanionAdSlot> companionAdSlots;
// nullness annotations are not applicable to outer types @Nullable public final AdErrorEvent.AdErrorListener applicationAdErrorListener;
@SuppressWarnings("nullness:nullness.on.outer") @Nullable public final AdEvent.AdEventListener applicationAdEventListener;
@Nullable @Nullable public final VideoAdPlayer.VideoAdPlayerCallback applicationVideoAdPlayerCallback;
public final AdErrorEvent.AdErrorListener applicationAdErrorListener;
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable
public final AdEvent.AdEventListener applicationAdEventListener;
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable
public final VideoAdPlayer.VideoAdPlayerCallback applicationVideoAdPlayerCallback;
@Nullable public final ImaSdkSettings imaSdkSettings; @Nullable public final ImaSdkSettings imaSdkSettings;
public final boolean debugModeEnabled; public final boolean debugModeEnabled;
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
public Configuration( public Configuration(
long adPreloadTimeoutMs, long adPreloadTimeoutMs,
int vastLoadTimeoutMs, int vastLoadTimeoutMs,
......
...@@ -53,10 +53,7 @@ public class DefaultMediaItemConverter implements MediaItemConverter { ...@@ -53,10 +53,7 @@ public class DefaultMediaItemConverter implements MediaItemConverter {
UriMediaItem uriMediaItem = (UriMediaItem) media2MediaItem; UriMediaItem uriMediaItem = (UriMediaItem) media2MediaItem;
uri = uriMediaItem.getUri(); uri = uriMediaItem.getUri();
} }
// nullness annotations are not applicable to outer types @Nullable androidx.media2.common.MediaMetadata metadata = media2MediaItem.getMetadata();
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable
androidx.media2.common.MediaMetadata metadata = media2MediaItem.getMetadata();
if (metadata != null) { if (metadata != null) {
@Nullable String uriString = metadata.getString(METADATA_KEY_MEDIA_URI); @Nullable String uriString = metadata.getString(METADATA_KEY_MEDIA_URI);
mediaId = metadata.getString(METADATA_KEY_MEDIA_ID); mediaId = metadata.getString(METADATA_KEY_MEDIA_ID);
......
...@@ -83,8 +83,6 @@ import java.util.List; ...@@ -83,8 +83,6 @@ import java.util.List;
void onPlaybackEnded(); void onPlaybackEnded();
/** Called when the player encounters an error. */ /** Called when the player encounters an error. */
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
void onError(@Nullable androidx.media2.common.MediaItem media2MediaItem); void onError(@Nullable androidx.media2.common.MediaItem media2MediaItem);
/** Called when the playlist is changed. */ /** Called when the playlist is changed. */
...@@ -141,10 +139,7 @@ import java.util.List; ...@@ -141,10 +139,7 @@ import java.util.List;
controlDispatcher = new DefaultControlDispatcher(); controlDispatcher = new DefaultControlDispatcher();
componentListener = new ComponentListener(); componentListener = new ComponentListener();
player.addListener(componentListener); player.addListener(componentListener);
// nullness annotations are not applicable to outer types @Nullable Player.AudioComponent audioComponent = player.getAudioComponent();
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable
Player.AudioComponent audioComponent = player.getAudioComponent();
if (audioComponent != null) { if (audioComponent != null) {
audioComponent.addAudioListener(componentListener); audioComponent.addAudioListener(componentListener);
} }
...@@ -307,8 +302,6 @@ import java.util.List; ...@@ -307,8 +302,6 @@ import java.util.List;
return player.getNextWindowIndex(); return player.getNextWindowIndex();
} }
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable @Nullable
public androidx.media2.common.MediaItem getCurrentMediaItem() { public androidx.media2.common.MediaItem getCurrentMediaItem() {
int index = getCurrentMediaItemIndex(); int index = getCurrentMediaItemIndex();
...@@ -456,10 +449,7 @@ import java.util.List; ...@@ -456,10 +449,7 @@ import java.util.List;
} }
public AudioAttributesCompat getAudioAttributes() { public AudioAttributesCompat getAudioAttributes() {
// nullness annotations are not applicable to outer types @Nullable Player.AudioComponent audioComponent = player.getAudioComponent();
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable
Player.AudioComponent audioComponent = player.getAudioComponent();
return Utils.getAudioAttributesCompat( return Utils.getAudioAttributesCompat(
audioComponent != null ? audioComponent.getAudioAttributes() : AudioAttributes.DEFAULT); audioComponent != null ? audioComponent.getAudioAttributes() : AudioAttributes.DEFAULT);
} }
...@@ -482,10 +472,7 @@ import java.util.List; ...@@ -482,10 +472,7 @@ import java.util.List;
handler.removeCallbacks(pollBufferRunnable); handler.removeCallbacks(pollBufferRunnable);
player.removeListener(componentListener); player.removeListener(componentListener);
// nullness annotations are not applicable to outer types @Nullable Player.AudioComponent audioComponent = player.getAudioComponent();
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable
Player.AudioComponent audioComponent = player.getAudioComponent();
if (audioComponent != null) { if (audioComponent != null) {
audioComponent.removeAudioListener(componentListener); audioComponent.removeAudioListener(componentListener);
} }
......
...@@ -105,8 +105,6 @@ import java.util.concurrent.TimeoutException; ...@@ -105,8 +105,6 @@ import java.util.concurrent.TimeoutException;
return allowedCommandProvider.getAllowedCommands(session, controllerInfo, baseAllowedCommands); return allowedCommandProvider.getAllowedCommands(session, controllerInfo, baseAllowedCommands);
} }
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Override @Override
public void onPostConnect( public void onPostConnect(
@NonNull MediaSession session, @NonNull MediaSession.ControllerInfo controller) { @NonNull MediaSession session, @NonNull MediaSession.ControllerInfo controller) {
...@@ -176,8 +174,6 @@ import java.util.concurrent.TimeoutException; ...@@ -176,8 +174,6 @@ import java.util.concurrent.TimeoutException;
return SessionResult.RESULT_ERROR_NOT_SUPPORTED; return SessionResult.RESULT_ERROR_NOT_SUPPORTED;
} }
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Override @Override
public int onSkipBackward( public int onSkipBackward(
@NonNull MediaSession session, @NonNull MediaSession.ControllerInfo controller) { @NonNull MediaSession session, @NonNull MediaSession.ControllerInfo controller) {
...@@ -187,8 +183,6 @@ import java.util.concurrent.TimeoutException; ...@@ -187,8 +183,6 @@ import java.util.concurrent.TimeoutException;
return SessionResult.RESULT_ERROR_NOT_SUPPORTED; return SessionResult.RESULT_ERROR_NOT_SUPPORTED;
} }
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Override @Override
public int onSkipForward( public int onSkipForward(
@NonNull MediaSession session, @NonNull MediaSession.ControllerInfo controller) { @NonNull MediaSession session, @NonNull MediaSession.ControllerInfo controller) {
......
...@@ -149,11 +149,7 @@ public final class Format implements Parcelable { ...@@ -149,11 +149,7 @@ public final class Format implements Parcelable {
private float frameRate; private float frameRate;
private int rotationDegrees; private int rotationDegrees;
private float pixelWidthHeightRatio; private float pixelWidthHeightRatio;
// nullness annotations are not applicable to primitive types @Nullable private byte[] projectionData;
@SuppressWarnings("nullness:nullness.on.primitive")
@Nullable
private byte[] projectionData;
@C.StereoMode private int stereoMode; @C.StereoMode private int stereoMode;
@Nullable private ColorInfo colorInfo; @Nullable private ColorInfo colorInfo;
...@@ -482,8 +478,6 @@ public final class Format implements Parcelable { ...@@ -482,8 +478,6 @@ public final class Format implements Parcelable {
* @param projectionData The {@link Format#projectionData}. * @param projectionData The {@link Format#projectionData}.
* @return The builder. * @return The builder.
*/ */
// nullness annotations are not applicable to primitive types
@SuppressWarnings("nullness:nullness.on.primitive")
public Builder setProjectionData(@Nullable byte[] projectionData) { public Builder setProjectionData(@Nullable byte[] projectionData) {
this.projectionData = projectionData; this.projectionData = projectionData;
return this; return this;
...@@ -723,10 +717,7 @@ public final class Format implements Parcelable { ...@@ -723,10 +717,7 @@ public final class Format implements Parcelable {
/** The width to height ratio of pixels in the video, or 1.0 if unknown or not applicable. */ /** The width to height ratio of pixels in the video, or 1.0 if unknown or not applicable. */
public final float pixelWidthHeightRatio; public final float pixelWidthHeightRatio;
/** The projection data for 360/VR video, or null if not applicable. */ /** The projection data for 360/VR video, or null if not applicable. */
// nullness annotations are not applicable to primitive types @Nullable public final byte[] projectionData;
@SuppressWarnings("nullness:nullness.on.primitive")
@Nullable
public final byte[] projectionData;
/** /**
* The stereo layout for 360/3D/VR video, or {@link #NO_VALUE} if not applicable. Valid stereo * The stereo layout for 360/3D/VR video, or {@link #NO_VALUE} if not applicable. Valid stereo
* modes are {@link C#STEREO_MODE_MONO}, {@link C#STEREO_MODE_TOP_BOTTOM}, {@link * modes are {@link C#STEREO_MODE_MONO}, {@link C#STEREO_MODE_TOP_BOTTOM}, {@link
...@@ -872,8 +863,6 @@ public final class Format implements Parcelable { ...@@ -872,8 +863,6 @@ public final class Format implements Parcelable {
} }
/** @deprecated Use {@link Format.Builder}. */ /** @deprecated Use {@link Format.Builder}. */
// nullness annotations are not applicable to primitive types
@SuppressWarnings("nullness:nullness.on.primitive")
@Deprecated @Deprecated
public static Format createVideoSampleFormat( public static Format createVideoSampleFormat(
@Nullable String id, @Nullable String id,
......
...@@ -72,11 +72,7 @@ public final class MediaItem { ...@@ -72,11 +72,7 @@ public final class MediaItem {
private boolean drmPlayClearContentWithoutKey; private boolean drmPlayClearContentWithoutKey;
private boolean drmForceDefaultLicenseUri; private boolean drmForceDefaultLicenseUri;
private List<Integer> drmSessionForClearTypes; private List<Integer> drmSessionForClearTypes;
// nullness annotations are not applicable to primitive types @Nullable private byte[] drmKeySetId;
@SuppressWarnings("nullness:nullness.on.primitive")
@Nullable
private byte[] drmKeySetId;
private List<StreamKey> streamKeys; private List<StreamKey> streamKeys;
@Nullable private String customCacheKey; @Nullable private String customCacheKey;
private List<Subtitle> subtitles; private List<Subtitle> subtitles;
...@@ -370,8 +366,6 @@ public final class MediaItem { ...@@ -370,8 +366,6 @@ public final class MediaItem {
* *
* <p>If no valid DRM configuration is specified, the key set ID is ignored. * <p>If no valid DRM configuration is specified, the key set ID is ignored.
*/ */
// nullness annotations are not applicable to primitive types
@SuppressWarnings("nullness:nullness.on.primitive")
public Builder setDrmKeySetId(@Nullable byte[] keySetId) { public Builder setDrmKeySetId(@Nullable byte[] keySetId) {
this.drmKeySetId = keySetId != null ? Arrays.copyOf(keySetId, keySetId.length) : null; this.drmKeySetId = keySetId != null ? Arrays.copyOf(keySetId, keySetId.length) : null;
return this; return this;
...@@ -641,13 +635,8 @@ public final class MediaItem { ...@@ -641,13 +635,8 @@ public final class MediaItem {
/** The types of clear tracks for which to use a DRM session. */ /** The types of clear tracks for which to use a DRM session. */
public final List<Integer> sessionForClearTypes; public final List<Integer> sessionForClearTypes;
// nullness annotations are not applicable to primitive types @Nullable private final byte[] keySetId;
@SuppressWarnings("nullness:nullness.on.primitive")
@Nullable
private final byte[] keySetId;
// nullness annotations are not applicable to primitive types
@SuppressWarnings("nullness:nullness.on.primitive")
private DrmConfiguration( private DrmConfiguration(
UUID uuid, UUID uuid,
@Nullable Uri licenseUri, @Nullable Uri licenseUri,
...@@ -669,8 +658,6 @@ public final class MediaItem { ...@@ -669,8 +658,6 @@ public final class MediaItem {
} }
/** Returns the key set ID of the offline license. */ /** Returns the key set ID of the offline license. */
// nullness annotations are not applicable to primitive types
@SuppressWarnings("nullness:nullness.on.primitive")
@Nullable @Nullable
public byte[] getKeySetId() { public byte[] getKeySetId() {
return keySetId != null ? Arrays.copyOf(keySetId, keySetId.length) : null; return keySetId != null ? Arrays.copyOf(keySetId, keySetId.length) : null;
......
...@@ -109,8 +109,6 @@ public final class CodecSpecificDataUtil { ...@@ -109,8 +109,6 @@ public final class CodecSpecificDataUtil {
* @return The individual NAL units, or null if the input did not consist of NAL start code * @return The individual NAL units, or null if the input did not consist of NAL start code
* delimited units. * delimited units.
*/ */
// nullness annotations are not applicable to primitive types
@SuppressWarnings("nullness:nullness.on.primitive")
@Nullable @Nullable
public static byte[][] splitNalUnits(byte[] data) { public static byte[][] splitNalUnits(byte[] data) {
if (!isNalStartCode(data, 0)) { if (!isNalStartCode(data, 0)) {
......
...@@ -446,8 +446,6 @@ public final class Util { ...@@ -446,8 +446,6 @@ public final class Util {
* @return A {@link Handler} with the specified callback on the current {@link Looper} thread. * @return A {@link Handler} with the specified callback on the current {@link Looper} thread.
* @throws IllegalStateException If the current thread doesn't have a {@link Looper}. * @throws IllegalStateException If the current thread doesn't have a {@link Looper}.
*/ */
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
public static Handler createHandlerForCurrentLooper( public static Handler createHandlerForCurrentLooper(
@Nullable Handler.@UnknownInitialization Callback callback) { @Nullable Handler.@UnknownInitialization Callback callback) {
return createHandler(Assertions.checkStateNotNull(Looper.myLooper()), callback); return createHandler(Assertions.checkStateNotNull(Looper.myLooper()), callback);
...@@ -477,8 +475,6 @@ public final class Util { ...@@ -477,8 +475,6 @@ public final class Util {
* callback is required. * callback is required.
* @return A {@link Handler} with the specified callback on the current {@link Looper} thread. * @return A {@link Handler} with the specified callback on the current {@link Looper} thread.
*/ */
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
public static Handler createHandlerForCurrentOrMainLooper( public static Handler createHandlerForCurrentOrMainLooper(
@Nullable Handler.@UnknownInitialization Callback callback) { @Nullable Handler.@UnknownInitialization Callback callback) {
return createHandler(getCurrentOrMainLooper(), callback); return createHandler(getCurrentOrMainLooper(), callback);
...@@ -496,12 +492,7 @@ public final class Util { ...@@ -496,12 +492,7 @@ public final class Util {
* callback is required. * callback is required.
* @return A {@link Handler} with the specified callback on the current {@link Looper} thread. * @return A {@link Handler} with the specified callback on the current {@link Looper} thread.
*/ */
// nullness annotations are not applicable to outer types @SuppressWarnings({"nullness:argument.type.incompatible", "nullness:return.type.incompatible"})
@SuppressWarnings({
"nullness:argument.type.incompatible",
"nullness:return.type.incompatible",
"nullness:nullness.on.outer"
})
public static Handler createHandler( public static Handler createHandler(
Looper looper, @Nullable Handler.@UnknownInitialization Callback callback) { Looper looper, @Nullable Handler.@UnknownInitialization Callback callback) {
return new Handler(looper, callback); return new Handler(looper, callback);
......
...@@ -164,8 +164,6 @@ public abstract class BasePlayer implements Player { ...@@ -164,8 +164,6 @@ public abstract class BasePlayer implements Player {
if (timeline.isEmpty()) { if (timeline.isEmpty()) {
return null; return null;
} }
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable @Nullable
MediaItem.PlaybackProperties playbackProperties = MediaItem.PlaybackProperties playbackProperties =
timeline.getWindow(getCurrentWindowIndex(), window).mediaItem.playbackProperties; timeline.getWindow(getCurrentWindowIndex(), window).mediaItem.playbackProperties;
......
...@@ -137,10 +137,7 @@ public final class ExoPlaybackException extends Exception { ...@@ -137,10 +137,7 @@ public final class ExoPlaybackException extends Exception {
* The {@link MediaSource.MediaPeriodId} of the media associated with this error, or null if * The {@link MediaSource.MediaPeriodId} of the media associated with this error, or null if
* undetermined. * undetermined.
*/ */
// nullness annotations are not applicable to outer types @Nullable public final MediaSource.MediaPeriodId mediaPeriodId;
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable
public final MediaSource.MediaPeriodId mediaPeriodId;
/** /**
* Whether the error may be recoverable. * Whether the error may be recoverable.
...@@ -329,8 +326,6 @@ public final class ExoPlaybackException extends Exception { ...@@ -329,8 +326,6 @@ public final class ExoPlaybackException extends Exception {
isRecoverable); isRecoverable);
} }
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
private ExoPlaybackException( private ExoPlaybackException(
@Nullable String message, @Nullable String message,
@Nullable Throwable cause, @Nullable Throwable cause,
...@@ -412,8 +407,6 @@ public final class ExoPlaybackException extends Exception { ...@@ -412,8 +407,6 @@ public final class ExoPlaybackException extends Exception {
* @param mediaPeriodId The {@link MediaSource.MediaPeriodId}. * @param mediaPeriodId The {@link MediaSource.MediaPeriodId}.
* @return The copied exception. * @return The copied exception.
*/ */
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@CheckResult @CheckResult
/* package */ ExoPlaybackException copyWithMediaPeriodId( /* package */ ExoPlaybackException copyWithMediaPeriodId(
@Nullable MediaSource.MediaPeriodId mediaPeriodId) { @Nullable MediaSource.MediaPeriodId mediaPeriodId) {
......
...@@ -410,8 +410,6 @@ import java.util.Set; ...@@ -410,8 +410,6 @@ import java.util.Set;
// Internal methods to manage child sources. // Internal methods to manage child sources.
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable @Nullable
private static MediaSource.MediaPeriodId getMediaPeriodIdForChildMediaPeriodId( private static MediaSource.MediaPeriodId getMediaPeriodIdForChildMediaPeriodId(
MediaSourceHolder mediaSourceHolder, MediaSource.MediaPeriodId mediaPeriodId) { MediaSourceHolder mediaSourceHolder, MediaSource.MediaPeriodId mediaPeriodId) {
...@@ -532,8 +530,6 @@ import java.util.Set; ...@@ -532,8 +530,6 @@ import java.util.Set;
// MediaSourceEventListener implementation // MediaSourceEventListener implementation
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Override @Override
public void onLoadStarted( public void onLoadStarted(
int windowIndex, int windowIndex,
...@@ -545,8 +541,6 @@ import java.util.Set; ...@@ -545,8 +541,6 @@ import java.util.Set;
} }
} }
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Override @Override
public void onLoadCompleted( public void onLoadCompleted(
int windowIndex, int windowIndex,
...@@ -558,8 +552,6 @@ import java.util.Set; ...@@ -558,8 +552,6 @@ import java.util.Set;
} }
} }
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Override @Override
public void onLoadCanceled( public void onLoadCanceled(
int windowIndex, int windowIndex,
...@@ -571,8 +563,6 @@ import java.util.Set; ...@@ -571,8 +563,6 @@ import java.util.Set;
} }
} }
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Override @Override
public void onLoadError( public void onLoadError(
int windowIndex, int windowIndex,
...@@ -586,8 +576,6 @@ import java.util.Set; ...@@ -586,8 +576,6 @@ import java.util.Set;
} }
} }
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Override @Override
public void onUpstreamDiscarded( public void onUpstreamDiscarded(
int windowIndex, int windowIndex,
...@@ -598,8 +586,6 @@ import java.util.Set; ...@@ -598,8 +586,6 @@ import java.util.Set;
} }
} }
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Override @Override
public void onDownstreamFormatChanged( public void onDownstreamFormatChanged(
int windowIndex, int windowIndex,
...@@ -612,8 +598,6 @@ import java.util.Set; ...@@ -612,8 +598,6 @@ import java.util.Set;
// DrmSessionEventListener implementation // DrmSessionEventListener implementation
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Override @Override
public void onDrmSessionAcquired( public void onDrmSessionAcquired(
int windowIndex, @Nullable MediaSource.MediaPeriodId mediaPeriodId) { int windowIndex, @Nullable MediaSource.MediaPeriodId mediaPeriodId) {
...@@ -622,8 +606,6 @@ import java.util.Set; ...@@ -622,8 +606,6 @@ import java.util.Set;
} }
} }
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Override @Override
public void onDrmKeysLoaded( public void onDrmKeysLoaded(
int windowIndex, @Nullable MediaSource.MediaPeriodId mediaPeriodId) { int windowIndex, @Nullable MediaSource.MediaPeriodId mediaPeriodId) {
...@@ -632,8 +614,6 @@ import java.util.Set; ...@@ -632,8 +614,6 @@ import java.util.Set;
} }
} }
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Override @Override
public void onDrmSessionManagerError( public void onDrmSessionManagerError(
int windowIndex, @Nullable MediaSource.MediaPeriodId mediaPeriodId, Exception error) { int windowIndex, @Nullable MediaSource.MediaPeriodId mediaPeriodId, Exception error) {
...@@ -642,8 +622,6 @@ import java.util.Set; ...@@ -642,8 +622,6 @@ import java.util.Set;
} }
} }
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Override @Override
public void onDrmKeysRestored( public void onDrmKeysRestored(
int windowIndex, @Nullable MediaSource.MediaPeriodId mediaPeriodId) { int windowIndex, @Nullable MediaSource.MediaPeriodId mediaPeriodId) {
...@@ -652,8 +630,6 @@ import java.util.Set; ...@@ -652,8 +630,6 @@ import java.util.Set;
} }
} }
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Override @Override
public void onDrmKeysRemoved( public void onDrmKeysRemoved(
int windowIndex, @Nullable MediaSource.MediaPeriodId mediaPeriodId) { int windowIndex, @Nullable MediaSource.MediaPeriodId mediaPeriodId) {
...@@ -662,8 +638,6 @@ import java.util.Set; ...@@ -662,8 +638,6 @@ import java.util.Set;
} }
} }
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Override @Override
public void onDrmSessionReleased( public void onDrmSessionReleased(
int windowIndex, @Nullable MediaSource.MediaPeriodId mediaPeriodId) { int windowIndex, @Nullable MediaSource.MediaPeriodId mediaPeriodId) {
...@@ -673,14 +647,9 @@ import java.util.Set; ...@@ -673,14 +647,9 @@ import java.util.Set;
} }
/** Updates the event dispatcher and returns whether the event should be dispatched. */ /** Updates the event dispatcher and returns whether the event should be dispatched. */
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
private boolean maybeUpdateEventDispatcher( private boolean maybeUpdateEventDispatcher(
int childWindowIndex, @Nullable MediaSource.MediaPeriodId childMediaPeriodId) { int childWindowIndex, @Nullable MediaSource.MediaPeriodId childMediaPeriodId) {
// nullness annotations are not applicable to outer types @Nullable MediaSource.MediaPeriodId mediaPeriodId = null;
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable
MediaSource.MediaPeriodId mediaPeriodId = null;
if (childMediaPeriodId != null) { if (childMediaPeriodId != null) {
mediaPeriodId = getMediaPeriodIdForChildMediaPeriodId(id, childMediaPeriodId); mediaPeriodId = getMediaPeriodIdForChildMediaPeriodId(id, childMediaPeriodId);
if (mediaPeriodId == null) { if (mediaPeriodId == null) {
......
...@@ -73,10 +73,7 @@ public final class Mp4WebvttDecoder extends SimpleSubtitleDecoder { ...@@ -73,10 +73,7 @@ public final class Mp4WebvttDecoder extends SimpleSubtitleDecoder {
private static Cue parseVttCueBox(ParsableByteArray sampleData, int remainingCueBoxBytes) private static Cue parseVttCueBox(ParsableByteArray sampleData, int remainingCueBoxBytes)
throws SubtitleDecoderException { throws SubtitleDecoderException {
// nullness annotations are not applicable to outer types @Nullable Cue.Builder cueBuilder = null;
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable
Cue.Builder cueBuilder = null;
@Nullable CharSequence cueText = null; @Nullable CharSequence cueText = null;
while (remainingCueBoxBytes > 0) { while (remainingCueBoxBytes > 0) {
if (remainingCueBoxBytes < BOX_HEADER_SIZE) { if (remainingCueBoxBytes < BOX_HEADER_SIZE) {
......
...@@ -872,8 +872,6 @@ public final class WebvttCueParser { ...@@ -872,8 +872,6 @@ public final class WebvttCueParser {
} }
} }
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable @Nullable
private static Layout.Alignment convertTextAlignment(@TextAlignment int textAlignment) { private static Layout.Alignment convertTextAlignment(@TextAlignment int textAlignment) {
switch (textAlignment) { switch (textAlignment) {
......
...@@ -538,10 +538,7 @@ public class AdaptiveTrackSelection extends BaseTrackSelection { ...@@ -538,10 +538,7 @@ public class AdaptiveTrackSelection extends BaseTrackSelection {
private final float bandwidthFraction; private final float bandwidthFraction;
private final long reservedBandwidth; private final long reservedBandwidth;
// nullness annotations are not applicable to primitive types @Nullable private long[][] allocationCheckpoints;
@SuppressWarnings("nullness:nullness.on.primitive")
@Nullable
private long[][] allocationCheckpoints;
/* package */ DefaultBandwidthProvider( /* package */ DefaultBandwidthProvider(
BandwidthMeter bandwidthMeter, float bandwidthFraction, long reservedBandwidth) { BandwidthMeter bandwidthMeter, float bandwidthFraction, long reservedBandwidth) {
......
...@@ -1805,8 +1805,6 @@ public class DefaultTrackSelector extends MappingTrackSelector { ...@@ -1805,8 +1805,6 @@ public class DefaultTrackSelector extends MappingTrackSelector {
* made. * made.
* @throws ExoPlaybackException If an error occurs while selecting the tracks. * @throws ExoPlaybackException If an error occurs while selecting the tracks.
*/ */
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable @Nullable
protected TrackSelection.Definition selectVideoTrack( protected TrackSelection.Definition selectVideoTrack(
TrackGroupArray groups, TrackGroupArray groups,
...@@ -1828,8 +1826,6 @@ public class DefaultTrackSelector extends MappingTrackSelector { ...@@ -1828,8 +1826,6 @@ public class DefaultTrackSelector extends MappingTrackSelector {
return definition; return definition;
} }
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable @Nullable
private static TrackSelection.Definition selectAdaptiveVideoTrack( private static TrackSelection.Definition selectAdaptiveVideoTrack(
TrackGroupArray groups, TrackGroupArray groups,
...@@ -2046,8 +2042,6 @@ public class DefaultTrackSelector extends MappingTrackSelector { ...@@ -2046,8 +2042,6 @@ public class DefaultTrackSelector extends MappingTrackSelector {
|| (minVideoBitrate <= format.bitrate && format.bitrate <= maxVideoBitrate)); || (minVideoBitrate <= format.bitrate && format.bitrate <= maxVideoBitrate));
} }
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable @Nullable
private static TrackSelection.Definition selectFixedVideoTrack( private static TrackSelection.Definition selectFixedVideoTrack(
TrackGroupArray groups, @Capabilities int[][] formatSupport, Parameters params) { TrackGroupArray groups, @Capabilities int[][] formatSupport, Parameters params) {
...@@ -2292,8 +2286,6 @@ public class DefaultTrackSelector extends MappingTrackSelector { ...@@ -2292,8 +2286,6 @@ public class DefaultTrackSelector extends MappingTrackSelector {
* @return The {@link TrackSelection} for the renderer, or null if no selection was made. * @return The {@link TrackSelection} for the renderer, or null if no selection was made.
* @throws ExoPlaybackException If an error occurs while selecting the tracks. * @throws ExoPlaybackException If an error occurs while selecting the tracks.
*/ */
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable @Nullable
protected TrackSelection.Definition selectOtherTrack( protected TrackSelection.Definition selectOtherTrack(
int trackType, TrackGroupArray groups, @Capabilities int[][] formatSupport, Parameters params) int trackType, TrackGroupArray groups, @Capabilities int[][] formatSupport, Parameters params)
......
...@@ -63,8 +63,6 @@ public final class FlacMetadataReader { ...@@ -63,8 +63,6 @@ public final class FlacMetadataReader {
@Nullable @Nullable
public static Metadata peekId3Metadata(ExtractorInput input, boolean parseData) public static Metadata peekId3Metadata(ExtractorInput input, boolean parseData)
throws IOException { throws IOException {
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable @Nullable
Id3Decoder.FramePredicate id3FramePredicate = parseData ? null : Id3Decoder.NO_FRAMES_PREDICATE; Id3Decoder.FramePredicate id3FramePredicate = parseData ? null : Id3Decoder.NO_FRAMES_PREDICATE;
@Nullable Metadata id3Metadata = new Id3Peeker().peekId3Data(input, id3FramePredicate); @Nullable Metadata id3Metadata = new Id3Peeker().peekId3Data(input, id3FramePredicate);
......
...@@ -44,8 +44,6 @@ public final class Id3Peeker { ...@@ -44,8 +44,6 @@ public final class Id3Peeker {
* present in the input. * present in the input.
* @throws IOException If an error occurred peeking from the input. * @throws IOException If an error occurred peeking from the input.
*/ */
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable @Nullable
public Metadata peekId3Data( public Metadata peekId3Data(
ExtractorInput input, @Nullable Id3Decoder.FramePredicate id3FramePredicate) ExtractorInput input, @Nullable Id3Decoder.FramePredicate id3FramePredicate)
......
...@@ -56,10 +56,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull; ...@@ -56,10 +56,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
// Used by other threads only // Used by other threads only
@C.StereoMode private volatile int defaultStereoMode; @C.StereoMode private volatile int defaultStereoMode;
@C.StereoMode private int lastStereoMode; @C.StereoMode private int lastStereoMode;
// nullness annotations are not applicable to primitive types @Nullable private byte[] lastProjectionData;
@SuppressWarnings("nullness:nullness.on.primitive")
@Nullable
private byte[] lastProjectionData;
// Methods called on any thread. // Methods called on any thread.
...@@ -176,8 +173,6 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull; ...@@ -176,8 +173,6 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
* @param stereoMode A {@link C.StereoMode} value. * @param stereoMode A {@link C.StereoMode} value.
* @param timeNs When then new projection should be used. * @param timeNs When then new projection should be used.
*/ */
// nullness annotations are not applicable to primitive types
@SuppressWarnings("nullness:nullness.on.primitive")
private void setProjection( private void setProjection(
@Nullable byte[] projectionData, @C.StereoMode int stereoMode, long timeNs) { @Nullable byte[] projectionData, @C.StereoMode int stereoMode, long timeNs) {
byte[] oldProjectionData = lastProjectionData; byte[] oldProjectionData = lastProjectionData;
......
...@@ -71,11 +71,7 @@ public final class SphericalGLSurfaceView extends GLSurfaceView { ...@@ -71,11 +71,7 @@ public final class SphericalGLSurfaceView extends GLSurfaceView {
private final SceneRenderer scene; private final SceneRenderer scene;
@Nullable private SurfaceTexture surfaceTexture; @Nullable private SurfaceTexture surfaceTexture;
@Nullable private Surface surface; @Nullable private Surface surface;
// nullness annotations are not applicable to outer types @Nullable private Player.VideoComponent videoComponent;
@SuppressWarnings("nullness:nullness.on.outer")
@Nullable
private Player.VideoComponent videoComponent;
private boolean useSensorRotation; private boolean useSensorRotation;
private boolean isStarted; private boolean isStarted;
private boolean isOrientationListenerRegistered; private boolean isOrientationListenerRegistered;
...@@ -129,8 +125,6 @@ public final class SphericalGLSurfaceView extends GLSurfaceView { ...@@ -129,8 +125,6 @@ public final class SphericalGLSurfaceView extends GLSurfaceView {
} }
/** Sets the {@link Player.VideoComponent} to use. */ /** Sets the {@link Player.VideoComponent} to use. */
// nullness annotations are not applicable to outer types
@SuppressWarnings("nullness:nullness.on.outer")
public void setVideoComponent(@Nullable Player.VideoComponent newVideoComponent) { public void setVideoComponent(@Nullable Player.VideoComponent newVideoComponent) {
if (newVideoComponent == videoComponent) { if (newVideoComponent == videoComponent) {
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment