Reformat @IntDef field/return type annotations.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148018580
This commit is contained in:
andrewlewis 2017-02-20 06:33:23 -08:00 committed by Oliver Woodman
parent 11c16d83fd
commit 17762ebaa2
17 changed files with 29 additions and 58 deletions

View file

@ -56,8 +56,7 @@ public final class ExoPlaybackException extends Exception {
* The type of the playback failure. One of {@link #TYPE_SOURCE}, {@link #TYPE_RENDERER} and
* {@link #TYPE_UNEXPECTED}.
*/
@Type
public final int type;
@Type public final int type;
/**
* If {@link #type} is {@link #TYPE_RENDERER}, this is the index of the renderer.

View file

@ -83,8 +83,7 @@ public abstract class SimpleDecoderAudioRenderer extends BaseRenderer implements
private DrmSession<ExoMediaCrypto> drmSession;
private DrmSession<ExoMediaCrypto> pendingDrmSession;
@ReinitializationState
private int decoderReinitializationState;
@ReinitializationState private int decoderReinitializationState;
private boolean decoderReceivedBuffers;
private boolean audioTrackNeedsConfigure;

View file

@ -61,8 +61,7 @@ public class DecoderInputBuffer extends Buffer {
*/
public long timeUs;
@BufferReplacementMode
private final int bufferReplacementMode;
@BufferReplacementMode private final int bufferReplacementMode;
/**
* @param bufferReplacementMode Determines the behavior of {@link #ensureSpaceForWrite(int)}. One

View file

@ -70,8 +70,7 @@ public interface DrmSession<T extends ExoMediaCrypto> {
* @return One of {@link #STATE_ERROR}, {@link #STATE_CLOSED}, {@link #STATE_OPENING},
* {@link #STATE_OPENED} and {@link #STATE_OPENED_WITH_KEYS}.
*/
@State
int getState();
@State int getState();
/**
* Returns a {@link ExoMediaCrypto} for the open session.

View file

@ -43,8 +43,7 @@ public final class UnsupportedDrmException extends Exception {
/**
* Either {@link #REASON_UNSUPPORTED_SCHEME} or {@link #REASON_INSTANTIATION_ERROR}.
*/
@Reason
public final int reason;
@Reason public final int reason;
/**
* @param reason {@link #REASON_UNSUPPORTED_SCHEME} or {@link #REASON_INSTANTIATION_ERROR}.

View file

@ -117,8 +117,7 @@ public final class FragmentedMp4Extractor implements Extractor {
private static final int STATE_READING_SAMPLE_CONTINUE = 4;
// Workarounds.
@Flags
private final int flags;
@Flags private final int flags;
private final Track sideloadedTrack;
// Track-linked data bundle, accessible as a whole through trackID.

View file

@ -83,8 +83,7 @@ public final class Mp4Extractor implements Extractor, SeekMap {
private final ParsableByteArray atomHeader;
private final Stack<ContainerAtom> containerAtoms;
@State
private int parserState;
@State private int parserState;
private int atomType;
private long atomSize;
private int atomHeaderBytesRead;

View file

@ -75,8 +75,7 @@ public final class Track {
* One of {@code TRANSFORMATION_*}. Defines the transformation to apply before outputting each
* sample.
*/
@Transformation
public final int sampleTransformation;
@Transformation public final int sampleTransformation;
/**
* Track encryption boxes for the different track sample descriptions. Entries may be null.

View file

@ -40,8 +40,7 @@ public final class DefaultTsPayloadReaderFactory implements TsPayloadReader.Fact
public static final int FLAG_DETECT_ACCESS_UNITS = 8;
public static final int FLAG_IGNORE_SPLICE_INFO_STREAM = 16;
@Flags
private final int flags;
@Flags private final int flags;
public DefaultTsPayloadReaderFactory() {
this(0);

View file

@ -57,8 +57,7 @@ public final class MergingMediaSource implements MediaSource {
* The reason the merge failed. One of {@link #REASON_WINDOWS_ARE_DYNAMIC} and
* {@link #REASON_PERIOD_COUNT_MISMATCH}.
*/
@Reason
public final int reason;
@Reason public final int reason;
/**
* @param reason The reason the merge failed. One of {@link #REASON_WINDOWS_ARE_DYNAMIC} and

View file

@ -78,8 +78,7 @@ public final class HlsMediaPlaylist extends HlsPlaylist {
public static final int PLAYLIST_TYPE_VOD = 1;
public static final int PLAYLIST_TYPE_EVENT = 2;
@PlaylistType
public final int playlistType;
@PlaylistType public final int playlistType;
public final long startOffsetUs;
public final long startTimeUs;
public final boolean hasDiscontinuitySequence;

View file

@ -34,8 +34,7 @@ public abstract class HlsPlaylist {
public static final int TYPE_MEDIA = 1;
public final String baseUri;
@Type
public final int type;
@Type public final int type;
protected HlsPlaylist(String baseUri, @Type int type) {
this.baseUri = baseUri;

View file

@ -94,8 +94,7 @@ public final class CaptionStyleCompat {
* <li>{@link #EDGE_TYPE_DEPRESSED}
* </ul>
*/
@EdgeType
public final int edgeType;
@EdgeType public final int edgeType;
/**
* The preferred edge color, if using an edge type other than {@link #EDGE_TYPE_NONE}.

View file

@ -56,16 +56,11 @@ import java.lang.annotation.RetentionPolicy;
private boolean hasFontColor;
private int backgroundColor;
private boolean hasBackgroundColor;
@OptionalBoolean
private int linethrough;
@OptionalBoolean
private int underline;
@OptionalBoolean
private int bold;
@OptionalBoolean
private int italic;
@FontSizeUnit
private int fontSizeUnit;
@OptionalBoolean private int linethrough;
@OptionalBoolean private int underline;
@OptionalBoolean private int bold;
@OptionalBoolean private int italic;
@FontSizeUnit private int fontSizeUnit;
private float fontSize;
private String id;
private TtmlStyle inheritableStyle;
@ -85,8 +80,7 @@ import java.lang.annotation.RetentionPolicy;
* @return {@link #UNSPECIFIED}, {@link #STYLE_NORMAL}, {@link #STYLE_BOLD}, {@link #STYLE_BOLD}
* or {@link #STYLE_BOLD_ITALIC}.
*/
@StyleFlags
public int getStyle() {
@StyleFlags public int getStyle() {
if (bold == UNSPECIFIED && italic == UNSPECIFIED) {
return UNSPECIFIED;
}
@ -255,8 +249,7 @@ import java.lang.annotation.RetentionPolicy;
return this;
}
@FontSizeUnit
public int getFontSizeUnit() {
@FontSizeUnit public int getFontSizeUnit() {
return fontSizeUnit;
}

View file

@ -69,16 +69,11 @@ import java.util.List;
private boolean hasFontColor;
private int backgroundColor;
private boolean hasBackgroundColor;
@OptionalBoolean
private int linethrough;
@OptionalBoolean
private int underline;
@OptionalBoolean
private int bold;
@OptionalBoolean
private int italic;
@FontSizeUnit
private int fontSizeUnit;
@OptionalBoolean private int linethrough;
@OptionalBoolean private int underline;
@OptionalBoolean private int bold;
@OptionalBoolean private int italic;
@FontSizeUnit private int fontSizeUnit;
private float fontSize;
private Layout.Alignment textAlign;
@ -162,8 +157,7 @@ import java.util.List;
* @return {@link #UNSPECIFIED}, {@link #STYLE_NORMAL}, {@link #STYLE_BOLD}, {@link #STYLE_BOLD}
* or {@link #STYLE_BOLD_ITALIC}.
*/
@StyleFlags
public int getStyle() {
@StyleFlags public int getStyle() {
if (bold == UNSPECIFIED && italic == UNSPECIFIED) {
return UNSPECIFIED;
}
@ -260,8 +254,7 @@ import java.util.List;
return this;
}
@FontSizeUnit
public int getFontSizeUnit() {
@FontSizeUnit public int getFontSizeUnit() {
return fontSizeUnit;
}

View file

@ -82,8 +82,7 @@ public final class DataSpec {
* Request flags. Currently {@link #FLAG_ALLOW_GZIP} and
* {@link #FLAG_ALLOW_CACHING_UNKNOWN_LENGTH} are the only supported flags.
*/
@Flags
public final int flags;
@Flags public final int flags;
/**
* Construct a {@link DataSpec} for the given uri and with {@link #key} set to null.

View file

@ -149,8 +149,7 @@ public interface HttpDataSource extends DataSource {
public static final int TYPE_READ = 2;
public static final int TYPE_CLOSE = 3;
@Type
public final int type;
@Type public final int type;
/**
* The {@link DataSpec} associated with the current connection.