mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Remove obsolete Checker Framework suppression strings
More information: go/checker-3130-lsc
Tested:
Some test failures are present, but the CL author has decided to mail the change anyway
PiperOrigin-RevId: 379622938
This commit is contained in:
parent
2536222fbd
commit
a3dbd61239
24 changed files with 31 additions and 63 deletions
|
|
@ -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", "nullness:argument"})
|
@SuppressWarnings({"UseMultiCatch", "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 {
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({"return.type.incompatible", "nullness:return"})
|
@SuppressWarnings("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 {
|
||||||
}
|
}
|
||||||
|
|
||||||
@EnsuresNonNull({"decoderJni", "extractorOutput", "trackOutput"}) // Ensures initialized.
|
@EnsuresNonNull({"decoderJni", "extractorOutput", "trackOutput"}) // Ensures initialized.
|
||||||
@SuppressWarnings({"contracts.postcondition.not.satisfied", "nullness:contracts.postcondition"})
|
@SuppressWarnings("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 {
|
||||||
|
|
||||||
@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", "nullness:contracts.postcondition"})
|
@SuppressWarnings("nullness:contracts.postcondition")
|
||||||
private void decodeStreamMetadata(ExtractorInput input) throws IOException {
|
private void decodeStreamMetadata(ExtractorInput input) throws IOException {
|
||||||
if (streamMetadataDecoded) {
|
if (streamMetadataDecoded) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -211,12 +211,7 @@ 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({
|
@SuppressWarnings({"nullness:methodref.receiver.bound", "nullness:method.invocation"})
|
||||||
"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 {
|
||||||
|
|
||||||
// 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", "nullness:argument"})
|
@SuppressWarnings("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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({"nullness:argument.type.incompatible", "nullness:argument"})
|
@SuppressWarnings("nullness:argument")
|
||||||
private static void removeSurfaceHolderCallback(SurfaceHolderGlueHost surfaceHolderGlueHost) {
|
private static void removeSurfaceHolderCallback(SurfaceHolderGlueHost surfaceHolderGlueHost) {
|
||||||
surfaceHolderGlueHost.setSurfaceHolderCallback(null);
|
surfaceHolderGlueHost.setSurfaceHolderCallback(null);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -352,7 +352,7 @@ import java.util.concurrent.TimeoutException;
|
||||||
// TODO(internal b/160846312): Remove warning suppression and mark item @Nullable once we depend
|
// TODO(internal b/160846312): Remove warning suppression and mark item @Nullable once we depend
|
||||||
// on media2 1.2.0.
|
// on media2 1.2.0.
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings({"nullness:override.param.invalid", "nullness:override.param"})
|
@SuppressWarnings("nullness:override.param")
|
||||||
public void onCurrentMediaItemChanged(SessionPlayer player, MediaItem item) {
|
public void onCurrentMediaItemChanged(SessionPlayer player, MediaItem item) {
|
||||||
currentMediaItemBuffered = isBufferedState(player.getBufferingState());
|
currentMediaItemBuffered = isBufferedState(player.getBufferingState());
|
||||||
updateAllowedCommands();
|
updateAllowedCommands();
|
||||||
|
|
|
||||||
|
|
@ -571,7 +571,6 @@ public final class SessionPlayerConnector extends SessionPlayer {
|
||||||
|
|
||||||
// TODO(internal b/160846312): Remove this suppress warnings and call onCurrentMediaItemChanged
|
// TODO(internal b/160846312): Remove this suppress warnings and call onCurrentMediaItemChanged
|
||||||
// with a null item once we depend on media2 1.2.0.
|
// with a null item once we depend on media2 1.2.0.
|
||||||
@SuppressWarnings("nullness:argument.type.incompatible")
|
|
||||||
private void handlePlaylistChangedOnHandler() {
|
private void handlePlaylistChangedOnHandler() {
|
||||||
List<MediaItem> currentPlaylist = player.getPlaylist();
|
List<MediaItem> currentPlaylist = player.getPlaylist();
|
||||||
MediaMetadata playlistMetadata = player.getPlaylistMetadata();
|
MediaMetadata playlistMetadata = player.getPlaylistMetadata();
|
||||||
|
|
|
||||||
|
|
@ -367,7 +367,7 @@ public class PlaybackException extends Exception implements Bundleable {
|
||||||
protected static final int FIELD_CUSTOM_ID_BASE = 1000;
|
protected static final int FIELD_CUSTOM_ID_BASE = 1000;
|
||||||
|
|
||||||
/** Object that can create a {@link PlaybackException} from a {@link Bundle}. */
|
/** Object that can create a {@link PlaybackException} from a {@link Bundle}. */
|
||||||
@SuppressWarnings({"unchecked"})
|
@SuppressWarnings("unchecked")
|
||||||
public static final Creator<PlaybackException> CREATOR =
|
public static final Creator<PlaybackException> CREATOR =
|
||||||
bundle -> {
|
bundle -> {
|
||||||
String className = bundle.getString(keyForField(FIELD_STRING_CLASS_NAME));
|
String className = bundle.getString(keyForField(FIELD_STRING_CLASS_NAME));
|
||||||
|
|
@ -375,7 +375,7 @@ public class PlaybackException extends Exception implements Bundleable {
|
||||||
try {
|
try {
|
||||||
Field creatorField = Class.forName(className).getField("CREATOR");
|
Field creatorField = Class.forName(className).getField("CREATOR");
|
||||||
// It is ok to pass null to Field.get for static fields.
|
// It is ok to pass null to Field.get for static fields.
|
||||||
@SuppressWarnings({"argument.type.incompatible", "nullness:argument"})
|
@SuppressWarnings("nullness:argument")
|
||||||
Creator<PlaybackException> creator =
|
Creator<PlaybackException> creator =
|
||||||
(Creator<PlaybackException>) creatorField.get(/* obj= */ null);
|
(Creator<PlaybackException>) creatorField.get(/* obj= */ null);
|
||||||
if (creator != null) {
|
if (creator != null) {
|
||||||
|
|
@ -414,14 +414,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", "nullness:argument"})
|
@SuppressWarnings("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", "nullness:argument"})
|
@SuppressWarnings("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 {
|
||||||
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", "nullness:argument"})
|
@SuppressWarnings("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 {
|
||||||
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", "nullness:type.argument"})
|
@SuppressWarnings("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 {
|
||||||
* @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", "nullness:return"})
|
@SuppressWarnings("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 {
|
||||||
* @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", "nullness:return"})
|
@SuppressWarnings("nullness:return")
|
||||||
public static Object getChildPeriodUidFromConcatenatedUid(Object concatenatedUid) {
|
public static Object getChildPeriodUidFromConcatenatedUid(Object concatenatedUid) {
|
||||||
return ((Pair<?, ?>) concatenatedUid).second;
|
return ((Pair<?, ?>) concatenatedUid).second;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -526,10 +526,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EnsuresNonNullIf(result = true, expression = "sessionId")
|
@EnsuresNonNullIf(result = true, expression = "sessionId")
|
||||||
@SuppressWarnings({
|
@SuppressWarnings("nullness:contracts.conditional.postcondition")
|
||||||
"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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -161,10 +161,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||||
* invocation of {@link Callback#onContinueLoadingRequested(SequenceableLoader)}.
|
* invocation of {@link Callback#onContinueLoadingRequested(SequenceableLoader)}.
|
||||||
*/
|
*/
|
||||||
// maybeFinishPrepare is not posted to the handler until initialization completes.
|
// maybeFinishPrepare is not posted to the handler until initialization completes.
|
||||||
@SuppressWarnings({
|
@SuppressWarnings({"nullness:argument", "nullness:methodref.receiver.bound"})
|
||||||
"nullness:argument.type.incompatible", "nullness:argument",
|
|
||||||
"nullness:methodref.receiver.bound.invalid", "nullness:methodref.receiver.bound"
|
|
||||||
})
|
|
||||||
public ProgressiveMediaPeriod(
|
public ProgressiveMediaPeriod(
|
||||||
Uri uri,
|
Uri uri,
|
||||||
DataSource dataSource,
|
DataSource dataSource,
|
||||||
|
|
@ -980,7 +977,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", "nullness:method.invocation"})
|
@SuppressWarnings("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
|
||||||
* @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", "nullness:method.invocation"})
|
@SuppressWarnings("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 {
|
||||||
* @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", "nullness:method.invocation"})
|
@SuppressWarnings("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
|
||||||
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", "nullness:method.invocation"})
|
@SuppressWarnings("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,10 +42,7 @@ import java.util.PriorityQueue;
|
||||||
private long playbackPositionUs;
|
private long playbackPositionUs;
|
||||||
private long queuedInputBufferCount;
|
private long queuedInputBufferCount;
|
||||||
|
|
||||||
@SuppressWarnings({
|
@SuppressWarnings("nullness:methodref.receiver.bound")
|
||||||
"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,11 +51,7 @@ public class TrackSelectionParameters implements Parcelable {
|
||||||
*
|
*
|
||||||
* @param context Any context.
|
* @param context Any context.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings({
|
@SuppressWarnings({"deprecation", "nullness:method.invocation"})
|
||||||
"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
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Releases all allocated resources. */
|
/** Releases all allocated resources. */
|
||||||
@SuppressWarnings({"nullness:argument.type.incompatible", "nullness:argument"})
|
@SuppressWarnings("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
|
||||||
|
|
||||||
// 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", "nullness:return"})
|
@SuppressWarnings("nullness:return")
|
||||||
@UnknownNull
|
@UnknownNull
|
||||||
private R getResult() throws ExecutionException {
|
private R getResult() throws ExecutionException {
|
||||||
if (canceled) {
|
if (canceled) {
|
||||||
|
|
|
||||||
|
|
@ -52,11 +52,7 @@ public final class VideoDecoderGLSurfaceView extends GLSurfaceView
|
||||||
* @param context A {@link Context}.
|
* @param context A {@link Context}.
|
||||||
* @param attrs Custom attributes.
|
* @param attrs Custom attributes.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings({
|
@SuppressWarnings({"nullness:assignment", "nullness:argument", "nullness:method.invocation"})
|
||||||
"nullness:assignment.type.incompatible", "nullness:assignment",
|
|
||||||
"nullness:argument.type.incompatible", "nullness:argument",
|
|
||||||
"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);
|
||||||
renderer = new Renderer(/* surfaceView= */ this);
|
renderer = new Renderer(/* surfaceView= */ this);
|
||||||
|
|
|
||||||
|
|
@ -69,10 +69,7 @@ import androidx.annotation.BinderThread;
|
||||||
// on the sensor thread and read on the UI thread.
|
// on the sensor thread and read on the UI thread.
|
||||||
private volatile float roll;
|
private volatile float roll;
|
||||||
|
|
||||||
@SuppressWarnings({
|
@SuppressWarnings({"nullness:assignment", "nullness:argument"})
|
||||||
"nullness:assignment.type.incompatible", "nullness:assignment",
|
|
||||||
"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;
|
||||||
this.pxPerDegrees = pxPerDegrees;
|
this.pxPerDegrees = pxPerDegrees;
|
||||||
|
|
|
||||||
|
|
@ -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", "nullness:argument"})
|
@SuppressWarnings("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,16 +237,10 @@ 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({
|
@SuppressWarnings("nullness:methodref.receiver.bound")
|
||||||
"nullness:methodref.receiver.bound.invalid",
|
|
||||||
"nullness:methodref.receiver.bound"
|
|
||||||
})
|
|
||||||
Runnable maybeFinishPrepareRunnable = this::maybeFinishPrepare;
|
Runnable maybeFinishPrepareRunnable = this::maybeFinishPrepare;
|
||||||
this.maybeFinishPrepareRunnable = maybeFinishPrepareRunnable;
|
this.maybeFinishPrepareRunnable = maybeFinishPrepareRunnable;
|
||||||
@SuppressWarnings({
|
@SuppressWarnings("nullness:methodref.receiver.bound")
|
||||||
"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();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue