Commit 4b30cca9 by olly Committed by bachinger

Update `@SuppressWarnings` annotations for go/nullness diagnostics

in preparation for upgrading the version of the Checker Framework in google3.

More information: go/checker-3110-lsc

PiperOrigin-RevId: 377925828
parent 71fb7411
Showing with 62 additions and 38 deletions
...@@ -169,7 +169,7 @@ public final class CronetEngineWrapper { ...@@ -169,7 +169,7 @@ public final class CronetEngineWrapper {
// Multi-catch can only be used for API 19+ in this case. // Multi-catch can only be used for API 19+ in this case.
// Field#get(null) is blocked by the null-checker, but is safe because the field is static. // Field#get(null) is blocked by the null-checker, but is safe because the field is static.
@SuppressWarnings({"UseMultiCatch", "nullness:argument.type.incompatible"}) @SuppressWarnings({"UseMultiCatch", "nullness:argument.type.incompatible", "nullness:argument"})
public CronetProviderComparator(boolean preferGMSCoreCronet) { public CronetProviderComparator(boolean preferGMSCoreCronet) {
// GMSCore CronetProvider classes are only available in some configurations. // GMSCore CronetProvider classes are only available in some configurations.
// Thus, we use reflection to copy static name. // Thus, we use reflection to copy static name.
......
...@@ -92,7 +92,7 @@ public final class FfmpegVideoRenderer extends DecoderVideoRenderer { ...@@ -92,7 +92,7 @@ public final class FfmpegVideoRenderer extends DecoderVideoRenderer {
*/ */
} }
@SuppressWarnings("return.type.incompatible") @SuppressWarnings({"return.type.incompatible", "nullness:return"})
@Override @Override
protected Decoder<VideoDecoderInputBuffer, VideoDecoderOutputBuffer, FfmpegDecoderException> protected Decoder<VideoDecoderInputBuffer, VideoDecoderOutputBuffer, FfmpegDecoderException>
createDecoder(Format format, @Nullable ExoMediaCrypto mediaCrypto) createDecoder(Format format, @Nullable ExoMediaCrypto mediaCrypto)
......
...@@ -177,7 +177,7 @@ public final class FlacExtractor implements Extractor { ...@@ -177,7 +177,7 @@ public final class FlacExtractor implements Extractor {
} }
@EnsuresNonNull({"decoderJni", "extractorOutput", "trackOutput"}) // Ensures initialized. @EnsuresNonNull({"decoderJni", "extractorOutput", "trackOutput"}) // Ensures initialized.
@SuppressWarnings({"contracts.postcondition.not.satisfied"}) @SuppressWarnings({"contracts.postcondition.not.satisfied", "nullness:contracts.postcondition"})
private FlacDecoderJni initDecoderJni(ExtractorInput input) { private FlacDecoderJni initDecoderJni(ExtractorInput input) {
FlacDecoderJni decoderJni = Assertions.checkNotNull(this.decoderJni); FlacDecoderJni decoderJni = Assertions.checkNotNull(this.decoderJni);
decoderJni.setData(input); decoderJni.setData(input);
...@@ -186,7 +186,7 @@ public final class FlacExtractor implements Extractor { ...@@ -186,7 +186,7 @@ public final class FlacExtractor implements Extractor {
@RequiresNonNull({"decoderJni", "extractorOutput", "trackOutput"}) // Requires initialized. @RequiresNonNull({"decoderJni", "extractorOutput", "trackOutput"}) // Requires initialized.
@EnsuresNonNull({"streamMetadata", "outputFrameHolder"}) // Ensures stream metadata decoded. @EnsuresNonNull({"streamMetadata", "outputFrameHolder"}) // Ensures stream metadata decoded.
@SuppressWarnings({"contracts.postcondition.not.satisfied"}) @SuppressWarnings({"contracts.postcondition.not.satisfied", "nullness:contracts.postcondition"})
private void decodeStreamMetadata(ExtractorInput input) throws IOException { private void decodeStreamMetadata(ExtractorInput input) throws IOException {
if (streamMetadataDecoded) { if (streamMetadataDecoded) {
return; return;
......
...@@ -211,7 +211,12 @@ import java.util.Map; ...@@ -211,7 +211,12 @@ import java.util.Map;
private long waitingForPreloadElapsedRealtimeMs; private long waitingForPreloadElapsedRealtimeMs;
/** Creates a new ad tag loader, starting the ad request if the ad tag is valid. */ /** Creates a new ad tag loader, starting the ad request if the ad tag is valid. */
@SuppressWarnings({"methodref.receiver.bound.invalid", "method.invocation.invalid"}) @SuppressWarnings({
"methodref.receiver.bound.invalid",
"nullness:methodref.receiver.bound",
"method.invocation.invalid",
"nullness:method.invocation"
})
public AdTagLoader( public AdTagLoader(
Context context, Context context,
ImaUtil.Configuration configuration, ImaUtil.Configuration configuration,
......
...@@ -734,7 +734,7 @@ public final class ImaAdsLoader implements Player.Listener, AdsLoader { ...@@ -734,7 +734,7 @@ public final class ImaAdsLoader implements Player.Listener, AdsLoader {
// The reasonDetail parameter to createFriendlyObstruction is annotated @Nullable but the // The reasonDetail parameter to createFriendlyObstruction is annotated @Nullable but the
// annotation is not kept in the obfuscated dependency. // annotation is not kept in the obfuscated dependency.
@SuppressWarnings("nullness:argument.type.incompatible") @SuppressWarnings({"nullness:argument.type.incompatible", "nullness:argument"})
@Override @Override
public FriendlyObstruction createFriendlyObstruction( public FriendlyObstruction createFriendlyObstruction(
View view, View view,
......
...@@ -222,7 +222,7 @@ public final class LeanbackPlayerAdapter extends PlayerAdapter implements Runnab ...@@ -222,7 +222,7 @@ public final class LeanbackPlayerAdapter extends PlayerAdapter implements Runnab
} }
} }
@SuppressWarnings("nullness:argument.type.incompatible") @SuppressWarnings({"nullness:argument.type.incompatible", "nullness:argument"})
private static void removeSurfaceHolderCallback(SurfaceHolderGlueHost surfaceHolderGlueHost) { private static void removeSurfaceHolderCallback(SurfaceHolderGlueHost surfaceHolderGlueHost) {
surfaceHolderGlueHost.setSurfaceHolderCallback(null); surfaceHolderGlueHost.setSurfaceHolderCallback(null);
} }
......
...@@ -357,14 +357,14 @@ public class PlaybackException extends Exception implements Bundleable { ...@@ -357,14 +357,14 @@ public class PlaybackException extends Exception implements Bundleable {
} }
// Creates a new {@link Throwable} with possibly {@code null} message. // Creates a new {@link Throwable} with possibly {@code null} message.
@SuppressWarnings("nullness:argument.type.incompatible") @SuppressWarnings({"nullness:argument.type.incompatible", "nullness:argument"})
private static Throwable createThrowable(Class<?> clazz, @Nullable String message) private static Throwable createThrowable(Class<?> clazz, @Nullable String message)
throws Exception { throws Exception {
return (Throwable) clazz.getConstructor(String.class).newInstance(message); return (Throwable) clazz.getConstructor(String.class).newInstance(message);
} }
// Creates a new {@link RemoteException} with possibly {@code null} message. // Creates a new {@link RemoteException} with possibly {@code null} message.
@SuppressWarnings("nullness:argument.type.incompatible") @SuppressWarnings({"nullness:argument.type.incompatible", "nullness:argument"})
private static RemoteException createRemoteException(@Nullable String message) { private static RemoteException createRemoteException(@Nullable String message) {
return new RemoteException(message); return new RemoteException(message);
} }
......
...@@ -340,7 +340,7 @@ public final class AdPlaybackState implements Bundleable { ...@@ -340,7 +340,7 @@ public final class AdPlaybackState implements Bundleable {
private static final int FIELD_IS_SERVER_SIDE_INSERTED = 6; private static final int FIELD_IS_SERVER_SIDE_INSERTED = 6;
// putParcelableArrayList actually supports null elements. // putParcelableArrayList actually supports null elements.
@SuppressWarnings("nullness:argument.type.incompatible") @SuppressWarnings({"nullness:argument.type.incompatible", "nullness:argument"})
@Override @Override
public Bundle toBundle() { public Bundle toBundle() {
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
...@@ -359,7 +359,7 @@ public final class AdPlaybackState implements Bundleable { ...@@ -359,7 +359,7 @@ public final class AdPlaybackState implements Bundleable {
public static final Creator<AdGroup> CREATOR = AdGroup::fromBundle; public static final Creator<AdGroup> CREATOR = AdGroup::fromBundle;
// getParcelableArrayList may have null elements. // getParcelableArrayList may have null elements.
@SuppressWarnings("nullness:type.argument.type.incompatible") @SuppressWarnings({"nullness:type.argument.type.incompatible", "nullness:type.argument"})
private static AdGroup fromBundle(Bundle bundle) { private static AdGroup fromBundle(Bundle bundle) {
long timeUs = bundle.getLong(keyForField(FIELD_TIME_US)); long timeUs = bundle.getLong(keyForField(FIELD_TIME_US));
int count = bundle.getInt(keyForField(FIELD_COUNT), /* defaultValue= */ C.LENGTH_UNSET); int count = bundle.getInt(keyForField(FIELD_COUNT), /* defaultValue= */ C.LENGTH_UNSET);
......
...@@ -32,7 +32,7 @@ public abstract class AbstractConcatenatedTimeline extends Timeline { ...@@ -32,7 +32,7 @@ public abstract class AbstractConcatenatedTimeline extends Timeline {
* @param concatenatedUid UID of a period in a concatenated timeline. * @param concatenatedUid UID of a period in a concatenated timeline.
* @return UID of the child timeline this period belongs to. * @return UID of the child timeline this period belongs to.
*/ */
@SuppressWarnings("nullness:return.type.incompatible") @SuppressWarnings({"nullness:return.type.incompatible", "nullness:return"})
public static Object getChildTimelineUidFromConcatenatedUid(Object concatenatedUid) { public static Object getChildTimelineUidFromConcatenatedUid(Object concatenatedUid) {
return ((Pair<?, ?>) concatenatedUid).first; return ((Pair<?, ?>) concatenatedUid).first;
} }
...@@ -43,7 +43,7 @@ public abstract class AbstractConcatenatedTimeline extends Timeline { ...@@ -43,7 +43,7 @@ public abstract class AbstractConcatenatedTimeline extends Timeline {
* @param concatenatedUid UID of a period in a concatenated timeline. * @param concatenatedUid UID of a period in a concatenated timeline.
* @return UID of the period in the child timeline. * @return UID of the period in the child timeline.
*/ */
@SuppressWarnings("nullness:return.type.incompatible") @SuppressWarnings({"nullness:return.type.incompatible", "nullness:return"})
public static Object getChildPeriodUidFromConcatenatedUid(Object concatenatedUid) { public static Object getChildPeriodUidFromConcatenatedUid(Object concatenatedUid) {
return ((Pair<?, ?>) concatenatedUid).second; return ((Pair<?, ?>) concatenatedUid).second;
} }
......
...@@ -526,7 +526,10 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull; ...@@ -526,7 +526,10 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
} }
@EnsuresNonNullIf(result = true, expression = "sessionId") @EnsuresNonNullIf(result = true, expression = "sessionId")
@SuppressWarnings("contracts.conditional.postcondition.not.satisfied") @SuppressWarnings({
"contracts.conditional.postcondition.not.satisfied",
"nullness:contracts.conditional.postcondition"
})
private boolean isOpen() { private boolean isOpen() {
return state == STATE_OPENED || state == STATE_OPENED_WITH_KEYS; return state == STATE_OPENED || state == STATE_OPENED_WITH_KEYS;
} }
......
...@@ -822,7 +822,10 @@ public final class DownloadHelper { ...@@ -822,7 +822,10 @@ public final class DownloadHelper {
"mediaPreparer.timeline", "mediaPreparer.timeline",
"mediaPreparer.mediaPeriods" "mediaPreparer.mediaPeriods"
}) })
@SuppressWarnings("nullness:contracts.postcondition.not.satisfied") @SuppressWarnings({
"nullness:contracts.postcondition.not.satisfied",
"nullness:contracts.postcondition"
})
private void assertPreparedWithMedia() { private void assertPreparedWithMedia() {
Assertions.checkState(isPreparedWithMedia); Assertions.checkState(isPreparedWithMedia);
} }
...@@ -931,7 +934,7 @@ public final class DownloadHelper { ...@@ -931,7 +934,7 @@ public final class DownloadHelper {
this.downloadHelper = downloadHelper; this.downloadHelper = downloadHelper;
allocator = new DefaultAllocator(true, C.DEFAULT_BUFFER_SEGMENT_SIZE); allocator = new DefaultAllocator(true, C.DEFAULT_BUFFER_SEGMENT_SIZE);
pendingMediaPeriods = new ArrayList<>(); pendingMediaPeriods = new ArrayList<>();
@SuppressWarnings("methodref.receiver.bound.invalid") @SuppressWarnings({"methodref.receiver.bound.invalid", "nullness:methodref.receiver.bound"})
Handler downloadThreadHandler = Handler downloadThreadHandler =
Util.createHandlerForCurrentOrMainLooper(this::handleDownloadHelperCallbackMessage); Util.createHandlerForCurrentOrMainLooper(this::handleDownloadHelperCallbackMessage);
this.downloadHelperHandler = downloadThreadHandler; this.downloadHelperHandler = downloadThreadHandler;
......
...@@ -255,7 +255,7 @@ public final class DownloadManager { ...@@ -255,7 +255,7 @@ public final class DownloadManager {
downloads = Collections.emptyList(); downloads = Collections.emptyList();
listeners = new CopyOnWriteArraySet<>(); listeners = new CopyOnWriteArraySet<>();
@SuppressWarnings("methodref.receiver.bound.invalid") @SuppressWarnings({"methodref.receiver.bound.invalid", "nullness:methodref.receiver.bound"})
Handler mainHandler = Util.createHandlerForCurrentOrMainLooper(this::handleMainMessage); Handler mainHandler = Util.createHandlerForCurrentOrMainLooper(this::handleMainMessage);
this.applicationHandler = mainHandler; this.applicationHandler = mainHandler;
HandlerThread internalThread = new HandlerThread("ExoPlayer:DownloadManager"); HandlerThread internalThread = new HandlerThread("ExoPlayer:DownloadManager");
...@@ -270,7 +270,7 @@ public final class DownloadManager { ...@@ -270,7 +270,7 @@ public final class DownloadManager {
minRetryCount, minRetryCount,
downloadsPaused); downloadsPaused);
@SuppressWarnings("methodref.receiver.bound.invalid") @SuppressWarnings({"methodref.receiver.bound.invalid", "nullness:methodref.receiver.bound"})
RequirementsWatcher.Listener requirementsListener = this::onRequirementsStateChanged; RequirementsWatcher.Listener requirementsListener = this::onRequirementsStateChanged;
this.requirementsListener = requirementsListener; this.requirementsListener = requirementsListener;
requirementsWatcher = requirementsWatcher =
...@@ -1316,7 +1316,7 @@ public final class DownloadManager { ...@@ -1316,7 +1316,7 @@ public final class DownloadManager {
contentLength = C.LENGTH_UNSET; contentLength = C.LENGTH_UNSET;
} }
@SuppressWarnings("nullness:assignment.type.incompatible") @SuppressWarnings({"nullness:assignment.type.incompatible", "nullness:assignment"})
public void cancel(boolean released) { public void cancel(boolean released) {
if (released) { if (released) {
// Download threads are GC roots for as long as they're running. The time taken for // Download threads are GC roots for as long as they're running. The time taken for
......
...@@ -77,7 +77,7 @@ public final class ProgressiveDownloader implements Downloader { ...@@ -77,7 +77,7 @@ public final class ProgressiveDownloader implements Downloader {
.setFlags(DataSpec.FLAG_ALLOW_CACHE_FRAGMENTATION) .setFlags(DataSpec.FLAG_ALLOW_CACHE_FRAGMENTATION)
.build(); .build();
dataSource = cacheDataSourceFactory.createDataSourceForDownloading(); dataSource = cacheDataSourceFactory.createDataSourceForDownloading();
@SuppressWarnings("methodref.receiver.bound.invalid") @SuppressWarnings({"methodref.receiver.bound.invalid", "nullness:methodref.receiver.bound"})
CacheWriter.ProgressListener progressListener = this::onProgress; CacheWriter.ProgressListener progressListener = this::onProgress;
cacheWriter = cacheWriter =
new CacheWriter(dataSource, dataSpec, /* temporaryBuffer= */ null, progressListener); new CacheWriter(dataSource, dataSpec, /* temporaryBuffer= */ null, progressListener);
......
...@@ -162,8 +162,8 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull; ...@@ -162,8 +162,8 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
*/ */
// maybeFinishPrepare is not posted to the handler until initialization completes. // maybeFinishPrepare is not posted to the handler until initialization completes.
@SuppressWarnings({ @SuppressWarnings({
"nullness:argument.type.incompatible", "nullness:argument.type.incompatible", "nullness:argument",
"nullness:methodref.receiver.bound.invalid" "nullness:methodref.receiver.bound.invalid", "nullness:methodref.receiver.bound"
}) })
public ProgressiveMediaPeriod( public ProgressiveMediaPeriod(
Uri uri, Uri uri,
...@@ -980,7 +980,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull; ...@@ -980,7 +980,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
@Nullable private TrackOutput icyTrackOutput; @Nullable private TrackOutput icyTrackOutput;
private boolean seenIcyMetadata; private boolean seenIcyMetadata;
@SuppressWarnings("method.invocation.invalid") @SuppressWarnings({"method.invocation.invalid", "nullness:method.invocation"})
public ExtractingLoadable( public ExtractingLoadable(
Uri uri, Uri uri,
DataSource dataSource, DataSource dataSource,
......
...@@ -98,7 +98,7 @@ public final class ServerSideInsertedAdsMediaSource extends BaseMediaSource ...@@ -98,7 +98,7 @@ public final class ServerSideInsertedAdsMediaSource extends BaseMediaSource
* @param mediaSource The {@link MediaSource} to wrap. * @param mediaSource The {@link MediaSource} to wrap.
*/ */
// Calling BaseMediaSource.createEventDispatcher from the constructor. // Calling BaseMediaSource.createEventDispatcher from the constructor.
@SuppressWarnings("nullness:method.invocation.invalid") @SuppressWarnings({"nullness:method.invocation.invalid", "nullness:method.invocation"})
public ServerSideInsertedAdsMediaSource(MediaSource mediaSource) { public ServerSideInsertedAdsMediaSource(MediaSource mediaSource) {
this.mediaSource = mediaSource; this.mediaSource = mediaSource;
mediaPeriods = ArrayListMultimap.create(); mediaPeriods = ArrayListMultimap.create();
......
...@@ -34,7 +34,7 @@ public abstract class BaseMediaChunkIterator implements MediaChunkIterator { ...@@ -34,7 +34,7 @@ public abstract class BaseMediaChunkIterator implements MediaChunkIterator {
* @param fromIndex The first available index. * @param fromIndex The first available index.
* @param toIndex The last available index. * @param toIndex The last available index.
*/ */
@SuppressWarnings("method.invocation.invalid") @SuppressWarnings({"method.invocation.invalid", "nullness:method.invocation"})
public BaseMediaChunkIterator(long fromIndex, long toIndex) { public BaseMediaChunkIterator(long fromIndex, long toIndex) {
this.fromIndex = fromIndex; this.fromIndex = fromIndex;
this.toIndex = toIndex; this.toIndex = toIndex;
......
...@@ -29,7 +29,7 @@ public abstract class SimpleSubtitleDecoder ...@@ -29,7 +29,7 @@ public abstract class SimpleSubtitleDecoder
private final String name; private final String name;
/** @param name The name of the decoder. */ /** @param name The name of the decoder. */
@SuppressWarnings("nullness:method.invocation.invalid") @SuppressWarnings({"nullness:method.invocation.invalid", "nullness:method.invocation"})
protected SimpleSubtitleDecoder(String name) { protected SimpleSubtitleDecoder(String name) {
super(new SubtitleInputBuffer[2], new SubtitleOutputBuffer[2]); super(new SubtitleInputBuffer[2], new SubtitleOutputBuffer[2]);
this.name = name; this.name = name;
......
...@@ -42,7 +42,10 @@ import java.util.PriorityQueue; ...@@ -42,7 +42,10 @@ import java.util.PriorityQueue;
private long playbackPositionUs; private long playbackPositionUs;
private long queuedInputBufferCount; private long queuedInputBufferCount;
@SuppressWarnings("nullness:methodref.receiver.bound.invalid") @SuppressWarnings({
"nullness:methodref.receiver.bound.invalid",
"nullness:methodref.receiver.bound"
})
public CeaDecoder() { public CeaDecoder() {
availableInputBuffers = new ArrayDeque<>(); availableInputBuffers = new ArrayDeque<>();
for (int i = 0; i < NUM_INPUT_BUFFERS; i++) { for (int i = 0; i < NUM_INPUT_BUFFERS; i++) {
......
...@@ -51,7 +51,11 @@ public class TrackSelectionParameters implements Parcelable { ...@@ -51,7 +51,11 @@ public class TrackSelectionParameters implements Parcelable {
* *
* @param context Any context. * @param context Any context.
*/ */
@SuppressWarnings({"deprecation", "nullness:method.invocation.invalid"}) @SuppressWarnings({
"deprecation",
"nullness:method.invocation.invalid",
"nullness:method.invocation"
})
public Builder(Context context) { public Builder(Context context) {
this(); this();
setPreferredTextLanguageAndRoleFlagsToCaptioningManagerSettings(context); setPreferredTextLanguageAndRoleFlagsToCaptioningManagerSettings(context);
......
...@@ -131,7 +131,7 @@ public final class EGLSurfaceTexture implements SurfaceTexture.OnFrameAvailableL ...@@ -131,7 +131,7 @@ public final class EGLSurfaceTexture implements SurfaceTexture.OnFrameAvailableL
} }
/** Releases all allocated resources. */ /** Releases all allocated resources. */
@SuppressWarnings({"nullness:argument.type.incompatible"}) @SuppressWarnings({"nullness:argument.type.incompatible", "nullness:argument"})
public void release() { public void release() {
handler.removeCallbacks(this); handler.removeCallbacks(this);
try { try {
......
...@@ -161,7 +161,7 @@ public abstract class RunnableFutureTask<R, E extends Exception> implements Runn ...@@ -161,7 +161,7 @@ public abstract class RunnableFutureTask<R, E extends Exception> implements Runn
// The return value is guaranteed to be non-null if and only if R is a non-null type, but there's // The return value is guaranteed to be non-null if and only if R is a non-null type, but there's
// no way to assert this. Suppress the warning instead. // no way to assert this. Suppress the warning instead.
@SuppressWarnings("return.type.incompatible") @SuppressWarnings({"return.type.incompatible", "nullness:return"})
@UnknownNull @UnknownNull
private R getResult() throws ExecutionException { private R getResult() throws ExecutionException {
if (canceled) { if (canceled) {
......
...@@ -53,9 +53,9 @@ public final class VideoDecoderGLSurfaceView extends GLSurfaceView ...@@ -53,9 +53,9 @@ public final class VideoDecoderGLSurfaceView extends GLSurfaceView
* @param attrs Custom attributes. * @param attrs Custom attributes.
*/ */
@SuppressWarnings({ @SuppressWarnings({
"nullness:assignment.type.incompatible", "nullness:assignment.type.incompatible", "nullness:assignment",
"nullness:argument.type.incompatible", "nullness:argument.type.incompatible", "nullness:argument",
"nullness:method.invocation.invalid" "nullness:method.invocation.invalid", "nullness:method.invocation"
}) })
public VideoDecoderGLSurfaceView(Context context, @Nullable AttributeSet attrs) { public VideoDecoderGLSurfaceView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs); super(context, attrs);
......
...@@ -70,8 +70,8 @@ import androidx.annotation.BinderThread; ...@@ -70,8 +70,8 @@ import androidx.annotation.BinderThread;
private volatile float roll; private volatile float roll;
@SuppressWarnings({ @SuppressWarnings({
"nullness:assignment.type.incompatible", "nullness:assignment.type.incompatible", "nullness:assignment",
"nullness:argument.type.incompatible" "nullness:argument.type.incompatible", "nullness:argument"
}) })
public TouchTracker(Context context, Listener listener, float pxPerDegrees) { public TouchTracker(Context context, Listener listener, float pxPerDegrees) {
this.listener = listener; this.listener = listener;
......
...@@ -103,7 +103,7 @@ public final class DefaultExtractorsFactory implements ExtractorsFactory { ...@@ -103,7 +103,7 @@ public final class DefaultExtractorsFactory implements ExtractorsFactory {
static { static {
@Nullable Constructor<? extends Extractor> flacExtensionExtractorConstructor = null; @Nullable Constructor<? extends Extractor> flacExtensionExtractorConstructor = null;
try { try {
@SuppressWarnings("nullness:argument.type.incompatible") @SuppressWarnings({"nullness:argument.type.incompatible", "nullness:argument"})
boolean isFlacNativeLibraryAvailable = boolean isFlacNativeLibraryAvailable =
Boolean.TRUE.equals( Boolean.TRUE.equals(
Class.forName("com.google.android.exoplayer2.ext.flac.FlacLibrary") Class.forName("com.google.android.exoplayer2.ext.flac.FlacLibrary")
......
...@@ -237,10 +237,16 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull; ...@@ -237,10 +237,16 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
readOnlyMediaChunks = Collections.unmodifiableList(mediaChunks); readOnlyMediaChunks = Collections.unmodifiableList(mediaChunks);
hlsSampleStreams = new ArrayList<>(); hlsSampleStreams = new ArrayList<>();
// Suppressions are needed because `this` is not initialized here. // Suppressions are needed because `this` is not initialized here.
@SuppressWarnings("nullness:methodref.receiver.bound.invalid") @SuppressWarnings({
"nullness:methodref.receiver.bound.invalid",
"nullness:methodref.receiver.bound"
})
Runnable maybeFinishPrepareRunnable = this::maybeFinishPrepare; Runnable maybeFinishPrepareRunnable = this::maybeFinishPrepare;
this.maybeFinishPrepareRunnable = maybeFinishPrepareRunnable; this.maybeFinishPrepareRunnable = maybeFinishPrepareRunnable;
@SuppressWarnings("nullness:methodref.receiver.bound.invalid") @SuppressWarnings({
"nullness:methodref.receiver.bound.invalid",
"nullness:methodref.receiver.bound"
})
Runnable onTracksEndedRunnable = this::onTracksEnded; Runnable onTracksEndedRunnable = this::onTracksEnded;
this.onTracksEndedRunnable = onTracksEndedRunnable; this.onTracksEndedRunnable = onTracksEndedRunnable;
handler = Util.createHandlerForCurrentLooper(); handler = Util.createHandlerForCurrentLooper();
......
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