Commit 4bf5e499 by tonihei Committed by Oliver Woodman

Improve IntDef javadoc.

The doc can be improved by enumerating and linking all possible values from
the interface doc.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209772309
parent 14c7c299
Showing with 252 additions and 92 deletions
......@@ -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})
......
......@@ -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,
......
......@@ -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.
......
......@@ -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})
......
......@@ -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.
*/
......
......@@ -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.
*/
......
......@@ -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 {}
......
......@@ -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) {
......
......@@ -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.
......
......@@ -67,7 +67,10 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto> 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 {}
......
......@@ -39,10 +39,13 @@ public interface DrmSession<T extends ExoMediaCrypto> {
}
/** 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.
*/
......
......@@ -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})
......
......@@ -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
......
......@@ -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,
......
......@@ -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 {}
......
......@@ -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.
......
......@@ -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
......
......@@ -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.
......
......@@ -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.
......
......@@ -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})
......
......@@ -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,
......
......@@ -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;
......
......@@ -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})
......
......@@ -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}.
*
* <p>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}.
*
* <p>Transition map (vertical states are source states):
*
......
......@@ -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,
......
......@@ -37,7 +37,10 @@ public final class ClippingMediaSource extends CompositeMediaSource<Void> {
/** 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 {}
......
......@@ -40,9 +40,7 @@ public final class MergingMediaSource extends CompositeMediaSource<Integer> {
*/
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 {}
......
......@@ -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,
......
......@@ -82,7 +82,10 @@ public final class AdsMediaSource extends CompositeMediaSource<MediaPeriodId> {
*/
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 {}
......
......@@ -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.
......
......@@ -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,
......
......@@ -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;
......
......@@ -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,
......
......@@ -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 {}
......
......@@ -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 {}
......
......@@ -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 {}
......
......@@ -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,
......
......@@ -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.
......
......@@ -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;
......
......@@ -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,
......
......@@ -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,
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment