diff --git a/extensions/cronet/src/main/java/com/google/android/exoplayer2/ext/cronet/CronetEngineWrapper.java b/extensions/cronet/src/main/java/com/google/android/exoplayer2/ext/cronet/CronetEngineWrapper.java
index db1394c1d6..1e24e3eb7c 100644
--- a/extensions/cronet/src/main/java/com/google/android/exoplayer2/ext/cronet/CronetEngineWrapper.java
+++ b/extensions/cronet/src/main/java/com/google/android/exoplayer2/ext/cronet/CronetEngineWrapper.java
@@ -39,7 +39,8 @@ public final class CronetEngineWrapper {
private final @CronetEngineSource int cronetEngineSource;
/**
- * Source of {@link CronetEngine}.
+ * Source of {@link CronetEngine}. One of {@link #SOURCE_NATIVE}, {@link #SOURCE_GMS}, {@link
+ * #SOURCE_UNKNOWN}, {@link #SOURCE_USER_PROVIDED} or {@link #SOURCE_UNAVAILABLE}.
*/
@Retention(RetentionPolicy.SOURCE)
@IntDef({SOURCE_NATIVE, SOURCE_GMS, SOURCE_UNKNOWN, SOURCE_USER_PROVIDED, SOURCE_UNAVAILABLE})
diff --git a/extensions/flac/src/main/java/com/google/android/exoplayer2/ext/flac/FlacExtractor.java b/extensions/flac/src/main/java/com/google/android/exoplayer2/ext/flac/FlacExtractor.java
index b6eec765d1..a1fbcc69d6 100644
--- a/extensions/flac/src/main/java/com/google/android/exoplayer2/ext/flac/FlacExtractor.java
+++ b/extensions/flac/src/main/java/com/google/android/exoplayer2/ext/flac/FlacExtractor.java
@@ -50,7 +50,10 @@ public final class FlacExtractor implements Extractor {
/** Factory that returns one extractor which is a {@link FlacExtractor}. */
public static final ExtractorsFactory FACTORY = () -> new Extractor[] {new FlacExtractor()};
- /** Flags controlling the behavior of the extractor. */
+ /**
+ * Flags controlling the behavior of the extractor. Possible flag value is {@link
+ * #FLAG_DISABLE_ID3_METADATA}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef(
flag = true,
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/C.java b/library/core/src/main/java/com/google/android/exoplayer2/C.java
index 096145b115..c4bbc1a53e 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/C.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/C.java
@@ -110,7 +110,8 @@ public final class C {
public static final String SANS_SERIF_NAME = "sans-serif";
/**
- * Crypto modes for a codec.
+ * Crypto modes for a codec. One of {@link #CRYPTO_MODE_UNENCRYPTED}, {@link #CRYPTO_MODE_AES_CTR}
+ * or {@link #CRYPTO_MODE_AES_CBC}.
*/
@Retention(RetentionPolicy.SOURCE)
@IntDef({CRYPTO_MODE_UNENCRYPTED, CRYPTO_MODE_AES_CTR, CRYPTO_MODE_AES_CBC})
@@ -134,7 +135,14 @@ public final class C {
*/
public static final int AUDIO_SESSION_ID_UNSET = AudioManager.AUDIO_SESSION_ID_GENERATE;
- /** Represents an audio encoding, or an invalid or unset value. */
+ /**
+ * Represents an audio encoding, or an invalid or unset value. One of {@link Format#NO_VALUE},
+ * {@link #ENCODING_INVALID}, {@link #ENCODING_PCM_8BIT}, {@link #ENCODING_PCM_16BIT}, {@link
+ * #ENCODING_PCM_24BIT}, {@link #ENCODING_PCM_32BIT}, {@link #ENCODING_PCM_FLOAT}, {@link
+ * #ENCODING_PCM_MU_LAW}, {@link #ENCODING_PCM_A_LAW}, {@link #ENCODING_AC3}, {@link
+ * #ENCODING_E_AC3}, {@link #ENCODING_DTS}, {@link #ENCODING_DTS_HD} or {@link
+ * #ENCODING_DOLBY_TRUEHD}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({
Format.NO_VALUE,
@@ -154,7 +162,12 @@ public final class C {
})
public @interface Encoding {}
- /** Represents a PCM audio encoding, or an invalid or unset value. */
+ /**
+ * Represents a PCM audio encoding, or an invalid or unset value. One of {@link Format#NO_VALUE},
+ * {@link #ENCODING_INVALID}, {@link #ENCODING_PCM_8BIT}, {@link #ENCODING_PCM_16BIT}, {@link
+ * #ENCODING_PCM_24BIT}, {@link #ENCODING_PCM_32BIT}, {@link #ENCODING_PCM_FLOAT}, {@link
+ * #ENCODING_PCM_MU_LAW} or {@link #ENCODING_PCM_A_LAW}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({
Format.NO_VALUE,
@@ -196,11 +209,22 @@ public final class C {
public static final int ENCODING_DOLBY_TRUEHD = AudioFormat.ENCODING_DOLBY_TRUEHD;
/**
- * Stream types for an {@link android.media.AudioTrack}.
+ * Stream types for an {@link android.media.AudioTrack}. One of {@link #STREAM_TYPE_ALARM}, {@link
+ * #STREAM_TYPE_DTMF}, {@link #STREAM_TYPE_MUSIC}, {@link #STREAM_TYPE_NOTIFICATION}, {@link
+ * #STREAM_TYPE_RING}, {@link #STREAM_TYPE_SYSTEM}, {@link #STREAM_TYPE_VOICE_CALL} or {@link
+ * #STREAM_TYPE_USE_DEFAULT}.
*/
@Retention(RetentionPolicy.SOURCE)
- @IntDef({STREAM_TYPE_ALARM, STREAM_TYPE_DTMF, STREAM_TYPE_MUSIC, STREAM_TYPE_NOTIFICATION,
- STREAM_TYPE_RING, STREAM_TYPE_SYSTEM, STREAM_TYPE_VOICE_CALL, STREAM_TYPE_USE_DEFAULT})
+ @IntDef({
+ STREAM_TYPE_ALARM,
+ STREAM_TYPE_DTMF,
+ STREAM_TYPE_MUSIC,
+ STREAM_TYPE_NOTIFICATION,
+ STREAM_TYPE_RING,
+ STREAM_TYPE_SYSTEM,
+ STREAM_TYPE_VOICE_CALL,
+ STREAM_TYPE_USE_DEFAULT
+ })
public @interface StreamType {}
/**
* @see AudioManager#STREAM_ALARM
@@ -240,11 +264,18 @@ public final class C {
public static final int STREAM_TYPE_DEFAULT = STREAM_TYPE_MUSIC;
/**
- * Content types for {@link com.google.android.exoplayer2.audio.AudioAttributes}.
+ * Content types for {@link com.google.android.exoplayer2.audio.AudioAttributes}. One of {@link
+ * #CONTENT_TYPE_MOVIE}, {@link #CONTENT_TYPE_MUSIC}, {@link #CONTENT_TYPE_SONIFICATION}, {@link
+ * #CONTENT_TYPE_SPEECH} or {@link #CONTENT_TYPE_UNKNOWN}.
*/
@Retention(RetentionPolicy.SOURCE)
- @IntDef({CONTENT_TYPE_MOVIE, CONTENT_TYPE_MUSIC, CONTENT_TYPE_SONIFICATION, CONTENT_TYPE_SPEECH,
- CONTENT_TYPE_UNKNOWN})
+ @IntDef({
+ CONTENT_TYPE_MOVIE,
+ CONTENT_TYPE_MUSIC,
+ CONTENT_TYPE_SONIFICATION,
+ CONTENT_TYPE_SPEECH,
+ CONTENT_TYPE_UNKNOWN
+ })
public @interface AudioContentType {}
/**
* @see android.media.AudioAttributes#CONTENT_TYPE_MOVIE
@@ -271,13 +302,16 @@ public final class C {
android.media.AudioAttributes.CONTENT_TYPE_UNKNOWN;
/**
- * Flags for {@link com.google.android.exoplayer2.audio.AudioAttributes}.
- *
- * Note that {@code FLAG_HW_AV_SYNC} is not available because the player takes care of setting the
- * flag when tunneling is enabled via a track selector.
+ * Flags for {@link com.google.android.exoplayer2.audio.AudioAttributes}. Possible flag value is
+ * {@link #FLAG_AUDIBILITY_ENFORCED}.
+ *
+ *
Note that {@code FLAG_HW_AV_SYNC} is not available because the player takes care of setting
+ * the flag when tunneling is enabled via a track selector.
*/
@Retention(RetentionPolicy.SOURCE)
- @IntDef(flag = true, value = {FLAG_AUDIBILITY_ENFORCED})
+ @IntDef(
+ flag = true,
+ value = {FLAG_AUDIBILITY_ENFORCED})
public @interface AudioFlags {}
/**
* @see android.media.AudioAttributes#FLAG_AUDIBILITY_ENFORCED
@@ -285,7 +319,17 @@ public final class C {
public static final int FLAG_AUDIBILITY_ENFORCED =
android.media.AudioAttributes.FLAG_AUDIBILITY_ENFORCED;
- /** Usage types for {@link com.google.android.exoplayer2.audio.AudioAttributes}. */
+ /**
+ * Usage types for {@link com.google.android.exoplayer2.audio.AudioAttributes}. One of {@link
+ * #USAGE_ALARM}, {@link #USAGE_ASSISTANCE_ACCESSIBILITY}, {@link
+ * #USAGE_ASSISTANCE_NAVIGATION_GUIDANCE}, {@link #USAGE_ASSISTANCE_SONIFICATION}, {@link
+ * #USAGE_ASSISTANT}, {@link #USAGE_GAME}, {@link #USAGE_MEDIA}, {@link #USAGE_NOTIFICATION},
+ * {@link #USAGE_NOTIFICATION_COMMUNICATION_DELAYED}, {@link
+ * #USAGE_NOTIFICATION_COMMUNICATION_INSTANT}, {@link #USAGE_NOTIFICATION_COMMUNICATION_REQUEST},
+ * {@link #USAGE_NOTIFICATION_EVENT}, {@link #USAGE_NOTIFICATION_RINGTONE}, {@link
+ * #USAGE_UNKNOWN}, {@link #USAGE_VOICE_COMMUNICATION} or {@link
+ * #USAGE_VOICE_COMMUNICATION_SIGNALLING}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({
USAGE_ALARM,
@@ -377,7 +421,11 @@ public final class C {
public static final int USAGE_VOICE_COMMUNICATION_SIGNALLING =
android.media.AudioAttributes.USAGE_VOICE_COMMUNICATION_SIGNALLING;
- /** Audio focus types. */
+ /**
+ * Audio focus types. One of {@link #AUDIOFOCUS_NONE}, {@link #AUDIOFOCUS_GAIN}, {@link
+ * #AUDIOFOCUS_GAIN_TRANSIENT}, {@link #AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK} or {@link
+ * #AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({
AUDIOFOCUS_NONE,
@@ -401,11 +449,19 @@ public final class C {
AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE;
/**
- * Flags which can apply to a buffer containing a media sample.
+ * Flags which can apply to a buffer containing a media sample. Possible flag values are {@link
+ * #BUFFER_FLAG_KEY_FRAME}, {@link #BUFFER_FLAG_END_OF_STREAM}, {@link #BUFFER_FLAG_ENCRYPTED} and
+ * {@link #BUFFER_FLAG_DECODE_ONLY}.
*/
@Retention(RetentionPolicy.SOURCE)
- @IntDef(flag = true, value = {BUFFER_FLAG_KEY_FRAME, BUFFER_FLAG_END_OF_STREAM,
- BUFFER_FLAG_ENCRYPTED, BUFFER_FLAG_DECODE_ONLY})
+ @IntDef(
+ flag = true,
+ value = {
+ BUFFER_FLAG_KEY_FRAME,
+ BUFFER_FLAG_END_OF_STREAM,
+ BUFFER_FLAG_ENCRYPTED,
+ BUFFER_FLAG_DECODE_ONLY
+ })
public @interface BufferFlags {}
/**
* Indicates that a buffer holds a synchronization sample.
@@ -422,7 +478,8 @@ public final class C {
public static final int BUFFER_FLAG_DECODE_ONLY = 1 << 31; // 0x80000000
/**
- * Video scaling modes for {@link MediaCodec}-based {@link Renderer}s.
+ * Video scaling modes for {@link MediaCodec}-based {@link Renderer}s. One of {@link
+ * #VIDEO_SCALING_MODE_SCALE_TO_FIT} or {@link #VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING}.
*/
@Retention(RetentionPolicy.SOURCE)
@IntDef(value = {VIDEO_SCALING_MODE_SCALE_TO_FIT, VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING})
@@ -443,11 +500,13 @@ public final class C {
public static final int VIDEO_SCALING_MODE_DEFAULT = VIDEO_SCALING_MODE_SCALE_TO_FIT;
/**
- * Track selection flags.
+ * Track selection flags. Possible flag values are {@link #SELECTION_FLAG_DEFAULT}, {@link
+ * #SELECTION_FLAG_FORCED} and {@link #SELECTION_FLAG_AUTOSELECT}.
*/
@Retention(RetentionPolicy.SOURCE)
- @IntDef(flag = true, value = {SELECTION_FLAG_DEFAULT, SELECTION_FLAG_FORCED,
- SELECTION_FLAG_AUTOSELECT})
+ @IntDef(
+ flag = true,
+ value = {SELECTION_FLAG_DEFAULT, SELECTION_FLAG_FORCED, SELECTION_FLAG_AUTOSELECT})
public @interface SelectionFlags {}
/**
* Indicates that the track should be selected if user preferences do not state otherwise.
@@ -467,7 +526,8 @@ public final class C {
public static final String LANGUAGE_UNDETERMINED = "und";
/**
- * Represents a streaming or other media type.
+ * Represents a streaming or other media type. One of {@link #TYPE_DASH}, {@link #TYPE_SS}, {@link
+ * #TYPE_HLS} or {@link #TYPE_OTHER}.
*/
@Retention(RetentionPolicy.SOURCE)
@IntDef({TYPE_DASH, TYPE_SS, TYPE_HLS, TYPE_OTHER})
@@ -749,15 +809,17 @@ public final class C {
public static final int MSG_CUSTOM_BASE = 10000;
/**
- * The stereo mode for 360/3D/VR videos.
+ * The stereo mode for 360/3D/VR videos. One of {@link Format#NO_VALUE}, {@link
+ * #STEREO_MODE_MONO}, {@link #STEREO_MODE_TOP_BOTTOM}, {@link #STEREO_MODE_LEFT_RIGHT} or {@link
+ * #STEREO_MODE_STEREO_MESH}.
*/
@Retention(RetentionPolicy.SOURCE)
@IntDef({
- Format.NO_VALUE,
- STEREO_MODE_MONO,
- STEREO_MODE_TOP_BOTTOM,
- STEREO_MODE_LEFT_RIGHT,
- STEREO_MODE_STEREO_MESH
+ Format.NO_VALUE,
+ STEREO_MODE_MONO,
+ STEREO_MODE_TOP_BOTTOM,
+ STEREO_MODE_LEFT_RIGHT,
+ STEREO_MODE_STEREO_MESH
})
public @interface StereoMode {}
/**
@@ -779,7 +841,8 @@ public final class C {
public static final int STEREO_MODE_STEREO_MESH = 3;
/**
- * Video colorspaces.
+ * Video colorspaces. One of {@link Format#NO_VALUE}, {@link #COLOR_SPACE_BT709}, {@link
+ * #COLOR_SPACE_BT601} or {@link #COLOR_SPACE_BT2020}.
*/
@Retention(RetentionPolicy.SOURCE)
@IntDef({Format.NO_VALUE, COLOR_SPACE_BT709, COLOR_SPACE_BT601, COLOR_SPACE_BT2020})
@@ -798,7 +861,8 @@ public final class C {
public static final int COLOR_SPACE_BT2020 = MediaFormat.COLOR_STANDARD_BT2020;
/**
- * Video color transfer characteristics.
+ * Video color transfer characteristics. One of {@link Format#NO_VALUE}, {@link
+ * #COLOR_TRANSFER_SDR}, {@link #COLOR_TRANSFER_ST2084} or {@link #COLOR_TRANSFER_HLG}.
*/
@Retention(RetentionPolicy.SOURCE)
@IntDef({Format.NO_VALUE, COLOR_TRANSFER_SDR, COLOR_TRANSFER_ST2084, COLOR_TRANSFER_HLG})
@@ -817,7 +881,8 @@ public final class C {
public static final int COLOR_TRANSFER_HLG = MediaFormat.COLOR_TRANSFER_HLG;
/**
- * Video color range.
+ * Video color range. One of {@link Format#NO_VALUE}, {@link #COLOR_RANGE_LIMITED} or {@link
+ * #COLOR_RANGE_FULL}.
*/
@Retention(RetentionPolicy.SOURCE)
@IntDef({Format.NO_VALUE, COLOR_RANGE_LIMITED, COLOR_RANGE_FULL})
@@ -845,7 +910,12 @@ public final class C {
*/
public static final int PRIORITY_DOWNLOAD = PRIORITY_PLAYBACK - 1000;
- /** Network connection type. */
+ /**
+ * Network connection type. One of {@link #NETWORK_TYPE_UNKNOWN}, {@link #NETWORK_TYPE_OFFLINE},
+ * {@link #NETWORK_TYPE_WIFI}, {@link #NETWORK_TYPE_2G}, {@link #NETWORK_TYPE_3G}, {@link
+ * #NETWORK_TYPE_4G}, {@link #NETWORK_TYPE_CELLULAR_UNKNOWN}, {@link #NETWORK_TYPE_ETHERNET} or
+ * {@link #NETWORK_TYPE_OTHER}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({
NETWORK_TYPE_UNKNOWN,
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java b/library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java
index 6cab53b78a..f625519b8a 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java
@@ -52,11 +52,11 @@ public class DefaultRenderersFactory implements RenderersFactory {
public static final long DEFAULT_ALLOWED_VIDEO_JOINING_TIME_MS = 5000;
/**
- * Modes for using extension renderers.
+ * Modes for using extension renderers. One of {@link #EXTENSION_RENDERER_MODE_OFF}, {@link
+ * #EXTENSION_RENDERER_MODE_ON} or {@link #EXTENSION_RENDERER_MODE_PREFER}.
*/
@Retention(RetentionPolicy.SOURCE)
- @IntDef({EXTENSION_RENDERER_MODE_OFF, EXTENSION_RENDERER_MODE_ON,
- EXTENSION_RENDERER_MODE_PREFER})
+ @IntDef({EXTENSION_RENDERER_MODE_OFF, EXTENSION_RENDERER_MODE_ON, EXTENSION_RENDERER_MODE_PREFER})
public @interface ExtensionRendererMode {}
/**
* Do not allow use of extension renderers.
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/ExoPlaybackException.java b/library/core/src/main/java/com/google/android/exoplayer2/ExoPlaybackException.java
index ca7367f1b0..ba00d1163f 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/ExoPlaybackException.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/ExoPlaybackException.java
@@ -28,7 +28,8 @@ import java.lang.annotation.RetentionPolicy;
public final class ExoPlaybackException extends Exception {
/**
- * The type of source that produced the error.
+ * The type of source that produced the error. One of {@link #TYPE_SOURCE}, {@link #TYPE_RENDERER}
+ * or {@link #TYPE_UNEXPECTED}.
*/
@Retention(RetentionPolicy.SOURCE)
@IntDef({TYPE_SOURCE, TYPE_RENDERER, TYPE_UNEXPECTED})
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/Player.java b/library/core/src/main/java/com/google/android/exoplayer2/Player.java
index fddd4f1dea..a00af72485 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/Player.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/Player.java
@@ -424,10 +424,13 @@ public interface Player {
*/
int STATE_ENDED = 4;
- /** Repeat modes for playback. */
+ /**
+ * Repeat modes for playback. One of {@link #REPEAT_MODE_OFF}, {@link #REPEAT_MODE_ONE} or {@link
+ * #REPEAT_MODE_ALL}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({REPEAT_MODE_OFF, REPEAT_MODE_ONE, REPEAT_MODE_ALL})
- @interface RepeatMode {}
+ public @interface RepeatMode {}
/**
* Normal playback without repetition.
*/
@@ -441,7 +444,11 @@ public interface Player {
*/
int REPEAT_MODE_ALL = 2;
- /** Reasons for position discontinuities. */
+ /**
+ * Reasons for position discontinuities. One of {@link #DISCONTINUITY_REASON_PERIOD_TRANSITION},
+ * {@link #DISCONTINUITY_REASON_SEEK}, {@link #DISCONTINUITY_REASON_SEEK_ADJUSTMENT}, {@link
+ * #DISCONTINUITY_REASON_AD_INSERTION} or {@link #DISCONTINUITY_REASON_INTERNAL}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({
DISCONTINUITY_REASON_PERIOD_TRANSITION,
@@ -450,7 +457,7 @@ public interface Player {
DISCONTINUITY_REASON_AD_INSERTION,
DISCONTINUITY_REASON_INTERNAL
})
- @interface DiscontinuityReason {}
+ public @interface DiscontinuityReason {}
/**
* Automatic playback transition from one period in the timeline to the next. The period index may
* be the same as it was before the discontinuity in case the current period is repeated.
@@ -468,14 +475,17 @@ public interface Player {
/** Discontinuity introduced internally by the source. */
int DISCONTINUITY_REASON_INTERNAL = 4;
- /** Reasons for timeline and/or manifest changes. */
+ /**
+ * Reasons for timeline and/or manifest changes. One of {@link #TIMELINE_CHANGE_REASON_PREPARED},
+ * {@link #TIMELINE_CHANGE_REASON_RESET} or {@link #TIMELINE_CHANGE_REASON_DYNAMIC}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({
TIMELINE_CHANGE_REASON_PREPARED,
TIMELINE_CHANGE_REASON_RESET,
TIMELINE_CHANGE_REASON_DYNAMIC
})
- @interface TimelineChangeReason {}
+ public @interface TimelineChangeReason {}
/**
* Timeline and manifest changed as a result of a player initialization with new media.
*/
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/Renderer.java b/library/core/src/main/java/com/google/android/exoplayer2/Renderer.java
index c1c640ca00..d56b2f4f7b 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/Renderer.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/Renderer.java
@@ -34,10 +34,13 @@ import java.lang.annotation.RetentionPolicy;
*/
public interface Renderer extends PlayerMessage.Target {
- /** The renderer states. */
+ /**
+ * The renderer states. One of {@link #STATE_DISABLED}, {@link #STATE_ENABLED} or {@link
+ * #STATE_STARTED}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({STATE_DISABLED, STATE_ENABLED, STATE_STARTED})
- @interface State {}
+ public @interface State {}
/**
* The renderer is disabled.
*/
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/audio/Ac3Util.java b/library/core/src/main/java/com/google/android/exoplayer2/audio/Ac3Util.java
index 94fe759a9b..b02fc1b1b0 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/audio/Ac3Util.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/audio/Ac3Util.java
@@ -33,7 +33,10 @@ public final class Ac3Util {
/** Holds sample format information as presented by a syncframe header. */
public static final class SyncFrameInfo {
- /** AC3 stream types. See also ETSI TS 102 366 E.1.3.1.1. */
+ /**
+ * AC3 stream types. See also ETSI TS 102 366 E.1.3.1.1. One of {@link #STREAM_TYPE_UNDEFINED},
+ * {@link #STREAM_TYPE_TYPE0}, {@link #STREAM_TYPE_TYPE1} or {@link #STREAM_TYPE_TYPE2}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({STREAM_TYPE_UNDEFINED, STREAM_TYPE_TYPE0, STREAM_TYPE_TYPE1, STREAM_TYPE_TYPE2})
public @interface StreamType {}
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/audio/AudioFocusManager.java b/library/core/src/main/java/com/google/android/exoplayer2/audio/AudioFocusManager.java
index d078cddcc1..f1c24d0027 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/audio/AudioFocusManager.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/audio/AudioFocusManager.java
@@ -52,7 +52,10 @@ public final class AudioFocusManager {
void executePlayerCommand(@PlayerCommand int playerCommand);
}
- /** Player commands. */
+ /**
+ * Player commands. One of {@link #PLAYER_COMMAND_DO_NOT_PLAY}, {@link
+ * #PLAYER_COMMAND_WAIT_FOR_CALLBACK} or {@link #PLAYER_COMMAND_PLAY_WHEN_READY}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({
PLAYER_COMMAND_DO_NOT_PLAY,
@@ -134,8 +137,7 @@ public final class AudioFocusManager {
* managed automatically.
* @param playWhenReady The current state of {@link ExoPlayer#getPlayWhenReady()}.
* @param playerState The current player state; {@link ExoPlayer#getPlaybackState()}.
- * @return A command to execute on the player. One of {@link #PLAYER_COMMAND_DO_NOT_PLAY}, {@link
- * #PLAYER_COMMAND_WAIT_FOR_CALLBACK}, and {@link #PLAYER_COMMAND_PLAY_WHEN_READY}.
+ * @return A {@link PlayerCommand} to execute on the player.
*/
public @PlayerCommand int setAudioAttributes(
@Nullable AudioAttributes audioAttributes, boolean playWhenReady, int playerState) {
@@ -169,8 +171,7 @@ public final class AudioFocusManager {
* Called by a player as part of {@link ExoPlayer#prepare(MediaSource, boolean, boolean)}.
*
* @param playWhenReady The current state of {@link ExoPlayer#getPlayWhenReady()}.
- * @return A command to execute on the player. One of {@link #PLAYER_COMMAND_DO_NOT_PLAY}, {@link
- * #PLAYER_COMMAND_WAIT_FOR_CALLBACK}, and {@link #PLAYER_COMMAND_PLAY_WHEN_READY}.
+ * @return A {@link PlayerCommand} to execute on the player.
*/
public @PlayerCommand int handlePrepare(boolean playWhenReady) {
if (audioManager == null) {
@@ -185,8 +186,7 @@ public final class AudioFocusManager {
*
* @param playWhenReady The desired value of playWhenReady.
* @param playerState The current state of the player.
- * @return A command to execute on the player. One of {@link #PLAYER_COMMAND_DO_NOT_PLAY}, {@link
- * #PLAYER_COMMAND_WAIT_FOR_CALLBACK}, and {@link #PLAYER_COMMAND_PLAY_WHEN_READY}.
+ * @return A {@link PlayerCommand} to execute on the player.
*/
public @PlayerCommand int handleSetPlayWhenReady(boolean playWhenReady, int playerState) {
if (audioManager == null) {
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/decoder/DecoderInputBuffer.java b/library/core/src/main/java/com/google/android/exoplayer2/decoder/DecoderInputBuffer.java
index d22a45ce88..501d87d208 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/decoder/DecoderInputBuffer.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/decoder/DecoderInputBuffer.java
@@ -27,11 +27,16 @@ import java.nio.ByteBuffer;
public class DecoderInputBuffer extends Buffer {
/**
- * The buffer replacement mode, which may disable replacement.
+ * The buffer replacement mode, which may disable replacement. One of {@link
+ * #BUFFER_REPLACEMENT_MODE_DISABLED}, {@link #BUFFER_REPLACEMENT_MODE_NORMAL} or {@link
+ * #BUFFER_REPLACEMENT_MODE_DIRECT}.
*/
@Retention(RetentionPolicy.SOURCE)
- @IntDef({BUFFER_REPLACEMENT_MODE_DISABLED, BUFFER_REPLACEMENT_MODE_NORMAL,
- BUFFER_REPLACEMENT_MODE_DIRECT})
+ @IntDef({
+ BUFFER_REPLACEMENT_MODE_DISABLED,
+ BUFFER_REPLACEMENT_MODE_NORMAL,
+ BUFFER_REPLACEMENT_MODE_DIRECT
+ })
public @interface BufferReplacementMode {}
/**
* Disallows buffer replacement.
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSessionManager.java b/library/core/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSessionManager.java
index 895c27ad93..e7d23017d2 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSessionManager.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSessionManager.java
@@ -67,7 +67,10 @@ public class DefaultDrmSessionManager implements DrmSe
*/
public static final String PLAYREADY_CUSTOM_DATA_KEY = "PRCustomData";
- /** Determines the action to be done after a session acquired. */
+ /**
+ * Determines the action to be done after a session acquired. One of {@link #MODE_PLAYBACK},
+ * {@link #MODE_QUERY}, {@link #MODE_DOWNLOAD} or {@link #MODE_RELEASE}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({MODE_PLAYBACK, MODE_QUERY, MODE_DOWNLOAD, MODE_RELEASE})
public @interface Mode {}
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/drm/DrmSession.java b/library/core/src/main/java/com/google/android/exoplayer2/drm/DrmSession.java
index 3d3b6b5b3c..40bbde4d8a 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/drm/DrmSession.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/drm/DrmSession.java
@@ -39,10 +39,13 @@ public interface DrmSession {
}
- /** The state of the DRM session. */
+ /**
+ * The state of the DRM session. One of {@link #STATE_RELEASED}, {@link #STATE_ERROR}, {@link
+ * #STATE_OPENING}, {@link #STATE_OPENED} or {@link #STATE_OPENED_WITH_KEYS}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({STATE_RELEASED, STATE_ERROR, STATE_OPENING, STATE_OPENED, STATE_OPENED_WITH_KEYS})
- @interface State {}
+ public @interface State {}
/**
* The session has been released.
*/
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/drm/UnsupportedDrmException.java b/library/core/src/main/java/com/google/android/exoplayer2/drm/UnsupportedDrmException.java
index f0e748d722..5bea83d020 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/drm/UnsupportedDrmException.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/drm/UnsupportedDrmException.java
@@ -25,7 +25,8 @@ import java.lang.annotation.RetentionPolicy;
public final class UnsupportedDrmException extends Exception {
/**
- * The reason for the exception.
+ * The reason for the exception. One of {@link #REASON_UNSUPPORTED_SCHEME} or {@link
+ * #REASON_INSTANTIATION_ERROR}.
*/
@Retention(RetentionPolicy.SOURCE)
@IntDef({REASON_UNSUPPORTED_SCHEME, REASON_INSTANTIATION_ERROR})
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/extractor/Extractor.java b/library/core/src/main/java/com/google/android/exoplayer2/extractor/Extractor.java
index c63aad541b..47fe45bfc3 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/extractor/Extractor.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/extractor/Extractor.java
@@ -44,10 +44,13 @@ public interface Extractor {
*/
int RESULT_END_OF_INPUT = C.RESULT_END_OF_INPUT;
- /** Result values that can be returned by {@link #read(ExtractorInput, PositionHolder)}. */
+ /**
+ * Result values that can be returned by {@link #read(ExtractorInput, PositionHolder)}. One of
+ * {@link #RESULT_CONTINUE}, {@link #RESULT_SEEK} or {@link #RESULT_END_OF_INPUT}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef(value = {RESULT_CONTINUE, RESULT_SEEK, RESULT_END_OF_INPUT})
- @interface ReadResult {}
+ public @interface ReadResult {}
/**
* Returns whether this extractor can extract samples from the {@link ExtractorInput}, which must
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/extractor/amr/AmrExtractor.java b/library/core/src/main/java/com/google/android/exoplayer2/extractor/amr/AmrExtractor.java
index b94ea7cb58..dfdce02450 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/extractor/amr/AmrExtractor.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/extractor/amr/AmrExtractor.java
@@ -47,7 +47,10 @@ public final class AmrExtractor implements Extractor {
/** Factory for {@link AmrExtractor} instances. */
public static final ExtractorsFactory FACTORY = () -> new Extractor[] {new AmrExtractor()};
- /** Flags controlling the behavior of the extractor. */
+ /**
+ * Flags controlling the behavior of the extractor. Possible flag value is {@link
+ * #FLAG_ENABLE_CONSTANT_BITRATE_SEEKING}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef(
flag = true,
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mkv/EbmlReaderOutput.java b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mkv/EbmlReaderOutput.java
index b1cd508c8e..067c88b552 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mkv/EbmlReaderOutput.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mkv/EbmlReaderOutput.java
@@ -27,7 +27,10 @@ import java.lang.annotation.RetentionPolicy;
*/
/* package */ interface EbmlReaderOutput {
- /** EBML element types. */
+ /**
+ * EBML element types. One of {@link #TYPE_UNKNOWN}, {@link #TYPE_MASTER}, {@link
+ * #TYPE_UNSIGNED_INT}, {@link #TYPE_STRING}, {@link #TYPE_BINARY} or {@link #TYPE_FLOAT}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({TYPE_UNKNOWN, TYPE_MASTER, TYPE_UNSIGNED_INT, TYPE_STRING, TYPE_BINARY, TYPE_FLOAT})
@interface ElementType {}
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java
index 355e299325..8e00628536 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java
@@ -65,10 +65,13 @@ public final class MatroskaExtractor implements Extractor {
public static final ExtractorsFactory FACTORY = () -> new Extractor[] {new MatroskaExtractor()};
/**
- * Flags controlling the behavior of the extractor.
+ * Flags controlling the behavior of the extractor. Possible flag value is {@link
+ * #FLAG_DISABLE_SEEK_FOR_CUES}.
*/
@Retention(RetentionPolicy.SOURCE)
- @IntDef(flag = true, value = {FLAG_DISABLE_SEEK_FOR_CUES})
+ @IntDef(
+ flag = true,
+ value = {FLAG_DISABLE_SEEK_FOR_CUES})
public @interface Flags {}
/**
* Flag to disable seeking for cues.
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp3/Mp3Extractor.java b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp3/Mp3Extractor.java
index 73dd0ec218..26a8bcce75 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp3/Mp3Extractor.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp3/Mp3Extractor.java
@@ -47,10 +47,13 @@ public final class Mp3Extractor implements Extractor {
public static final ExtractorsFactory FACTORY = () -> new Extractor[] {new Mp3Extractor()};
/**
- * Flags controlling the behavior of the extractor.
+ * Flags controlling the behavior of the extractor. Possible flag values are {@link
+ * #FLAG_ENABLE_CONSTANT_BITRATE_SEEKING} and {@link #FLAG_DISABLE_ID3_METADATA}.
*/
@Retention(RetentionPolicy.SOURCE)
- @IntDef(flag = true, value = {FLAG_ENABLE_CONSTANT_BITRATE_SEEKING, FLAG_DISABLE_ID3_METADATA})
+ @IntDef(
+ flag = true,
+ value = {FLAG_ENABLE_CONSTANT_BITRATE_SEEKING, FLAG_DISABLE_ID3_METADATA})
public @interface Flags {}
/**
* Flag to force enable seeking using a constant bitrate assumption in cases where seeking would
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java
index 12da11fd6b..f253016cf7 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java
@@ -62,12 +62,21 @@ public final class FragmentedMp4Extractor implements Extractor {
() -> new Extractor[] {new FragmentedMp4Extractor()};
/**
- * Flags controlling the behavior of the extractor.
+ * Flags controlling the behavior of the extractor. Possible flag values are {@link
+ * #FLAG_WORKAROUND_EVERY_VIDEO_FRAME_IS_SYNC_FRAME}, {@link #FLAG_WORKAROUND_IGNORE_TFDT_BOX},
+ * {@link #FLAG_ENABLE_EMSG_TRACK}, {@link #FLAG_SIDELOADED} and {@link
+ * #FLAG_WORKAROUND_IGNORE_EDIT_LISTS}.
*/
@Retention(RetentionPolicy.SOURCE)
- @IntDef(flag = true, value = {FLAG_WORKAROUND_EVERY_VIDEO_FRAME_IS_SYNC_FRAME,
- FLAG_WORKAROUND_IGNORE_TFDT_BOX, FLAG_ENABLE_EMSG_TRACK, FLAG_SIDELOADED,
- FLAG_WORKAROUND_IGNORE_EDIT_LISTS})
+ @IntDef(
+ flag = true,
+ value = {
+ FLAG_WORKAROUND_EVERY_VIDEO_FRAME_IS_SYNC_FRAME,
+ FLAG_WORKAROUND_IGNORE_TFDT_BOX,
+ FLAG_ENABLE_EMSG_TRACK,
+ FLAG_SIDELOADED,
+ FLAG_WORKAROUND_IGNORE_EDIT_LISTS
+ })
public @interface Flags {}
/**
* Flag to work around an issue in some video streams where every frame is marked as a sync frame.
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/Mp4Extractor.java b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/Mp4Extractor.java
index 5bb5e214c9..2aa9b86444 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/Mp4Extractor.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/Mp4Extractor.java
@@ -50,10 +50,13 @@ public final class Mp4Extractor implements Extractor, SeekMap {
public static final ExtractorsFactory FACTORY = () -> new Extractor[] {new Mp4Extractor()};
/**
- * Flags controlling the behavior of the extractor.
+ * Flags controlling the behavior of the extractor. Possible flag value is {@link
+ * #FLAG_WORKAROUND_IGNORE_EDIT_LISTS}.
*/
@Retention(RetentionPolicy.SOURCE)
- @IntDef(flag = true, value = {FLAG_WORKAROUND_IGNORE_EDIT_LISTS})
+ @IntDef(
+ flag = true,
+ value = {FLAG_WORKAROUND_IGNORE_EDIT_LISTS})
public @interface Flags {}
/**
* Flag to ignore any edit lists in the stream.
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/Track.java b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/Track.java
index 3adc5a8972..867e037f4b 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/Track.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/Track.java
@@ -28,7 +28,8 @@ import java.lang.annotation.RetentionPolicy;
public final class Track {
/**
- * The transformation to apply to samples in the track, if any.
+ * The transformation to apply to samples in the track, if any. One of {@link
+ * #TRANSFORMATION_NONE} or {@link #TRANSFORMATION_CEA608_CDAT}.
*/
@Retention(RetentionPolicy.SOURCE)
@IntDef({TRANSFORMATION_NONE, TRANSFORMATION_CEA608_CDAT})
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/AdtsExtractor.java b/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/AdtsExtractor.java
index ef7b763306..0c2a0545dc 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/AdtsExtractor.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/AdtsExtractor.java
@@ -43,7 +43,10 @@ public final class AdtsExtractor implements Extractor {
/** Factory for {@link AdtsExtractor} instances. */
public static final ExtractorsFactory FACTORY = () -> new Extractor[] {new AdtsExtractor()};
- /** Flags controlling the behavior of the extractor. */
+ /**
+ * Flags controlling the behavior of the extractor. Possible flag value is {@link
+ * #FLAG_ENABLE_CONSTANT_BITRATE_SEEKING}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef(
flag = true,
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/DefaultTsPayloadReaderFactory.java b/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/DefaultTsPayloadReaderFactory.java
index 085e3443c1..06a60776c2 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/DefaultTsPayloadReaderFactory.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/DefaultTsPayloadReaderFactory.java
@@ -34,13 +34,24 @@ import java.util.List;
public final class DefaultTsPayloadReaderFactory implements TsPayloadReader.Factory {
/**
- * Flags controlling elementary stream readers' behavior.
+ * Flags controlling elementary stream readers' behavior. Possible flag values are {@link
+ * #FLAG_ALLOW_NON_IDR_KEYFRAMES}, {@link #FLAG_IGNORE_AAC_STREAM}, {@link
+ * #FLAG_IGNORE_H264_STREAM}, {@link #FLAG_DETECT_ACCESS_UNITS}, {@link
+ * #FLAG_IGNORE_SPLICE_INFO_STREAM} and {@link #FLAG_OVERRIDE_CAPTION_DESCRIPTORS}.
*/
@Retention(RetentionPolicy.SOURCE)
- @IntDef(flag = true, value = {FLAG_ALLOW_NON_IDR_KEYFRAMES, FLAG_IGNORE_AAC_STREAM,
- FLAG_IGNORE_H264_STREAM, FLAG_DETECT_ACCESS_UNITS, FLAG_IGNORE_SPLICE_INFO_STREAM,
- FLAG_OVERRIDE_CAPTION_DESCRIPTORS})
+ @IntDef(
+ flag = true,
+ value = {
+ FLAG_ALLOW_NON_IDR_KEYFRAMES,
+ FLAG_IGNORE_AAC_STREAM,
+ FLAG_IGNORE_H264_STREAM,
+ FLAG_DETECT_ACCESS_UNITS,
+ FLAG_IGNORE_SPLICE_INFO_STREAM,
+ FLAG_OVERRIDE_CAPTION_DESCRIPTORS
+ })
public @interface Flags {}
+
public static final int FLAG_ALLOW_NON_IDR_KEYFRAMES = 1;
public static final int FLAG_IGNORE_AAC_STREAM = 1 << 1;
public static final int FLAG_IGNORE_H264_STREAM = 1 << 2;
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/TsExtractor.java b/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/TsExtractor.java
index 6234590afa..cef0eb8363 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/TsExtractor.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/TsExtractor.java
@@ -54,7 +54,8 @@ public final class TsExtractor implements Extractor {
public static final ExtractorsFactory FACTORY = () -> new Extractor[] {new TsExtractor()};
/**
- * Modes for the extractor.
+ * Modes for the extractor. One of {@link #MODE_MULTI_PMT}, {@link #MODE_SINGLE_PMT} or {@link
+ * #MODE_HLS}.
*/
@Retention(RetentionPolicy.SOURCE)
@IntDef({MODE_MULTI_PMT, MODE_SINGLE_PMT, MODE_HLS})
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadManager.java b/library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadManager.java
index 36ac04505d..5b5ba6a095 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadManager.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadManager.java
@@ -521,7 +521,8 @@ public final class DownloadManager {
public static final class TaskState {
/**
- * Task states.
+ * Task states. One of {@link #STATE_QUEUED}, {@link #STATE_STARTED}, {@link #STATE_COMPLETED},
+ * {@link #STATE_CANCELED} or {@link #STATE_FAILED}.
*
* Transition diagram:
*
@@ -601,7 +602,10 @@ public final class DownloadManager {
private static final class Task implements Runnable {
/**
- * Task states.
+ * Task states. One of {@link TaskState#STATE_QUEUED}, {@link TaskState#STATE_STARTED}, {@link
+ * TaskState#STATE_COMPLETED}, {@link TaskState#STATE_CANCELED}, {@link TaskState#STATE_FAILED},
+ * {@link #STATE_QUEUED_CANCELING}, {@link #STATE_STARTED_CANCELING} or {@link
+ * #STATE_STARTED_STOPPING}.
*
*
Transition map (vertical states are source states):
*
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/scheduler/Requirements.java b/library/core/src/main/java/com/google/android/exoplayer2/scheduler/Requirements.java
index 30b07da3eb..106102b133 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/scheduler/Requirements.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/scheduler/Requirements.java
@@ -35,7 +35,10 @@ import java.lang.annotation.RetentionPolicy;
*/
public final class Requirements {
- /** Network types. */
+ /**
+ * Network types. One of {@link #NETWORK_TYPE_NONE}, {@link #NETWORK_TYPE_ANY}, {@link
+ * #NETWORK_TYPE_UNMETERED}, {@link #NETWORK_TYPE_NOT_ROAMING} or {@link #NETWORK_TYPE_METERED}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({
NETWORK_TYPE_NONE,
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/source/ClippingMediaSource.java b/library/core/src/main/java/com/google/android/exoplayer2/source/ClippingMediaSource.java
index f494856509..88e98e811f 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/source/ClippingMediaSource.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/source/ClippingMediaSource.java
@@ -37,7 +37,10 @@ public final class ClippingMediaSource extends CompositeMediaSource {
/** Thrown when a {@link ClippingMediaSource} cannot clip its wrapped source. */
public static final class IllegalClippingException extends IOException {
- /** The reason clipping failed. */
+ /**
+ * The reason clipping failed. One of {@link #REASON_INVALID_PERIOD_COUNT}, {@link
+ * #REASON_NOT_SEEKABLE_TO_START} or {@link #REASON_START_EXCEEDS_END}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({REASON_INVALID_PERIOD_COUNT, REASON_NOT_SEEKABLE_TO_START, REASON_START_EXCEEDS_END})
public @interface Reason {}
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/source/MergingMediaSource.java b/library/core/src/main/java/com/google/android/exoplayer2/source/MergingMediaSource.java
index b1367cb19f..746af5719e 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/source/MergingMediaSource.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/source/MergingMediaSource.java
@@ -40,9 +40,7 @@ public final class MergingMediaSource extends CompositeMediaSource {
*/
public static final class IllegalMergeException extends IOException {
- /**
- * The reason the merge failed.
- */
+ /** The reason the merge failed. One of {@link #REASON_PERIOD_COUNT_MISMATCH}. */
@Retention(RetentionPolicy.SOURCE)
@IntDef({REASON_PERIOD_COUNT_MISMATCH})
public @interface Reason {}
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/source/ads/AdPlaybackState.java b/library/core/src/main/java/com/google/android/exoplayer2/source/ads/AdPlaybackState.java
index 53f0a418be..bbcba3aab5 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/source/ads/AdPlaybackState.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/source/ads/AdPlaybackState.java
@@ -234,7 +234,11 @@ public final class AdPlaybackState {
}
}
- /** Represents the state of an ad in an ad group. */
+ /**
+ * Represents the state of an ad in an ad group. One of {@link #AD_STATE_UNAVAILABLE}, {@link
+ * #AD_STATE_AVAILABLE}, {@link #AD_STATE_SKIPPED}, {@link #AD_STATE_PLAYED} or {@link
+ * #AD_STATE_ERROR}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({
AD_STATE_UNAVAILABLE,
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/source/ads/AdsMediaSource.java b/library/core/src/main/java/com/google/android/exoplayer2/source/ads/AdsMediaSource.java
index 0e218d5efe..7ff3b5a9b3 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/source/ads/AdsMediaSource.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/source/ads/AdsMediaSource.java
@@ -82,7 +82,10 @@ public final class AdsMediaSource extends CompositeMediaSource {
*/
public static final class AdLoadException extends IOException {
- /** Types of ad load exceptions. */
+ /**
+ * Types of ad load exceptions. One of {@link #TYPE_AD}, {@link #TYPE_AD_GROUP}, {@link
+ * #TYPE_ALL_ADS} or {@link #TYPE_UNEXPECTED}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({TYPE_AD, TYPE_AD_GROUP, TYPE_ALL_ADS, TYPE_UNEXPECTED})
public @interface Type {}
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/text/CaptionStyleCompat.java b/library/core/src/main/java/com/google/android/exoplayer2/text/CaptionStyleCompat.java
index 51f5ad0a64..87dcb97a81 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/text/CaptionStyleCompat.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/text/CaptionStyleCompat.java
@@ -31,11 +31,18 @@ import java.lang.annotation.RetentionPolicy;
public final class CaptionStyleCompat {
/**
- * The type of edge, which may be none.
+ * The type of edge, which may be none. One of {@link #EDGE_TYPE_NONE}, {@link
+ * #EDGE_TYPE_OUTLINE}, {@link #EDGE_TYPE_DROP_SHADOW}, {@link #EDGE_TYPE_RAISED} or {@link
+ * #EDGE_TYPE_DEPRESSED}.
*/
@Retention(RetentionPolicy.SOURCE)
- @IntDef({EDGE_TYPE_NONE, EDGE_TYPE_OUTLINE, EDGE_TYPE_DROP_SHADOW, EDGE_TYPE_RAISED,
- EDGE_TYPE_DEPRESSED})
+ @IntDef({
+ EDGE_TYPE_NONE,
+ EDGE_TYPE_OUTLINE,
+ EDGE_TYPE_DROP_SHADOW,
+ EDGE_TYPE_RAISED,
+ EDGE_TYPE_DEPRESSED
+ })
public @interface EdgeType {}
/**
* Edge type value specifying no character edges.
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/text/Cue.java b/library/core/src/main/java/com/google/android/exoplayer2/text/Cue.java
index 8bc0b8e136..e1305acd14 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/text/Cue.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/text/Cue.java
@@ -33,7 +33,8 @@ public class Cue {
public static final float DIMEN_UNSET = Float.MIN_VALUE;
/**
- * The type of anchor, which may be unset.
+ * The type of anchor, which may be unset. One of {@link #TYPE_UNSET}, {@link #ANCHOR_TYPE_START},
+ * {@link #ANCHOR_TYPE_MIDDLE} or {@link #ANCHOR_TYPE_END}.
*/
@Retention(RetentionPolicy.SOURCE)
@IntDef({TYPE_UNSET, ANCHOR_TYPE_START, ANCHOR_TYPE_MIDDLE, ANCHOR_TYPE_END})
@@ -62,7 +63,8 @@ public class Cue {
public static final int ANCHOR_TYPE_END = 2;
/**
- * The type of line, which may be unset.
+ * The type of line, which may be unset. One of {@link #TYPE_UNSET}, {@link #LINE_TYPE_FRACTION}
+ * or {@link #LINE_TYPE_NUMBER}.
*/
@Retention(RetentionPolicy.SOURCE)
@IntDef({TYPE_UNSET, LINE_TYPE_FRACTION, LINE_TYPE_NUMBER})
@@ -78,7 +80,11 @@ public class Cue {
*/
public static final int LINE_TYPE_NUMBER = 1;
- /** The type of default text size for this cue, which may be unset. */
+ /**
+ * The type of default text size for this cue, which may be unset. One of {@link #TYPE_UNSET},
+ * {@link #TEXT_SIZE_TYPE_FRACTIONAL}, {@link #TEXT_SIZE_TYPE_FRACTIONAL_IGNORE_PADDING} or {@link
+ * #TEXT_SIZE_TYPE_ABSOLUTE}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({
TYPE_UNSET,
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttCssStyle.java b/library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttCssStyle.java
index a78c5afa78..0e46fa0d2f 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttCssStyle.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttCssStyle.java
@@ -35,20 +35,29 @@ public final class WebvttCssStyle {
public static final int UNSPECIFIED = -1;
- /** Style flag enum */
+ /**
+ * Style flag enum. Possible flag values are {@link #UNSPECIFIED}, {@link #STYLE_NORMAL}, {@link
+ * #STYLE_BOLD}, {@link #STYLE_ITALIC} and {@link #STYLE_BOLD_ITALIC}.
+ */
@Retention(RetentionPolicy.SOURCE)
- @IntDef(flag = true, value = {UNSPECIFIED, STYLE_NORMAL, STYLE_BOLD, STYLE_ITALIC,
- STYLE_BOLD_ITALIC})
+ @IntDef(
+ flag = true,
+ value = {UNSPECIFIED, STYLE_NORMAL, STYLE_BOLD, STYLE_ITALIC, STYLE_BOLD_ITALIC})
public @interface StyleFlags {}
+
public static final int STYLE_NORMAL = Typeface.NORMAL;
public static final int STYLE_BOLD = Typeface.BOLD;
public static final int STYLE_ITALIC = Typeface.ITALIC;
public static final int STYLE_BOLD_ITALIC = Typeface.BOLD_ITALIC;
- /** Font size unit enum */
+ /**
+ * Font size unit enum. One of {@link #UNSPECIFIED}, {@link #FONT_SIZE_UNIT_PIXEL}, {@link
+ * #FONT_SIZE_UNIT_EM} or {@link #FONT_SIZE_UNIT_PERCENT}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({UNSPECIFIED, FONT_SIZE_UNIT_PIXEL, FONT_SIZE_UNIT_EM, FONT_SIZE_UNIT_PERCENT})
public @interface FontSizeUnit {}
+
public static final int FONT_SIZE_UNIT_PIXEL = 1;
public static final int FONT_SIZE_UNIT_EM = 2;
public static final int FONT_SIZE_UNIT_PERCENT = 3;
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/trackselection/MappingTrackSelector.java b/library/core/src/main/java/com/google/android/exoplayer2/trackselection/MappingTrackSelector.java
index 99e4e58c4a..a243b1a813 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/trackselection/MappingTrackSelector.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/trackselection/MappingTrackSelector.java
@@ -43,7 +43,11 @@ public abstract class MappingTrackSelector extends TrackSelector {
*/
public static final class MappedTrackInfo {
- /** Levels of renderer support. Higher numerical values indicate higher levels of support. */
+ /**
+ * Levels of renderer support. Higher numerical values indicate higher levels of support. One of
+ * {@link #RENDERER_SUPPORT_NO_TRACKS}, {@link #RENDERER_SUPPORT_UNSUPPORTED_TRACKS}, {@link
+ * #RENDERER_SUPPORT_EXCEEDS_CAPABILITIES_TRACKS} or {@link #RENDERER_SUPPORT_PLAYABLE_TRACKS}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({
RENDERER_SUPPORT_NO_TRACKS,
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/upstream/DataSpec.java b/library/core/src/main/java/com/google/android/exoplayer2/upstream/DataSpec.java
index 366b6d8c67..653673ed97 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/upstream/DataSpec.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/upstream/DataSpec.java
@@ -30,10 +30,13 @@ import java.util.Arrays;
public final class DataSpec {
/**
- * The flags that apply to any request for data.
+ * The flags that apply to any request for data. Possible flag values are {@link #FLAG_ALLOW_GZIP}
+ * and {@link #FLAG_ALLOW_CACHING_UNKNOWN_LENGTH}.
*/
@Retention(RetentionPolicy.SOURCE)
- @IntDef(flag = true, value = {FLAG_ALLOW_GZIP, FLAG_ALLOW_CACHING_UNKNOWN_LENGTH})
+ @IntDef(
+ flag = true,
+ value = {FLAG_ALLOW_GZIP, FLAG_ALLOW_CACHING_UNKNOWN_LENGTH})
public @interface Flags {}
/**
* Permits an underlying network stack to request that the server use gzip compression.
@@ -54,7 +57,11 @@ public final class DataSpec {
*/
public static final int FLAG_ALLOW_CACHING_UNKNOWN_LENGTH = 1 << 1; // 2
- /** The set of HTTP methods that are supported by ExoPlayer {@link HttpDataSource}s. */
+ /**
+ * The set of HTTP methods that are supported by ExoPlayer {@link HttpDataSource}s. One of {@link
+ * #HTTP_METHOD_GET}, {@link #HTTP_METHOD_POST} or {@link #HTTP_METHOD_HEAD}.
+ */
+ @Retention(RetentionPolicy.SOURCE)
@IntDef({HTTP_METHOD_GET, HTTP_METHOD_POST, HTTP_METHOD_HEAD})
public @interface HttpMethod {}
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSource.java b/library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSource.java
index 222d5385d3..a91e3246cc 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSource.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSource.java
@@ -56,11 +56,17 @@ public final class CacheDataSource implements DataSource {
public static final long DEFAULT_MAX_CACHE_FILE_SIZE = 2 * 1024 * 1024;
/**
- * Flags controlling the cache's behavior.
+ * Flags controlling the cache's behavior. Possible flag values are {@link #FLAG_BLOCK_ON_CACHE},
+ * {@link #FLAG_IGNORE_CACHE_ON_ERROR} and {@link #FLAG_IGNORE_CACHE_FOR_UNSET_LENGTH_REQUESTS}.
*/
@Retention(RetentionPolicy.SOURCE)
- @IntDef(flag = true, value = {FLAG_BLOCK_ON_CACHE, FLAG_IGNORE_CACHE_ON_ERROR,
- FLAG_IGNORE_CACHE_FOR_UNSET_LENGTH_REQUESTS})
+ @IntDef(
+ flag = true,
+ value = {
+ FLAG_BLOCK_ON_CACHE,
+ FLAG_IGNORE_CACHE_ON_ERROR,
+ FLAG_IGNORE_CACHE_FOR_UNSET_LENGTH_REQUESTS
+ })
public @interface Flags {}
/**
* A flag indicating whether we will block reads if the cache key is locked. If unset then data is
@@ -81,7 +87,10 @@ public final class CacheDataSource implements DataSource {
*/
public static final int FLAG_IGNORE_CACHE_FOR_UNSET_LENGTH_REQUESTS = 1 << 2; // 4
- /** Reasons the cache may be ignored. */
+ /**
+ * Reasons the cache may be ignored. One of {@link #CACHE_IGNORED_REASON_ERROR} or {@link
+ * #CACHE_IGNORED_REASON_UNSET_LENGTH}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({CACHE_IGNORED_REASON_ERROR, CACHE_IGNORED_REASON_UNSET_LENGTH})
public @interface CacheIgnoredReason {}
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/util/EGLSurfaceTexture.java b/library/core/src/main/java/com/google/android/exoplayer2/util/EGLSurfaceTexture.java
index 7e831f0512..90e37de828 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/util/EGLSurfaceTexture.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/util/EGLSurfaceTexture.java
@@ -39,7 +39,10 @@ public final class EGLSurfaceTexture implements SurfaceTexture.OnFrameAvailableL
void onFrameAvailable();
}
- /** Secure mode to be used by the EGL surface and context. */
+ /**
+ * Secure mode to be used by the EGL surface and context. One of {@link #SECURE_MODE_NONE}, {@link
+ * #SECURE_MODE_SURFACELESS_CONTEXT} or {@link #SECURE_MODE_PROTECTED_PBUFFER}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({SECURE_MODE_NONE, SECURE_MODE_SURFACELESS_CONTEXT, SECURE_MODE_PROTECTED_PBUFFER})
public @interface SecureMode {}
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/util/NotificationUtil.java b/library/core/src/main/java/com/google/android/exoplayer2/util/NotificationUtil.java
index c93d7cd72e..e70f576754 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/util/NotificationUtil.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/util/NotificationUtil.java
@@ -31,7 +31,11 @@ import java.lang.annotation.RetentionPolicy;
@SuppressLint("InlinedApi")
public final class NotificationUtil {
- /** Notification channel importance levels. */
+ /**
+ * Notification channel importance levels. One of {@link #IMPORTANCE_UNSPECIFIED}, {@link
+ * #IMPORTANCE_NONE}, {@link #IMPORTANCE_MIN}, {@link #IMPORTANCE_LOW}, {@link
+ * #IMPORTANCE_DEFAULT} or {@link #IMPORTANCE_HIGH}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({
IMPORTANCE_UNSPECIFIED,
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/util/RepeatModeUtil.java b/library/core/src/main/java/com/google/android/exoplayer2/util/RepeatModeUtil.java
index d386206bdd..de92e1ad93 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/util/RepeatModeUtil.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/util/RepeatModeUtil.java
@@ -26,11 +26,14 @@ import java.lang.annotation.RetentionPolicy;
public final class RepeatModeUtil {
/**
- * Set of repeat toggle modes. Can be combined using bit-wise operations.
+ * Set of repeat toggle modes. Can be combined using bit-wise operations. Possible flag values are
+ * {@link #REPEAT_TOGGLE_MODE_NONE}, {@link #REPEAT_TOGGLE_MODE_ONE} and {@link
+ * #REPEAT_TOGGLE_MODE_ALL}.
*/
@Retention(RetentionPolicy.SOURCE)
- @IntDef(flag = true, value = {REPEAT_TOGGLE_MODE_NONE, REPEAT_TOGGLE_MODE_ONE,
- REPEAT_TOGGLE_MODE_ALL})
+ @IntDef(
+ flag = true,
+ value = {REPEAT_TOGGLE_MODE_NONE, REPEAT_TOGGLE_MODE_ONE, REPEAT_TOGGLE_MODE_ALL})
public @interface RepeatToggleModes {}
/**
* All repeat mode buttons disabled.
diff --git a/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsMediaPlaylist.java b/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsMediaPlaylist.java
index 841c13f953..a29808933b 100644
--- a/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsMediaPlaylist.java
+++ b/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsMediaPlaylist.java
@@ -154,11 +154,13 @@ public final class HlsMediaPlaylist extends HlsPlaylist {
}
/**
- * Type of the playlist, as defined by #EXT-X-PLAYLIST-TYPE.
+ * Type of the playlist, as defined by #EXT-X-PLAYLIST-TYPE. One of {@link
+ * #PLAYLIST_TYPE_UNKNOWN}, {@link #PLAYLIST_TYPE_VOD} or {@link #PLAYLIST_TYPE_EVENT}.
*/
@Retention(RetentionPolicy.SOURCE)
@IntDef({PLAYLIST_TYPE_UNKNOWN, PLAYLIST_TYPE_VOD, PLAYLIST_TYPE_EVENT})
public @interface PlaylistType {}
+
public static final int PLAYLIST_TYPE_UNKNOWN = 0;
public static final int PLAYLIST_TYPE_VOD = 1;
public static final int PLAYLIST_TYPE_EVENT = 2;
diff --git a/library/ui/src/main/java/com/google/android/exoplayer2/ui/AspectRatioFrameLayout.java b/library/ui/src/main/java/com/google/android/exoplayer2/ui/AspectRatioFrameLayout.java
index 227eb52e79..0158a55f66 100644
--- a/library/ui/src/main/java/com/google/android/exoplayer2/ui/AspectRatioFrameLayout.java
+++ b/library/ui/src/main/java/com/google/android/exoplayer2/ui/AspectRatioFrameLayout.java
@@ -45,7 +45,11 @@ public final class AspectRatioFrameLayout extends FrameLayout {
}
// LINT.IfChange
- /** Resize modes for {@link AspectRatioFrameLayout}. */
+ /**
+ * Resize modes for {@link AspectRatioFrameLayout}. One of {@link #RESIZE_MODE_FIT}, {@link
+ * #RESIZE_MODE_FIXED_WIDTH}, {@link #RESIZE_MODE_FIXED_HEIGHT}, {@link #RESIZE_MODE_FILL} or
+ * {@link #RESIZE_MODE_ZOOM}.
+ */
@Retention(RetentionPolicy.SOURCE)
@IntDef({
RESIZE_MODE_FIT,
diff --git a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java
index 09bcac8861..805ae0fa67 100644
--- a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java
+++ b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java
@@ -15,8 +15,6 @@
*/
package com.google.android.exoplayer2.ui;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
import android.app.Notification;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
@@ -45,6 +43,7 @@ import com.google.android.exoplayer2.util.Assertions;
import com.google.android.exoplayer2.util.NotificationUtil;
import com.google.android.exoplayer2.util.Util;
import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@@ -229,8 +228,12 @@ public class PlayerNotificationManager {
/** The action which cancels the notification and stops playback. */
public static final String ACTION_STOP = "com.google.android.exoplayer.stop";
- /** Visibility of notification on the lock screen. */
- @Retention(SOURCE)
+ /**
+ * Visibility of notification on the lock screen. One of {@link
+ * NotificationCompat#VISIBILITY_PRIVATE}, {@link NotificationCompat#VISIBILITY_PUBLIC} or {@link
+ * NotificationCompat#VISIBILITY_SECRET}.
+ */
+ @Retention(RetentionPolicy.SOURCE)
@IntDef({
NotificationCompat.VISIBILITY_PRIVATE,
NotificationCompat.VISIBILITY_PUBLIC,
@@ -238,8 +241,13 @@ public class PlayerNotificationManager {
})
public @interface Visibility {}
- /** Priority of the notification (required for API 25 and lower). */
- @Retention(SOURCE)
+ /**
+ * Priority of the notification (required for API 25 and lower). One of {@link
+ * NotificationCompat#PRIORITY_DEFAULT}, {@link NotificationCompat#PRIORITY_MAX}, {@link
+ * NotificationCompat#PRIORITY_HIGH}, {@link NotificationCompat#PRIORITY_LOW }or {@link
+ * NotificationCompat#PRIORITY_MIN}.
+ */
+ @Retention(RetentionPolicy.SOURCE)
@IntDef({
NotificationCompat.PRIORITY_DEFAULT,
NotificationCompat.PRIORITY_MAX,
diff --git a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java
index 472fa61613..011976ad12 100644
--- a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java
+++ b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java
@@ -243,9 +243,12 @@ public class PlayerView extends FrameLayout {
private static final int SURFACE_TYPE_TEXTURE_VIEW = 2;
private static final int SURFACE_TYPE_MONO360_VIEW = 3;
- /** Determines when the buffering view is shown. */
- @IntDef({SHOW_BUFFERING_NEVER, SHOW_BUFFERING_WHEN_PLAYING, SHOW_BUFFERING_ALWAYS})
+ /**
+ * Determines when the buffering view is shown. One of {@link #SHOW_BUFFERING_NEVER}, {@link
+ * #SHOW_BUFFERING_WHEN_PLAYING} or {@link #SHOW_BUFFERING_ALWAYS}.
+ */
@Retention(RetentionPolicy.SOURCE)
+ @IntDef({SHOW_BUFFERING_NEVER, SHOW_BUFFERING_WHEN_PLAYING, SHOW_BUFFERING_ALWAYS})
public @interface ShowBuffering {}
/** The buffering view is never shown. */
public static final int SHOW_BUFFERING_NEVER = 0;