mirror of
https://github.com/samsonjs/media.git
synced 2026-03-28 09:55:48 +00:00
Put @Nullable annotation in the right place
PiperOrigin-RevId: 249828748
This commit is contained in:
parent
11c0c6d266
commit
3afdd7ac5a
103 changed files with 247 additions and 206 deletions
|
|
@ -555,7 +555,8 @@ public class PlayerActivity extends AppCompatActivity
|
|||
}
|
||||
|
||||
/** Returns an ads media source, reusing the ads loader if one exists. */
|
||||
private @Nullable MediaSource createAdsMediaSource(MediaSource mediaSource, Uri adTagUri) {
|
||||
@Nullable
|
||||
private MediaSource createAdsMediaSource(MediaSource mediaSource, Uri adTagUri) {
|
||||
// Load the extension source using reflection so the demo app doesn't have to depend on it.
|
||||
// The ads loader is reused for multiple playbacks, so that ad playback can resume.
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ import java.util.List;
|
|||
private static final int DECODER_ERROR_OTHER = -2;
|
||||
|
||||
private final String codecName;
|
||||
private final @Nullable byte[] extraData;
|
||||
@Nullable private final byte[] extraData;
|
||||
private final @C.Encoding int encoding;
|
||||
private final int outputBufferSize;
|
||||
|
||||
|
|
|
|||
|
|
@ -228,7 +228,8 @@ public final class FlacExtractorSeekTest {
|
|||
}
|
||||
}
|
||||
|
||||
private @Nullable SeekMap extractSeekMap(FlacExtractor extractor, FakeExtractorOutput output)
|
||||
@Nullable
|
||||
private SeekMap extractSeekMap(FlacExtractor extractor, FakeExtractorOutput output)
|
||||
throws IOException, InterruptedException {
|
||||
try {
|
||||
ExtractorInput input = getExtractorInputFromPosition(0);
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ public final class FlacExtractor implements Extractor {
|
|||
private FlacStreamInfo streamInfo;
|
||||
|
||||
private Metadata id3Metadata;
|
||||
private @Nullable FlacBinarySearchSeeker flacBinarySearchSeeker;
|
||||
@Nullable private FlacBinarySearchSeeker flacBinarySearchSeeker;
|
||||
|
||||
private boolean readPastStreamInfo;
|
||||
|
||||
|
|
|
|||
|
|
@ -313,14 +313,14 @@ public final class ImaAdsLoader
|
|||
*/
|
||||
private static final int IMA_AD_STATE_PAUSED = 2;
|
||||
|
||||
private final @Nullable Uri adTagUri;
|
||||
private final @Nullable String adsResponse;
|
||||
@Nullable private final Uri adTagUri;
|
||||
@Nullable private final String adsResponse;
|
||||
private final int vastLoadTimeoutMs;
|
||||
private final int mediaLoadTimeoutMs;
|
||||
private final boolean focusSkipButtonWhenAvailable;
|
||||
private final int mediaBitrate;
|
||||
private final @Nullable Set<UiElement> adUiElements;
|
||||
private final @Nullable AdEventListener adEventListener;
|
||||
@Nullable private final Set<UiElement> adUiElements;
|
||||
@Nullable private final AdEventListener adEventListener;
|
||||
private final ImaFactory imaFactory;
|
||||
private final Timeline.Period period;
|
||||
private final List<VideoAdPlayerCallback> adCallbacks;
|
||||
|
|
|
|||
|
|
@ -252,7 +252,8 @@ public class ImaAdsLoaderTest {
|
|||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Ad getAd() {
|
||||
@Nullable
|
||||
public Ad getAd() {
|
||||
return ad;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,10 +51,10 @@ public final class LeanbackPlayerAdapter extends PlayerAdapter implements Runnab
|
|||
private final ComponentListener componentListener;
|
||||
private final int updatePeriodMs;
|
||||
|
||||
private @Nullable PlaybackPreparer playbackPreparer;
|
||||
@Nullable private PlaybackPreparer playbackPreparer;
|
||||
private ControlDispatcher controlDispatcher;
|
||||
private @Nullable ErrorMessageProvider<? super ExoPlaybackException> errorMessageProvider;
|
||||
private @Nullable SurfaceHolderGlueHost surfaceHolderGlueHost;
|
||||
@Nullable private ErrorMessageProvider<? super ExoPlaybackException> errorMessageProvider;
|
||||
@Nullable private SurfaceHolderGlueHost surfaceHolderGlueHost;
|
||||
private boolean hasSurface;
|
||||
private boolean lastNotifiedPreparedState;
|
||||
|
||||
|
|
|
|||
|
|
@ -167,7 +167,8 @@ public class OkHttpDataSource extends BaseDataSource implements HttpDataSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Uri getUri() {
|
||||
@Nullable
|
||||
public Uri getUri() {
|
||||
return response == null ? null : Uri.parse(response.request().url().toString());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ import okhttp3.Call;
|
|||
public final class OkHttpDataSourceFactory extends BaseFactory {
|
||||
|
||||
private final Call.Factory callFactory;
|
||||
private final @Nullable String userAgent;
|
||||
private final @Nullable TransferListener listener;
|
||||
private final @Nullable CacheControl cacheControl;
|
||||
@Nullable private final String userAgent;
|
||||
@Nullable private final TransferListener listener;
|
||||
@Nullable private final CacheControl cacheControl;
|
||||
|
||||
/**
|
||||
* @param callFactory A {@link Call.Factory} (typically an {@link okhttp3.OkHttpClient}) for use
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import com.google.android.exoplayer2.upstream.TransferListener;
|
|||
*/
|
||||
public final class RtmpDataSourceFactory implements DataSource.Factory {
|
||||
|
||||
private final @Nullable TransferListener listener;
|
||||
@Nullable private final TransferListener listener;
|
||||
|
||||
public RtmpDataSourceFactory() {
|
||||
this(null);
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ import com.google.android.exoplayer2.util.StandaloneMediaClock;
|
|||
private final StandaloneMediaClock standaloneMediaClock;
|
||||
private final PlaybackParameterListener listener;
|
||||
|
||||
private @Nullable Renderer rendererClockSource;
|
||||
private @Nullable MediaClock rendererClock;
|
||||
@Nullable private Renderer rendererClockSource;
|
||||
@Nullable private MediaClock rendererClock;
|
||||
|
||||
/**
|
||||
* Creates a new instance with listener for playback parameter changes and a {@link Clock} to use
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
|
|||
private boolean foregroundMode;
|
||||
private PlaybackParameters playbackParameters;
|
||||
private SeekParameters seekParameters;
|
||||
private @Nullable ExoPlaybackException playbackError;
|
||||
@Nullable private ExoPlaybackException playbackError;
|
||||
|
||||
// Playback information when there is no pending seek/set source operation.
|
||||
private PlaybackInfo playbackInfo;
|
||||
|
|
@ -199,7 +199,8 @@ import java.util.concurrent.CopyOnWriteArrayList;
|
|||
}
|
||||
|
||||
@Override
|
||||
public @Nullable ExoPlaybackException getPlaybackError() {
|
||||
@Nullable
|
||||
public ExoPlaybackException getPlaybackError() {
|
||||
return playbackError;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1836,7 +1836,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||
|
||||
public int resolvedPeriodIndex;
|
||||
public long resolvedPeriodTimeUs;
|
||||
public @Nullable Object resolvedPeriodUid;
|
||||
@Nullable public Object resolvedPeriodUid;
|
||||
|
||||
public PendingMessageInfo(PlayerMessage message) {
|
||||
this.message = message;
|
||||
|
|
|
|||
|
|
@ -45,9 +45,9 @@ public final class Format implements Parcelable {
|
|||
public static final long OFFSET_SAMPLE_RELATIVE = Long.MAX_VALUE;
|
||||
|
||||
/** An identifier for the format, or null if unknown or not applicable. */
|
||||
public final @Nullable String id;
|
||||
@Nullable public final String id;
|
||||
/** The human readable label, or null if unknown or not applicable. */
|
||||
public final @Nullable String label;
|
||||
@Nullable public final String label;
|
||||
/** Track selection flags. */
|
||||
@C.SelectionFlags public final int selectionFlags;
|
||||
/** Track role flags. */
|
||||
|
|
@ -57,14 +57,14 @@ public final class Format implements Parcelable {
|
|||
*/
|
||||
public final int bitrate;
|
||||
/** Codecs of the format as described in RFC 6381, or null if unknown or not applicable. */
|
||||
public final @Nullable String codecs;
|
||||
@Nullable public final String codecs;
|
||||
/** Metadata, or null if unknown or not applicable. */
|
||||
public final @Nullable Metadata metadata;
|
||||
@Nullable public final Metadata metadata;
|
||||
|
||||
// Container specific.
|
||||
|
||||
/** The mime type of the container, or null if unknown or not applicable. */
|
||||
public final @Nullable String containerMimeType;
|
||||
@Nullable public final String containerMimeType;
|
||||
|
||||
// Elementary stream specific.
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ public final class Format implements Parcelable {
|
|||
* The mime type of the elementary stream (i.e. the individual samples), or null if unknown or not
|
||||
* applicable.
|
||||
*/
|
||||
public final @Nullable String sampleMimeType;
|
||||
@Nullable public final String sampleMimeType;
|
||||
/**
|
||||
* The maximum size of a buffer of data (typically one sample), or {@link #NO_VALUE} if unknown or
|
||||
* not applicable.
|
||||
|
|
@ -84,7 +84,7 @@ public final class Format implements Parcelable {
|
|||
*/
|
||||
public final List<byte[]> initializationData;
|
||||
/** DRM initialization data if the stream is protected, or null otherwise. */
|
||||
public final @Nullable DrmInitData drmInitData;
|
||||
@Nullable public final DrmInitData drmInitData;
|
||||
|
||||
/**
|
||||
* For samples that contain subsamples, this is an offset that should be added to subsample
|
||||
|
|
@ -122,9 +122,9 @@ public final class Format implements Parcelable {
|
|||
@C.StereoMode
|
||||
public final int stereoMode;
|
||||
/** The projection data for 360/VR video, or null if not applicable. */
|
||||
public final @Nullable byte[] projectionData;
|
||||
@Nullable public final byte[] projectionData;
|
||||
/** The color metadata associated with the video, helps with accurate color reproduction. */
|
||||
public final @Nullable ColorInfo colorInfo;
|
||||
@Nullable public final ColorInfo colorInfo;
|
||||
|
||||
// Audio specific.
|
||||
|
||||
|
|
@ -157,7 +157,7 @@ public final class Format implements Parcelable {
|
|||
// Audio and text specific.
|
||||
|
||||
/** The language as an IETF BCP 47 conformant tag, or null if unknown or not applicable. */
|
||||
public final @Nullable String language;
|
||||
@Nullable public final String language;
|
||||
/**
|
||||
* The Accessibility channel, or {@link #NO_VALUE} if not known or applicable.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -46,11 +46,11 @@ import com.google.android.exoplayer2.util.Assertions;
|
|||
private Timeline timeline;
|
||||
private @RepeatMode int repeatMode;
|
||||
private boolean shuffleModeEnabled;
|
||||
private @Nullable MediaPeriodHolder playing;
|
||||
private @Nullable MediaPeriodHolder reading;
|
||||
private @Nullable MediaPeriodHolder loading;
|
||||
@Nullable private MediaPeriodHolder playing;
|
||||
@Nullable private MediaPeriodHolder reading;
|
||||
@Nullable private MediaPeriodHolder loading;
|
||||
private int length;
|
||||
private @Nullable Object oldFrontPeriodUid;
|
||||
@Nullable private Object oldFrontPeriodUid;
|
||||
private long oldFrontPeriodWindowSequenceNumber;
|
||||
|
||||
/** Creates a new media period queue. */
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ import com.google.android.exoplayer2.trackselection.TrackSelectorResult;
|
|||
/** The current {@link Timeline}. */
|
||||
public final Timeline timeline;
|
||||
/** The current manifest. */
|
||||
public final @Nullable Object manifest;
|
||||
@Nullable public final Object manifest;
|
||||
/** The {@link MediaPeriodId} of the currently playing media period in the {@link #timeline}. */
|
||||
public final MediaPeriodId periodId;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public final class PlayerMessage {
|
|||
private final Timeline timeline;
|
||||
|
||||
private int type;
|
||||
private @Nullable Object payload;
|
||||
@Nullable private Object payload;
|
||||
private Handler handler;
|
||||
private int windowIndex;
|
||||
private long positionMs;
|
||||
|
|
@ -134,7 +134,8 @@ public final class PlayerMessage {
|
|||
}
|
||||
|
||||
/** Returns the message payload forwarded to {@link Target#handleMessage(int, Object)}. */
|
||||
public @Nullable Object getPayload() {
|
||||
@Nullable
|
||||
public Object getPayload() {
|
||||
return payload;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -880,7 +880,8 @@ public class SimpleExoPlayer extends BasePlayer
|
|||
}
|
||||
|
||||
@Override
|
||||
public @Nullable ExoPlaybackException getPlaybackError() {
|
||||
@Nullable
|
||||
public ExoPlaybackException getPlaybackError() {
|
||||
verifyApplicationThread();
|
||||
return player.getPlaybackError();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -687,8 +687,8 @@ public class AnalyticsCollector
|
|||
private final HashMap<MediaPeriodId, MediaPeriodInfo> mediaPeriodIdToInfo;
|
||||
private final Period period;
|
||||
|
||||
private @Nullable MediaPeriodInfo lastReportedPlayingMediaPeriod;
|
||||
private @Nullable MediaPeriodInfo readingMediaPeriod;
|
||||
@Nullable private MediaPeriodInfo lastReportedPlayingMediaPeriod;
|
||||
@Nullable private MediaPeriodInfo readingMediaPeriod;
|
||||
private Timeline timeline;
|
||||
private boolean isSeeking;
|
||||
|
||||
|
|
@ -706,7 +706,8 @@ public class AnalyticsCollector
|
|||
* always return null to reflect the uncertainty about the current playing period. May also be
|
||||
* null, if the timeline is empty or no media period is active yet.
|
||||
*/
|
||||
public @Nullable MediaPeriodInfo getPlayingMediaPeriod() {
|
||||
@Nullable
|
||||
public MediaPeriodInfo getPlayingMediaPeriod() {
|
||||
return mediaPeriodInfoQueue.isEmpty() || timeline.isEmpty() || isSeeking
|
||||
? null
|
||||
: mediaPeriodInfoQueue.get(0);
|
||||
|
|
@ -719,7 +720,8 @@ public class AnalyticsCollector
|
|||
* reported until the seek or preparation is processed. May be null, if no media period is
|
||||
* active yet.
|
||||
*/
|
||||
public @Nullable MediaPeriodInfo getLastReportedPlayingMediaPeriod() {
|
||||
@Nullable
|
||||
public MediaPeriodInfo getLastReportedPlayingMediaPeriod() {
|
||||
return lastReportedPlayingMediaPeriod;
|
||||
}
|
||||
|
||||
|
|
@ -727,7 +729,8 @@ public class AnalyticsCollector
|
|||
* Returns the {@link MediaPeriodInfo} of the media period currently being read by the player.
|
||||
* May be null, if the player is not reading a media period.
|
||||
*/
|
||||
public @Nullable MediaPeriodInfo getReadingMediaPeriod() {
|
||||
@Nullable
|
||||
public MediaPeriodInfo getReadingMediaPeriod() {
|
||||
return readingMediaPeriod;
|
||||
}
|
||||
|
||||
|
|
@ -736,14 +739,16 @@ public class AnalyticsCollector
|
|||
* currently loading or will be the next one loading. May be null, if no media period is active
|
||||
* yet.
|
||||
*/
|
||||
public @Nullable MediaPeriodInfo getLoadingMediaPeriod() {
|
||||
@Nullable
|
||||
public MediaPeriodInfo getLoadingMediaPeriod() {
|
||||
return mediaPeriodInfoQueue.isEmpty()
|
||||
? null
|
||||
: mediaPeriodInfoQueue.get(mediaPeriodInfoQueue.size() - 1);
|
||||
}
|
||||
|
||||
/** Returns the {@link MediaPeriodInfo} for the given {@link MediaPeriodId}. */
|
||||
public @Nullable MediaPeriodInfo getMediaPeriodInfo(MediaPeriodId mediaPeriodId) {
|
||||
@Nullable
|
||||
public MediaPeriodInfo getMediaPeriodInfo(MediaPeriodId mediaPeriodId) {
|
||||
return mediaPeriodIdToInfo.get(mediaPeriodId);
|
||||
}
|
||||
|
||||
|
|
@ -756,7 +761,8 @@ public class AnalyticsCollector
|
|||
* Tries to find an existing media period info from the specified window index. Only returns a
|
||||
* non-null media period info if there is a unique, unambiguous match.
|
||||
*/
|
||||
public @Nullable MediaPeriodInfo tryResolveWindowIndex(int windowIndex) {
|
||||
@Nullable
|
||||
public MediaPeriodInfo tryResolveWindowIndex(int windowIndex) {
|
||||
MediaPeriodInfo match = null;
|
||||
for (int i = 0; i < mediaPeriodInfoQueue.size(); i++) {
|
||||
MediaPeriodInfo info = mediaPeriodInfoQueue.get(i);
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ public interface AnalyticsListener {
|
|||
* Media period identifier for the media period this event belongs to, or {@code null} if the
|
||||
* event is not associated with a specific media period.
|
||||
*/
|
||||
public final @Nullable MediaPeriodId mediaPeriodId;
|
||||
@Nullable public final MediaPeriodId mediaPeriodId;
|
||||
|
||||
/**
|
||||
* Position in the window or ad this event belongs to at the time of the event, in milliseconds.
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ public final class AudioFocusManager {
|
|||
private final AudioManager audioManager;
|
||||
private final AudioFocusListener focusListener;
|
||||
private final PlayerControl playerControl;
|
||||
private @Nullable AudioAttributes audioAttributes;
|
||||
@Nullable private AudioAttributes audioAttributes;
|
||||
|
||||
private @AudioFocusState int audioFocusState;
|
||||
private int focusGain;
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ import java.lang.annotation.RetentionPolicy;
|
|||
*/
|
||||
private static final int INITIALIZING_DURATION_US = 500_000;
|
||||
|
||||
private final @Nullable AudioTimestampV19 audioTimestamp;
|
||||
@Nullable private final AudioTimestampV19 audioTimestamp;
|
||||
|
||||
private @State int state;
|
||||
private long initializeSystemTimeUs;
|
||||
|
|
|
|||
|
|
@ -133,10 +133,10 @@ import java.lang.reflect.Method;
|
|||
private final Listener listener;
|
||||
private final long[] playheadOffsets;
|
||||
|
||||
private @Nullable AudioTrack audioTrack;
|
||||
@Nullable private AudioTrack audioTrack;
|
||||
private int outputPcmFrameSize;
|
||||
private int bufferSize;
|
||||
private @Nullable AudioTimestampPoller audioTimestampPoller;
|
||||
@Nullable private AudioTimestampPoller audioTimestampPoller;
|
||||
private int outputSampleRate;
|
||||
private boolean needsPassthroughWorkarounds;
|
||||
private long bufferSizeUs;
|
||||
|
|
@ -144,7 +144,7 @@ import java.lang.reflect.Method;
|
|||
private long smoothedPlayheadOffsetUs;
|
||||
private long lastPlayheadSampleTimeUs;
|
||||
|
||||
private @Nullable Method getLatencyMethod;
|
||||
@Nullable private Method getLatencyMethod;
|
||||
private long latencyUs;
|
||||
private boolean hasData;
|
||||
|
||||
|
|
|
|||
|
|
@ -88,13 +88,13 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
|||
private static final int MAX_LICENSE_DURATION_TO_RENEW_SECONDS = 60;
|
||||
|
||||
/** The DRM scheme datas, or null if this session uses offline keys. */
|
||||
public final @Nullable List<SchemeData> schemeDatas;
|
||||
@Nullable public final List<SchemeData> schemeDatas;
|
||||
|
||||
private final ExoMediaDrm<T> mediaDrm;
|
||||
private final ProvisioningManager<T> provisioningManager;
|
||||
private final ReleaseCallback<T> releaseCallback;
|
||||
private final @DefaultDrmSessionManager.Mode int mode;
|
||||
private final @Nullable HashMap<String, String> optionalKeyRequestParameters;
|
||||
@Nullable private final HashMap<String, String> optionalKeyRequestParameters;
|
||||
private final EventDispatcher<DefaultDrmSessionEventListener> eventDispatcher;
|
||||
private final int initialDrmRequestRetryCount;
|
||||
|
||||
|
|
@ -111,8 +111,8 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
|||
private byte @MonotonicNonNull [] sessionId;
|
||||
private byte @MonotonicNonNull [] offlineLicenseKeySetId;
|
||||
|
||||
private @Nullable KeyRequest currentKeyRequest;
|
||||
private @Nullable ProvisionRequest currentProvisionRequest;
|
||||
@Nullable private KeyRequest currentKeyRequest;
|
||||
@Nullable private ProvisionRequest currentProvisionRequest;
|
||||
|
||||
/**
|
||||
* Instantiates a new DRM session.
|
||||
|
|
@ -259,12 +259,14 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
|||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Map<String, String> queryKeyStatus() {
|
||||
@Nullable
|
||||
public Map<String, String> queryKeyStatus() {
|
||||
return sessionId == null ? null : mediaDrm.queryKeyStatus(sessionId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable byte[] getOfflineLicenseKeySetId() {
|
||||
@Nullable
|
||||
public byte[] getOfflineLicenseKeySetId() {
|
||||
return offlineLicenseKeySetId;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto>
|
|||
private final UUID uuid;
|
||||
private final ExoMediaDrm<T> mediaDrm;
|
||||
private final MediaDrmCallback callback;
|
||||
private final @Nullable HashMap<String, String> optionalKeyRequestParameters;
|
||||
@Nullable private final HashMap<String, String> optionalKeyRequestParameters;
|
||||
private final EventDispatcher<DefaultDrmSessionEventListener> eventDispatcher;
|
||||
private final boolean multiSession;
|
||||
private final int initialDrmRequestRetryCount;
|
||||
|
|
@ -96,9 +96,9 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto>
|
|||
private final List<DefaultDrmSession<T>> sessions;
|
||||
private final List<DefaultDrmSession<T>> provisioningSessions;
|
||||
|
||||
private @Nullable Looper playbackLooper;
|
||||
@Nullable private Looper playbackLooper;
|
||||
private int mode;
|
||||
private @Nullable byte[] offlineLicenseKeySetId;
|
||||
@Nullable private byte[] offlineLicenseKeySetId;
|
||||
|
||||
/* package */ volatile @Nullable MediaDrmHandler mediaDrmHandler;
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ public final class DrmInitData implements Comparator<SchemeData>, Parcelable {
|
|||
private int hashCode;
|
||||
|
||||
/** The protection scheme type, or null if not applicable or unknown. */
|
||||
public final @Nullable String schemeType;
|
||||
@Nullable public final String schemeType;
|
||||
|
||||
/**
|
||||
* Number of {@link SchemeData}s.
|
||||
|
|
@ -152,7 +152,8 @@ public final class DrmInitData implements Comparator<SchemeData>, Parcelable {
|
|||
* @return The initialization data for the scheme, or null if the scheme is not supported.
|
||||
*/
|
||||
@Deprecated
|
||||
public @Nullable SchemeData get(UUID uuid) {
|
||||
@Nullable
|
||||
public SchemeData get(UUID uuid) {
|
||||
for (SchemeData schemeData : schemeDatas) {
|
||||
if (schemeData.matches(uuid)) {
|
||||
return schemeData;
|
||||
|
|
@ -286,11 +287,11 @@ public final class DrmInitData implements Comparator<SchemeData>, Parcelable {
|
|||
*/
|
||||
private final UUID uuid;
|
||||
/** The URL of the server to which license requests should be made. May be null if unknown. */
|
||||
public final @Nullable String licenseServerUrl;
|
||||
@Nullable public final String licenseServerUrl;
|
||||
/** The mimeType of {@link #data}. */
|
||||
public final String mimeType;
|
||||
/** The initialization data. May be null for scheme support checks only. */
|
||||
public final @Nullable byte[] data;
|
||||
@Nullable public final byte[] data;
|
||||
|
||||
/**
|
||||
* @param uuid The {@link UUID} of the DRM scheme, or {@link C#UUID_NIL} if the data is
|
||||
|
|
|
|||
|
|
@ -34,22 +34,26 @@ public final class ErrorStateDrmSession<T extends ExoMediaCrypto> implements Drm
|
|||
}
|
||||
|
||||
@Override
|
||||
public @Nullable DrmSessionException getError() {
|
||||
@Nullable
|
||||
public DrmSessionException getError() {
|
||||
return error;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable T getMediaCrypto() {
|
||||
@Nullable
|
||||
public T getMediaCrypto() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Map<String, String> queryKeyStatus() {
|
||||
@Nullable
|
||||
public Map<String, String> queryKeyStatus() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable byte[] getOfflineLicenseKeySetId() {
|
||||
@Nullable
|
||||
public byte[] getOfflineLicenseKeySetId() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ public final class AmrExtractor implements Extractor {
|
|||
|
||||
private ExtractorOutput extractorOutput;
|
||||
private TrackOutput trackOutput;
|
||||
private @Nullable SeekMap seekMap;
|
||||
@Nullable private SeekMap seekMap;
|
||||
private boolean hasOutputFormat;
|
||||
|
||||
public AmrExtractor() {
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ import com.google.android.exoplayer2.util.Util;
|
|||
* Entries are in the range [0, 255], but are stored as long integers for convenience. Null if the
|
||||
* table of contents was missing from the header, in which case seeking is not be supported.
|
||||
*/
|
||||
private final @Nullable long[] tableOfContents;
|
||||
@Nullable private final long[] tableOfContents;
|
||||
|
||||
private XingSeeker(long dataStartPosition, int xingFrameSize, long durationUs) {
|
||||
this(
|
||||
|
|
|
|||
|
|
@ -458,7 +458,8 @@ import java.util.List;
|
|||
* @param type The leaf type.
|
||||
* @return The child leaf of the given type, or null if no such child exists.
|
||||
*/
|
||||
public @Nullable LeafAtom getLeafAtomOfType(int type) {
|
||||
@Nullable
|
||||
public LeafAtom getLeafAtomOfType(int type) {
|
||||
int childrenSize = leafChildren.size();
|
||||
for (int i = 0; i < childrenSize; i++) {
|
||||
LeafAtom atom = leafChildren.get(i);
|
||||
|
|
@ -478,7 +479,8 @@ import java.util.List;
|
|||
* @param type The container type.
|
||||
* @return The child container of the given type, or null if no such child exists.
|
||||
*/
|
||||
public @Nullable ContainerAtom getContainerAtomOfType(int type) {
|
||||
@Nullable
|
||||
public ContainerAtom getContainerAtomOfType(int type) {
|
||||
int childrenSize = containerChildren.size();
|
||||
for (int i = 0; i < childrenSize; i++) {
|
||||
ContainerAtom atom = containerChildren.get(i);
|
||||
|
|
|
|||
|
|
@ -122,11 +122,11 @@ public class FragmentedMp4Extractor implements Extractor {
|
|||
|
||||
// Workarounds.
|
||||
@Flags private final int flags;
|
||||
private final @Nullable Track sideloadedTrack;
|
||||
@Nullable private final Track sideloadedTrack;
|
||||
|
||||
// Sideloaded data.
|
||||
private final List<Format> closedCaptionFormats;
|
||||
private final @Nullable DrmInitData sideloadedDrmInitData;
|
||||
@Nullable private final DrmInitData sideloadedDrmInitData;
|
||||
|
||||
// Track-linked data bundle, accessible as a whole through trackID.
|
||||
private final SparseArray<TrackBundle> trackBundles;
|
||||
|
|
@ -139,13 +139,13 @@ public class FragmentedMp4Extractor implements Extractor {
|
|||
private final ParsableByteArray scratch;
|
||||
|
||||
// Adjusts sample timestamps.
|
||||
private final @Nullable TimestampAdjuster timestampAdjuster;
|
||||
@Nullable private final TimestampAdjuster timestampAdjuster;
|
||||
|
||||
// Parser state.
|
||||
private final ParsableByteArray atomHeader;
|
||||
private final ArrayDeque<ContainerAtom> containerAtoms;
|
||||
private final ArrayDeque<MetadataSampleInfo> pendingMetadataSampleInfos;
|
||||
private final @Nullable TrackOutput additionalEmsgTrackOutput;
|
||||
@Nullable private final TrackOutput additionalEmsgTrackOutput;
|
||||
|
||||
private int parserState;
|
||||
private int atomType;
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ public final class AdtsExtractor implements Extractor {
|
|||
private final ParsableBitArray scratchBits;
|
||||
private final long firstStreamSampleTimestampUs;
|
||||
|
||||
private @Nullable ExtractorOutput extractorOutput;
|
||||
@Nullable private ExtractorOutput extractorOutput;
|
||||
|
||||
private long firstSampleTimestampUs;
|
||||
private long firstFramePosition;
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
|
|||
* to initialize, the {@link DecoderInitializationException} for the fallback decoder. Null if
|
||||
* there was no fallback decoder or no suitable decoders were found.
|
||||
*/
|
||||
public final @Nullable DecoderInitializationException fallbackDecoderInitializationException;
|
||||
@Nullable public final DecoderInitializationException fallbackDecoderInitializationException;
|
||||
|
||||
public DecoderInitializationException(Format format, Throwable cause,
|
||||
boolean secureDecoderRequired, int errorCode) {
|
||||
|
|
|
|||
|
|
@ -40,7 +40,8 @@ public interface MediaCodecSelector {
|
|||
}
|
||||
|
||||
@Override
|
||||
public @Nullable MediaCodecInfo getPassthroughDecoderInfo() throws DecoderQueryException {
|
||||
@Nullable
|
||||
public MediaCodecInfo getPassthroughDecoderInfo() throws DecoderQueryException {
|
||||
return MediaCodecUtil.getPassthroughDecoderInfo();
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public final class MetadataRenderer extends BaseRenderer implements Callback {
|
|||
|
||||
private final MetadataDecoderFactory decoderFactory;
|
||||
private final MetadataOutput output;
|
||||
private final @Nullable Handler outputHandler;
|
||||
@Nullable private final Handler outputHandler;
|
||||
private final FormatHolder formatHolder;
|
||||
private final MetadataInputBuffer buffer;
|
||||
private final Metadata[] pendingMetadata;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public final class ApicFrame extends Id3Frame {
|
|||
public static final String ID = "APIC";
|
||||
|
||||
public final String mimeType;
|
||||
public final @Nullable String description;
|
||||
@Nullable public final String description;
|
||||
public final int pictureType;
|
||||
public final byte[] pictureData;
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public final class Id3Decoder implements MetadataDecoder {
|
|||
private static final int ID3_TEXT_ENCODING_UTF_16BE = 2;
|
||||
private static final int ID3_TEXT_ENCODING_UTF_8 = 3;
|
||||
|
||||
private final @Nullable FramePredicate framePredicate;
|
||||
@Nullable private final FramePredicate framePredicate;
|
||||
|
||||
public Id3Decoder() {
|
||||
this(null);
|
||||
|
|
@ -97,7 +97,8 @@ public final class Id3Decoder implements MetadataDecoder {
|
|||
|
||||
@SuppressWarnings("ByteBufferBackingArray")
|
||||
@Override
|
||||
public @Nullable Metadata decode(MetadataInputBuffer inputBuffer) {
|
||||
@Nullable
|
||||
public Metadata decode(MetadataInputBuffer inputBuffer) {
|
||||
ByteBuffer buffer = inputBuffer.data;
|
||||
return decode(buffer.array(), buffer.limit());
|
||||
}
|
||||
|
|
@ -110,7 +111,8 @@ public final class Id3Decoder implements MetadataDecoder {
|
|||
* @return A {@link Metadata} object containing the decoded ID3 tags, or null if the data could
|
||||
* not be decoded.
|
||||
*/
|
||||
public @Nullable Metadata decode(byte[] data, int size) {
|
||||
@Nullable
|
||||
public Metadata decode(byte[] data, int size) {
|
||||
List<Id3Frame> id3Frames = new ArrayList<>();
|
||||
ParsableByteArray id3Data = new ParsableByteArray(data, size);
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import com.google.android.exoplayer2.util.Util;
|
|||
*/
|
||||
public final class TextInformationFrame extends Id3Frame {
|
||||
|
||||
public final @Nullable String description;
|
||||
@Nullable public final String description;
|
||||
public final String value;
|
||||
|
||||
public TextInformationFrame(String id, @Nullable String description, String value) {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import com.google.android.exoplayer2.util.Util;
|
|||
*/
|
||||
public final class UrlLinkFrame extends Id3Frame {
|
||||
|
||||
public final @Nullable String description;
|
||||
@Nullable public final String description;
|
||||
public final String url;
|
||||
|
||||
public UrlLinkFrame(String id, @Nullable String description, String url) {
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ public abstract class CompositeMediaSource<T> extends BaseMediaSource {
|
|||
|
||||
private final HashMap<T, MediaSourceAndListener> childSources;
|
||||
|
||||
private @Nullable Handler eventHandler;
|
||||
private @Nullable TransferListener mediaTransferListener;
|
||||
@Nullable private Handler eventHandler;
|
||||
@Nullable private TransferListener mediaTransferListener;
|
||||
|
||||
/** Create composite media source without child sources. */
|
||||
protected CompositeMediaSource() {
|
||||
|
|
|
|||
|
|
@ -64,9 +64,9 @@ public final class ExtractorMediaSource extends BaseMediaSource
|
|||
|
||||
private final DataSource.Factory dataSourceFactory;
|
||||
|
||||
private @Nullable ExtractorsFactory extractorsFactory;
|
||||
private @Nullable String customCacheKey;
|
||||
private @Nullable Object tag;
|
||||
@Nullable private ExtractorsFactory extractorsFactory;
|
||||
@Nullable private String customCacheKey;
|
||||
@Nullable private Object tag;
|
||||
private LoadErrorHandlingPolicy loadErrorHandlingPolicy;
|
||||
private int continueLoadingCheckIntervalBytes;
|
||||
private boolean isCreateCalled;
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ public interface MediaSourceEventListener {
|
|||
* The format of the track to which the data belongs. Null if the data does not belong to a
|
||||
* specific track.
|
||||
*/
|
||||
public final @Nullable Format trackFormat;
|
||||
@Nullable public final Format trackFormat;
|
||||
/**
|
||||
* One of the {@link C} {@code SELECTION_REASON_*} constants if the data belongs to a track.
|
||||
* {@link C#SELECTION_REASON_UNKNOWN} otherwise.
|
||||
|
|
@ -111,7 +111,7 @@ public interface MediaSourceEventListener {
|
|||
* Optional data associated with the selection of the track to which the data belongs. Null if
|
||||
* the data does not belong to a track.
|
||||
*/
|
||||
public final @Nullable Object trackSelectionData;
|
||||
@Nullable public final Object trackSelectionData;
|
||||
/**
|
||||
* The start time of the media, or {@link C#TIME_UNSET} if the data does not belong to a
|
||||
* specific media period.
|
||||
|
|
@ -296,7 +296,7 @@ public interface MediaSourceEventListener {
|
|||
/** The timeline window index reported with the events. */
|
||||
public final int windowIndex;
|
||||
/** The {@link MediaPeriodId} reported with the events. */
|
||||
public final @Nullable MediaPeriodId mediaPeriodId;
|
||||
@Nullable public final MediaPeriodId mediaPeriodId;
|
||||
|
||||
private final CopyOnWriteArrayList<ListenerAndHandler> listenerAndHandlers;
|
||||
private final long mediaTimeOffsetMs;
|
||||
|
|
|
|||
|
|
@ -1013,7 +1013,7 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
|||
|
||||
private final Extractor[] extractors;
|
||||
|
||||
private @Nullable Extractor extractor;
|
||||
@Nullable private Extractor extractor;
|
||||
|
||||
/**
|
||||
* Creates a holder that will select an extractor and initialize it using the specified output.
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public final class SinglePeriodTimeline extends Timeline {
|
|||
private final long windowDefaultStartPositionUs;
|
||||
private final boolean isSeekable;
|
||||
private final boolean isDynamic;
|
||||
private final @Nullable Object tag;
|
||||
@Nullable private final Object tag;
|
||||
|
||||
/**
|
||||
* Creates a timeline containing a single period and a window that spans it.
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||
|
||||
private final DataSpec dataSpec;
|
||||
private final DataSource.Factory dataSourceFactory;
|
||||
private final @Nullable TransferListener transferListener;
|
||||
@Nullable private final TransferListener transferListener;
|
||||
private final LoadErrorHandlingPolicy loadErrorHandlingPolicy;
|
||||
private final EventDispatcher eventDispatcher;
|
||||
private final TrackGroupArray tracks;
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public final class SingleSampleMediaSource extends BaseMediaSource {
|
|||
private LoadErrorHandlingPolicy loadErrorHandlingPolicy;
|
||||
private boolean treatLoadErrorsAsEndOfStream;
|
||||
private boolean isCreateCalled;
|
||||
private @Nullable Object tag;
|
||||
@Nullable private Object tag;
|
||||
|
||||
/**
|
||||
* Creates a factory for {@link SingleSampleMediaSource}s.
|
||||
|
|
@ -186,7 +186,7 @@ public final class SingleSampleMediaSource extends BaseMediaSource {
|
|||
private final Timeline timeline;
|
||||
@Nullable private final Object tag;
|
||||
|
||||
private @Nullable TransferListener transferListener;
|
||||
@Nullable private TransferListener transferListener;
|
||||
|
||||
/**
|
||||
* @param uri The {@link Uri} of the media stream.
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public abstract class Chunk implements Loadable {
|
|||
* Optional data associated with the selection of the track to which this chunk belongs. Null if
|
||||
* the chunk does not belong to a track.
|
||||
*/
|
||||
public final @Nullable Object trackSelectionData;
|
||||
@Nullable public final Object trackSelectionData;
|
||||
/**
|
||||
* The start time of the media contained by the chunk, or {@link C#TIME_UNSET} if the data
|
||||
* being loaded does not contain media samples.
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ public class ChunkSampleStream<T extends ChunkSource> implements SampleStream, S
|
|||
private final BaseMediaChunkOutput mediaChunkOutput;
|
||||
|
||||
private Format primaryDownstreamTrackFormat;
|
||||
private @Nullable ReleaseCallback<T> releaseCallback;
|
||||
@Nullable private ReleaseCallback<T> releaseCallback;
|
||||
private long pendingResetPositionUs;
|
||||
private long lastSeekPositionUs;
|
||||
private int nextNotifyPrimaryFormatMediaChunkIndex;
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ public final class TextRenderer extends BaseRenderer implements Callback {
|
|||
|
||||
private static final int MSG_UPDATE_OUTPUT = 0;
|
||||
|
||||
private final @Nullable Handler outputHandler;
|
||||
@Nullable private final Handler outputHandler;
|
||||
private final TextOutput output;
|
||||
private final SubtitleDecoderFactory decoderFactory;
|
||||
private final FormatHolder formatHolder;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class AdaptiveTrackSelection extends BaseTrackSelection {
|
|||
/** Factory for {@link AdaptiveTrackSelection} instances. */
|
||||
public static class Factory implements TrackSelection.Factory {
|
||||
|
||||
private final @Nullable BandwidthMeter bandwidthMeter;
|
||||
@Nullable private final BandwidthMeter bandwidthMeter;
|
||||
private final int minDurationForQualityIncreaseMs;
|
||||
private final int maxDurationForQualityDecreaseMs;
|
||||
private final int minDurationToRetainAfterDiscardMs;
|
||||
|
|
@ -537,7 +537,8 @@ public class AdaptiveTrackSelection extends BaseTrackSelection {
|
|||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Object getSelectionData() {
|
||||
@Nullable
|
||||
public Object getSelectionData() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public final class FixedTrackSelection extends BaseTrackSelection {
|
|||
public static final class Factory implements TrackSelection.Factory {
|
||||
|
||||
private final int reason;
|
||||
private final @Nullable Object data;
|
||||
@Nullable private final Object data;
|
||||
|
||||
public Factory() {
|
||||
this.reason = C.SELECTION_REASON_UNKNOWN;
|
||||
|
|
@ -66,7 +66,7 @@ public final class FixedTrackSelection extends BaseTrackSelection {
|
|||
}
|
||||
|
||||
private final int reason;
|
||||
private final @Nullable Object data;
|
||||
@Nullable private final Object data;
|
||||
|
||||
/**
|
||||
* @param group The {@link TrackGroup}. Must not be null.
|
||||
|
|
@ -109,7 +109,8 @@ public final class FixedTrackSelection extends BaseTrackSelection {
|
|||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Object getSelectionData() {
|
||||
@Nullable
|
||||
public Object getSelectionData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -312,7 +312,7 @@ public abstract class MappingTrackSelector extends TrackSelector {
|
|||
|
||||
}
|
||||
|
||||
private @Nullable MappedTrackInfo currentMappedTrackInfo;
|
||||
@Nullable private MappedTrackInfo currentMappedTrackInfo;
|
||||
|
||||
/**
|
||||
* Returns the mapping information for the currently active track selection, or null if no
|
||||
|
|
|
|||
|
|
@ -135,7 +135,8 @@ public final class RandomTrackSelection extends BaseTrackSelection {
|
|||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Object getSelectionData() {
|
||||
@Nullable
|
||||
public Object getSelectionData() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,8 @@ public final class TrackSelectionArray {
|
|||
* @param index The index of the selection.
|
||||
* @return The selection.
|
||||
*/
|
||||
public @Nullable TrackSelection get(int index) {
|
||||
@Nullable
|
||||
public TrackSelection get(int index) {
|
||||
return trackSelections[index];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -98,8 +98,8 @@ public abstract class TrackSelector {
|
|||
|
||||
}
|
||||
|
||||
private @Nullable InvalidationListener listener;
|
||||
private @Nullable BandwidthMeter bandwidthMeter;
|
||||
@Nullable private InvalidationListener listener;
|
||||
@Nullable private BandwidthMeter bandwidthMeter;
|
||||
|
||||
/**
|
||||
* Called by the player to initialize the selector.
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public abstract class BaseDataSource implements DataSource {
|
|||
private final ArrayList<TransferListener> listeners;
|
||||
|
||||
private int listenerCount;
|
||||
private @Nullable DataSpec dataSpec;
|
||||
@Nullable private DataSpec dataSpec;
|
||||
|
||||
/**
|
||||
* Creates base data source.
|
||||
|
|
|
|||
|
|
@ -97,10 +97,10 @@ public final class DataSpec {
|
|||
/**
|
||||
* The HTTP body, null otherwise. If the body is non-null, then httpBody.length will be non-zero.
|
||||
*/
|
||||
public final @Nullable byte[] httpBody;
|
||||
@Nullable public final byte[] httpBody;
|
||||
|
||||
/** @deprecated Use {@link #httpBody} instead. */
|
||||
@Deprecated public final @Nullable byte[] postBody;
|
||||
@Deprecated @Nullable public final byte[] postBody;
|
||||
|
||||
/**
|
||||
* The absolute position of the data in the full stream.
|
||||
|
|
@ -121,7 +121,7 @@ public final class DataSpec {
|
|||
* A key that uniquely identifies the original stream. Used for cache indexing. May be null if the
|
||||
* data spec is not intended to be used in conjunction with a cache.
|
||||
*/
|
||||
public final @Nullable String key;
|
||||
@Nullable public final String key;
|
||||
/** Request {@link Flags flags}. */
|
||||
public final @Flags int flags;
|
||||
|
||||
|
|
|
|||
|
|
@ -62,14 +62,14 @@ public final class DefaultDataSource implements DataSource {
|
|||
private final DataSource baseDataSource;
|
||||
|
||||
// Lazily initialized.
|
||||
private @Nullable DataSource fileDataSource;
|
||||
private @Nullable DataSource assetDataSource;
|
||||
private @Nullable DataSource contentDataSource;
|
||||
private @Nullable DataSource rtmpDataSource;
|
||||
private @Nullable DataSource dataSchemeDataSource;
|
||||
private @Nullable DataSource rawResourceDataSource;
|
||||
@Nullable private DataSource fileDataSource;
|
||||
@Nullable private DataSource assetDataSource;
|
||||
@Nullable private DataSource contentDataSource;
|
||||
@Nullable private DataSource rtmpDataSource;
|
||||
@Nullable private DataSource dataSchemeDataSource;
|
||||
@Nullable private DataSource rawResourceDataSource;
|
||||
|
||||
private @Nullable DataSource dataSource;
|
||||
@Nullable private DataSource dataSource;
|
||||
|
||||
/**
|
||||
* Constructs a new instance, optionally configured to follow cross-protocol redirects.
|
||||
|
|
@ -178,7 +178,8 @@ public final class DefaultDataSource implements DataSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Uri getUri() {
|
||||
@Nullable
|
||||
public Uri getUri() {
|
||||
return dataSource == null ? null : dataSource.getUri();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import com.google.android.exoplayer2.upstream.DataSource.Factory;
|
|||
public final class DefaultDataSourceFactory implements Factory {
|
||||
|
||||
private final Context context;
|
||||
private final @Nullable TransferListener listener;
|
||||
@Nullable private final TransferListener listener;
|
||||
private final DataSource.Factory baseDataSourceFactory;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -228,7 +228,8 @@ public class DefaultHttpDataSource extends BaseDataSource implements HttpDataSou
|
|||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Uri getUri() {
|
||||
@Nullable
|
||||
public Uri getUri() {
|
||||
return connection == null ? null : Uri.parse(connection.getURL().toString());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import com.google.android.exoplayer2.util.Assertions;
|
|||
public final class DefaultHttpDataSourceFactory extends BaseFactory {
|
||||
|
||||
private final String userAgent;
|
||||
private final @Nullable TransferListener listener;
|
||||
@Nullable private final TransferListener listener;
|
||||
private final int connectTimeoutMillis;
|
||||
private final int readTimeoutMillis;
|
||||
private final boolean allowCrossProtocolRedirects;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import androidx.annotation.Nullable;
|
|||
*/
|
||||
public final class FileDataSourceFactory implements DataSource.Factory {
|
||||
|
||||
private final @Nullable TransferListener listener;
|
||||
@Nullable private final TransferListener listener;
|
||||
|
||||
public FileDataSourceFactory() {
|
||||
this(null);
|
||||
|
|
|
|||
|
|
@ -311,7 +311,7 @@ public final class Loader implements LoaderErrorThrower {
|
|||
private final T loadable;
|
||||
private final long startTimeMs;
|
||||
|
||||
private @Nullable Loader.Callback<T> callback;
|
||||
@Nullable private Loader.Callback<T> callback;
|
||||
private IOException currentError;
|
||||
private int errorCount;
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,8 @@ public final class PriorityDataSource implements DataSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Uri getUri() {
|
||||
@Nullable
|
||||
public Uri getUri() {
|
||||
return upstream.getUri();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,8 @@ public final class StatsDataSource implements DataSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Uri getUri() {
|
||||
@Nullable
|
||||
public Uri getUri() {
|
||||
return dataSource.getUri();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,8 @@ public final class TeeDataSource implements DataSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Uri getUri() {
|
||||
@Nullable
|
||||
public Uri getUri() {
|
||||
return upstream.getUri();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ public final class CacheDataSource implements DataSource {
|
|||
|
||||
private final Cache cache;
|
||||
private final DataSource cacheReadDataSource;
|
||||
private final @Nullable DataSource cacheWriteDataSource;
|
||||
@Nullable private final DataSource cacheWriteDataSource;
|
||||
private final DataSource upstreamDataSource;
|
||||
private final CacheKeyFactory cacheKeyFactory;
|
||||
@Nullable private final EventListener eventListener;
|
||||
|
|
@ -132,16 +132,16 @@ public final class CacheDataSource implements DataSource {
|
|||
private final boolean ignoreCacheOnError;
|
||||
private final boolean ignoreCacheForUnsetLengthRequests;
|
||||
|
||||
private @Nullable DataSource currentDataSource;
|
||||
@Nullable private DataSource currentDataSource;
|
||||
private boolean currentDataSpecLengthUnset;
|
||||
private @Nullable Uri uri;
|
||||
private @Nullable Uri actualUri;
|
||||
@Nullable private Uri uri;
|
||||
@Nullable private Uri actualUri;
|
||||
private @HttpMethod int httpMethod;
|
||||
private int flags;
|
||||
private @Nullable String key;
|
||||
@Nullable private String key;
|
||||
private long readPosition;
|
||||
private long bytesRemaining;
|
||||
private @Nullable CacheSpan currentHoleSpan;
|
||||
@Nullable private CacheSpan currentHoleSpan;
|
||||
private boolean seenCacheError;
|
||||
private boolean currentRequestIgnoresCache;
|
||||
private long totalCachedBytesRead;
|
||||
|
|
@ -329,7 +329,8 @@ public final class CacheDataSource implements DataSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Uri getUri() {
|
||||
@Nullable
|
||||
public Uri getUri() {
|
||||
return actualUri;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,10 +41,8 @@ public class CacheSpan implements Comparable<CacheSpan> {
|
|||
* Whether the {@link CacheSpan} is cached.
|
||||
*/
|
||||
public final boolean isCached;
|
||||
/**
|
||||
* The file corresponding to this {@link CacheSpan}, or null if {@link #isCached} is false.
|
||||
*/
|
||||
public final @Nullable File file;
|
||||
/** The file corresponding to this {@link CacheSpan}, or null if {@link #isCached} is false. */
|
||||
@Nullable public final File file;
|
||||
/** The last touch timestamp, or {@link C#TIME_UNSET} if {@link #isCached} is false. */
|
||||
public final long lastTouchTimestamp;
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,8 @@ public final class AesCipherDataSource implements DataSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Uri getUri() {
|
||||
@Nullable
|
||||
public Uri getUri() {
|
||||
return upstream.getUri();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -83,12 +83,12 @@ public final class EGLSurfaceTexture implements SurfaceTexture.OnFrameAvailableL
|
|||
|
||||
private final Handler handler;
|
||||
private final int[] textureIdHolder;
|
||||
private final @Nullable TextureImageListener callback;
|
||||
@Nullable private final TextureImageListener callback;
|
||||
|
||||
private @Nullable EGLDisplay display;
|
||||
private @Nullable EGLContext context;
|
||||
private @Nullable EGLSurface surface;
|
||||
private @Nullable SurfaceTexture texture;
|
||||
@Nullable private EGLDisplay display;
|
||||
@Nullable private EGLContext context;
|
||||
@Nullable private EGLSurface surface;
|
||||
@Nullable private SurfaceTexture texture;
|
||||
|
||||
/**
|
||||
* @param handler The {@link Handler} that will be used to call {@link
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public class EventLogger implements AnalyticsListener {
|
|||
TIME_FORMAT.setGroupingUsed(false);
|
||||
}
|
||||
|
||||
private final @Nullable MappingTrackSelector trackSelector;
|
||||
@Nullable private final MappingTrackSelector trackSelector;
|
||||
private final String tag;
|
||||
private final Timeline.Window window;
|
||||
private final Timeline.Period period;
|
||||
|
|
|
|||
|
|
@ -490,7 +490,8 @@ public final class ParsableByteArray {
|
|||
* @return The string not including any terminating NUL byte, or null if the end of the data has
|
||||
* already been reached.
|
||||
*/
|
||||
public @Nullable String readNullTerminatedString() {
|
||||
@Nullable
|
||||
public String readNullTerminatedString() {
|
||||
if (bytesLeft() == 0) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -516,7 +517,8 @@ public final class ParsableByteArray {
|
|||
* @return The line not including any line-termination characters, or null if the end of the data
|
||||
* has already been reached.
|
||||
*/
|
||||
public @Nullable String readLine() {
|
||||
@Nullable
|
||||
public String readLine() {
|
||||
if (bytesLeft() == 0) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,8 @@ public final class TimedValueQueue<V> {
|
|||
* @return The value with the closest timestamp or null if the buffer is empty or there is no
|
||||
* older value and {@code onlyOlder} is true.
|
||||
*/
|
||||
private @Nullable V poll(long timestamp, boolean onlyOlder) {
|
||||
@Nullable
|
||||
private V poll(long timestamp, boolean onlyOlder) {
|
||||
V value = null;
|
||||
long previousTimeDiff = Long.MAX_VALUE;
|
||||
while (size > 0) {
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public final class ColorInfo implements Parcelable {
|
|||
public final int colorTransfer;
|
||||
|
||||
/** HdrStaticInfo as defined in CTA-861.3, or null if none specified. */
|
||||
public final @Nullable byte[] hdrStaticInfo;
|
||||
@Nullable public final byte[] hdrStaticInfo;
|
||||
|
||||
// Lazily initialized hashcode.
|
||||
private int hashCode;
|
||||
|
|
|
|||
|
|
@ -158,9 +158,9 @@ public final class DummySurface extends Surface {
|
|||
|
||||
private @MonotonicNonNull EGLSurfaceTexture eglSurfaceTexture;
|
||||
private @MonotonicNonNull Handler handler;
|
||||
private @Nullable Error initError;
|
||||
private @Nullable RuntimeException initException;
|
||||
private @Nullable DummySurface surface;
|
||||
@Nullable private Error initError;
|
||||
@Nullable private RuntimeException initException;
|
||||
@Nullable private DummySurface surface;
|
||||
|
||||
public DummySurfaceThread() {
|
||||
super("dummySurface");
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import java.util.List;
|
|||
*/
|
||||
public final class HevcConfig {
|
||||
|
||||
public final @Nullable List<byte[]> initializationData;
|
||||
@Nullable public final List<byte[]> initializationData;
|
||||
public final int nalUnitLengthFieldLength;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
|
|||
private long lastInputTimeUs;
|
||||
private long outputStreamOffsetUs;
|
||||
private int pendingOutputStreamOffsetCount;
|
||||
private @Nullable VideoFrameMetadataListener frameMetadataListener;
|
||||
@Nullable private VideoFrameMetadataListener frameMetadataListener;
|
||||
|
||||
/**
|
||||
* @param context A context.
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class CameraMotionRenderer extends BaseRenderer {
|
|||
private final ParsableByteArray scratch;
|
||||
|
||||
private long offsetUs;
|
||||
private @Nullable CameraMotionListener listener;
|
||||
@Nullable private CameraMotionListener listener;
|
||||
private long lastTimestampUs;
|
||||
|
||||
public CameraMotionRenderer() {
|
||||
|
|
|
|||
|
|
@ -847,7 +847,7 @@ public final class AnalyticsCollectorTest {
|
|||
private static final class EventWindowAndPeriodId {
|
||||
|
||||
private final int windowIndex;
|
||||
private final @Nullable MediaPeriodId mediaPeriodId;
|
||||
@Nullable private final MediaPeriodId mediaPeriodId;
|
||||
|
||||
public EventWindowAndPeriodId(int windowIndex, @Nullable MediaPeriodId mediaPeriodId) {
|
||||
this.windowIndex = windowIndex;
|
||||
|
|
|
|||
|
|
@ -107,7 +107,8 @@ public class BaseDataSourceTest {
|
|||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Uri getUri() {
|
||||
@Nullable
|
||||
public Uri getUri() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ import java.util.regex.Pattern;
|
|||
|
||||
/* package */ final int id;
|
||||
private final DashChunkSource.Factory chunkSourceFactory;
|
||||
private final @Nullable TransferListener transferListener;
|
||||
@Nullable private final TransferListener transferListener;
|
||||
private final LoadErrorHandlingPolicy loadErrorHandlingPolicy;
|
||||
private final long elapsedRealtimeOffsetMs;
|
||||
private final LoaderErrorThrower manifestLoaderErrorThrower;
|
||||
|
|
@ -82,7 +82,7 @@ import java.util.regex.Pattern;
|
|||
trackEmsgHandlerBySampleStream;
|
||||
private final EventDispatcher eventDispatcher;
|
||||
|
||||
private @Nullable Callback callback;
|
||||
@Nullable private Callback callback;
|
||||
private ChunkSampleStream<DashChunkSource>[] sampleStreams;
|
||||
private EventSampleStream[] eventSampleStreams;
|
||||
private SequenceableLoader compositeSequenceableLoader;
|
||||
|
|
|
|||
|
|
@ -373,11 +373,11 @@ public final class DashMediaSource extends BaseMediaSource {
|
|||
private final Runnable simulateManifestRefreshRunnable;
|
||||
private final PlayerEmsgCallback playerEmsgCallback;
|
||||
private final LoaderErrorThrower manifestLoadErrorThrower;
|
||||
private final @Nullable Object tag;
|
||||
@Nullable private final Object tag;
|
||||
|
||||
private DataSource dataSource;
|
||||
private Loader loader;
|
||||
private @Nullable TransferListener mediaTransferListener;
|
||||
@Nullable private TransferListener mediaTransferListener;
|
||||
|
||||
private IOException manifestFatalError;
|
||||
private Handler handler;
|
||||
|
|
@ -1139,7 +1139,7 @@ public final class DashMediaSource extends BaseMediaSource {
|
|||
private final long windowDurationUs;
|
||||
private final long windowDefaultStartPositionUs;
|
||||
private final DashManifest manifest;
|
||||
private final @Nullable Object windowTag;
|
||||
@Nullable private final Object windowTag;
|
||||
|
||||
public DashTimeline(
|
||||
long presentationStartTimeMs,
|
||||
|
|
|
|||
|
|
@ -617,7 +617,7 @@ public class DefaultDashChunkSource implements DashChunkSource {
|
|||
/* package */ final @Nullable ChunkExtractorWrapper extractorWrapper;
|
||||
|
||||
public final Representation representation;
|
||||
public final @Nullable DashSegmentIndex segmentIndex;
|
||||
@Nullable public final DashSegmentIndex segmentIndex;
|
||||
|
||||
private final long periodDurationUs;
|
||||
private final long segmentNumShift;
|
||||
|
|
|
|||
|
|
@ -86,7 +86,8 @@ public final class RangedUri {
|
|||
* @param baseUri The optional base Uri.
|
||||
* @return The merged {@link RangedUri} if the merge was successful. Null otherwise.
|
||||
*/
|
||||
public @Nullable RangedUri attemptMerge(@Nullable RangedUri other, String baseUri) {
|
||||
@Nullable
|
||||
public RangedUri attemptMerge(@Nullable RangedUri other, String baseUri) {
|
||||
final String resolvedUri = resolveUriString(baseUri);
|
||||
if (other == null || !resolvedUri.equals(other.resolveUriString(baseUri))) {
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ import javax.crypto.spec.SecretKeySpec;
|
|||
private final byte[] encryptionKey;
|
||||
private final byte[] encryptionIv;
|
||||
|
||||
private @Nullable CipherInputStream cipherInputStream;
|
||||
@Nullable private CipherInputStream cipherInputStream;
|
||||
|
||||
/**
|
||||
* @param upstream The upstream {@link DataSource}.
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public final class HlsMediaPeriod implements MediaPeriod, HlsSampleStreamWrapper
|
|||
private final HlsExtractorFactory extractorFactory;
|
||||
private final HlsPlaylistTracker playlistTracker;
|
||||
private final HlsDataSourceFactory dataSourceFactory;
|
||||
private final @Nullable TransferListener mediaTransferListener;
|
||||
@Nullable private final TransferListener mediaTransferListener;
|
||||
private final LoadErrorHandlingPolicy loadErrorHandlingPolicy;
|
||||
private final EventDispatcher eventDispatcher;
|
||||
private final Allocator allocator;
|
||||
|
|
@ -72,7 +72,7 @@ public final class HlsMediaPeriod implements MediaPeriod, HlsSampleStreamWrapper
|
|||
private final boolean allowChunklessPreparation;
|
||||
private final boolean useSessionKeys;
|
||||
|
||||
private @Nullable Callback callback;
|
||||
@Nullable private Callback callback;
|
||||
private int pendingPrepareCount;
|
||||
private TrackGroupArray trackGroups;
|
||||
private HlsSampleStreamWrapper[] sampleStreamWrappers;
|
||||
|
|
|
|||
|
|
@ -301,9 +301,9 @@ public final class HlsMediaSource extends BaseMediaSource
|
|||
private final boolean allowChunklessPreparation;
|
||||
private final boolean useSessionKeys;
|
||||
private final HlsPlaylistTracker playlistTracker;
|
||||
private final @Nullable Object tag;
|
||||
@Nullable private final Object tag;
|
||||
|
||||
private @Nullable TransferListener mediaTransferListener;
|
||||
@Nullable private TransferListener mediaTransferListener;
|
||||
|
||||
private HlsMediaSource(
|
||||
Uri manifestUri,
|
||||
|
|
|
|||
|
|
@ -166,7 +166,8 @@ public final class DefaultHlsPlaylistTracker
|
|||
}
|
||||
|
||||
@Override
|
||||
public @Nullable HlsMasterPlaylist getMasterPlaylist() {
|
||||
@Nullable
|
||||
public HlsMasterPlaylist getMasterPlaylist() {
|
||||
return masterPlaylist;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ import java.util.List;
|
|||
implements MediaPeriod, SequenceableLoader.Callback<ChunkSampleStream<SsChunkSource>> {
|
||||
|
||||
private final SsChunkSource.Factory chunkSourceFactory;
|
||||
private final @Nullable TransferListener transferListener;
|
||||
@Nullable private final TransferListener transferListener;
|
||||
private final LoaderErrorThrower manifestLoaderErrorThrower;
|
||||
private final LoadErrorHandlingPolicy loadErrorHandlingPolicy;
|
||||
private final EventDispatcher eventDispatcher;
|
||||
|
|
@ -50,7 +50,7 @@ import java.util.List;
|
|||
private final TrackGroupArray trackGroups;
|
||||
private final CompositeSequenceableLoaderFactory compositeSequenceableLoaderFactory;
|
||||
|
||||
private @Nullable Callback callback;
|
||||
@Nullable private Callback callback;
|
||||
private SsManifest manifest;
|
||||
private ChunkSampleStream<SsChunkSource>[] sampleStreams;
|
||||
private SequenceableLoader compositeSequenceableLoader;
|
||||
|
|
|
|||
|
|
@ -323,12 +323,12 @@ public final class SsMediaSource extends BaseMediaSource
|
|||
private final EventDispatcher manifestEventDispatcher;
|
||||
private final ParsingLoadable.Parser<? extends SsManifest> manifestParser;
|
||||
private final ArrayList<SsMediaPeriod> mediaPeriods;
|
||||
private final @Nullable Object tag;
|
||||
@Nullable private final Object tag;
|
||||
|
||||
private DataSource manifestDataSource;
|
||||
private Loader manifestLoader;
|
||||
private LoaderErrorThrower manifestLoaderErrorThrower;
|
||||
private @Nullable TransferListener mediaTransferListener;
|
||||
@Nullable private TransferListener mediaTransferListener;
|
||||
|
||||
private long manifestLoadStartTimestamp;
|
||||
private SsManifest manifest;
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ public class DefaultTimeBar extends View implements TimeBar {
|
|||
private final Paint adMarkerPaint;
|
||||
private final Paint playedAdMarkerPaint;
|
||||
private final Paint scrubberPaint;
|
||||
private final @Nullable Drawable scrubberDrawable;
|
||||
@Nullable private final Drawable scrubberDrawable;
|
||||
private final int barHeight;
|
||||
private final int touchTargetHeight;
|
||||
private final int adMarkerWidth;
|
||||
|
|
@ -217,8 +217,8 @@ public class DefaultTimeBar extends View implements TimeBar {
|
|||
private long position;
|
||||
private long bufferedPosition;
|
||||
private int adGroupCount;
|
||||
private @Nullable long[] adGroupTimesMs;
|
||||
private @Nullable boolean[] playedAdGroups;
|
||||
@Nullable private long[] adGroupTimesMs;
|
||||
@Nullable private boolean[] playedAdGroups;
|
||||
|
||||
public DefaultTimeBar(Context context) {
|
||||
this(context, null);
|
||||
|
|
|
|||
|
|
@ -621,7 +621,8 @@ public class PlayerView extends FrameLayout implements AdsLoader.AdViewProvider
|
|||
}
|
||||
|
||||
/** Returns the default artwork to display. */
|
||||
public @Nullable Drawable getDefaultArtwork() {
|
||||
@Nullable
|
||||
public Drawable getDefaultArtwork() {
|
||||
return defaultArtwork;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,8 +91,8 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
|||
};
|
||||
|
||||
private int stereoMode;
|
||||
private @Nullable MeshData leftMeshData;
|
||||
private @Nullable MeshData rightMeshData;
|
||||
@Nullable private MeshData leftMeshData;
|
||||
@Nullable private MeshData rightMeshData;
|
||||
|
||||
// Program related GL items. These are only valid if program != 0.
|
||||
private int program;
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public final class SceneRenderer implements VideoFrameMetadataListener, CameraMo
|
|||
// Used by other threads only
|
||||
private volatile @C.StreamType int defaultStereoMode;
|
||||
private @C.StreamType int lastStereoMode;
|
||||
private @Nullable byte[] lastProjectionData;
|
||||
@Nullable private byte[] lastProjectionData;
|
||||
|
||||
// Methods called on any thread.
|
||||
|
||||
|
|
|
|||
|
|
@ -64,14 +64,14 @@ public final class SphericalSurfaceView extends GLSurfaceView {
|
|||
/* package */ static final float UPRIGHT_ROLL = (float) Math.PI;
|
||||
|
||||
private final SensorManager sensorManager;
|
||||
private final @Nullable Sensor orientationSensor;
|
||||
@Nullable private final Sensor orientationSensor;
|
||||
private final OrientationListener orientationListener;
|
||||
private final Handler mainHandler;
|
||||
private final TouchTracker touchTracker;
|
||||
private final SceneRenderer scene;
|
||||
private @Nullable SurfaceTexture surfaceTexture;
|
||||
private @Nullable Surface surface;
|
||||
private @Nullable Player.VideoComponent videoComponent;
|
||||
@Nullable private SurfaceTexture surfaceTexture;
|
||||
@Nullable private Surface surface;
|
||||
@Nullable private Player.VideoComponent videoComponent;
|
||||
|
||||
public SphericalSurfaceView(Context context) {
|
||||
this(context, null);
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ import android.view.View;
|
|||
// The conversion from touch to yaw & pitch requires compensating for device roll. This is set
|
||||
// on the sensor thread and read on the UI thread.
|
||||
private volatile float roll;
|
||||
private @Nullable SingleTapListener singleTapListener;
|
||||
@Nullable private SingleTapListener singleTapListener;
|
||||
|
||||
@SuppressWarnings({
|
||||
"nullness:assignment.type.incompatible",
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ import com.google.android.exoplayer2.util.Log;
|
|||
public abstract class Action {
|
||||
|
||||
private final String tag;
|
||||
private final @Nullable String description;
|
||||
@Nullable private final String description;
|
||||
|
||||
/**
|
||||
* @param tag A tag to use for logging.
|
||||
|
|
@ -547,7 +547,7 @@ public abstract class Action {
|
|||
*/
|
||||
public static final class WaitForTimelineChanged extends Action {
|
||||
|
||||
private final @Nullable Timeline expectedTimeline;
|
||||
@Nullable private final Timeline expectedTimeline;
|
||||
|
||||
/**
|
||||
* Creates action waiting for a timeline change.
|
||||
|
|
|
|||
|
|
@ -613,7 +613,7 @@ public final class ActionSchedule {
|
|||
*/
|
||||
private static final class CallbackAction extends Action {
|
||||
|
||||
private @Nullable Callback callback;
|
||||
@Nullable private Callback callback;
|
||||
|
||||
public CallbackAction(String tag) {
|
||||
super(tag, "FinishedCallback");
|
||||
|
|
|
|||
|
|
@ -338,9 +338,9 @@ public final class ExoPlayerTestRunner implements Player.EventListener, ActionSc
|
|||
private final DefaultTrackSelector trackSelector;
|
||||
private final LoadControl loadControl;
|
||||
private final BandwidthMeter bandwidthMeter;
|
||||
private final @Nullable ActionSchedule actionSchedule;
|
||||
private final @Nullable Player.EventListener eventListener;
|
||||
private final @Nullable AnalyticsListener analyticsListener;
|
||||
@Nullable private final ActionSchedule actionSchedule;
|
||||
@Nullable private final Player.EventListener eventListener;
|
||||
@Nullable private final AnalyticsListener analyticsListener;
|
||||
|
||||
private final HandlerThread playerThread;
|
||||
private final HandlerWrapper handler;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public class FakeAdaptiveMediaPeriod extends FakeMediaPeriod
|
|||
|
||||
private final Allocator allocator;
|
||||
private final FakeChunkSource.Factory chunkSourceFactory;
|
||||
private final @Nullable TransferListener transferListener;
|
||||
@Nullable private final TransferListener transferListener;
|
||||
private final long durationUs;
|
||||
|
||||
private Callback callback;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue