From 0eed19d8a313d6010c7b8db3baf2b4d15c5ffe29 Mon Sep 17 00:00:00 2001 From: gyumin Date: Mon, 22 Feb 2021 13:41:39 +0000 Subject: [PATCH] Add @Documented to FieldNumber @IntDef PiperOrigin-RevId: 358799813 --- .../main/java/com/google/android/exoplayer2/MediaItem.java | 4 ++++ .../java/com/google/android/exoplayer2/MediaMetadata.java | 6 +++--- .../google/android/exoplayer2/audio/AudioAttributes.java | 2 ++ .../com/google/android/exoplayer2/device/DeviceInfo.java | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/library/common/src/main/java/com/google/android/exoplayer2/MediaItem.java b/library/common/src/main/java/com/google/android/exoplayer2/MediaItem.java index b51d8f7446..ebc41366b2 100644 --- a/library/common/src/main/java/com/google/android/exoplayer2/MediaItem.java +++ b/library/common/src/main/java/com/google/android/exoplayer2/MediaItem.java @@ -25,6 +25,7 @@ import androidx.annotation.Nullable; import com.google.android.exoplayer2.offline.StreamKey; import com.google.android.exoplayer2.util.Assertions; import com.google.android.exoplayer2.util.Util; +import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.ArrayList; @@ -937,6 +938,7 @@ public final class MediaItem implements Bundleable { // Bundleable implementation. + @Documented @Retention(RetentionPolicy.SOURCE) @IntDef({ FIELD_TARGET_OFFSET_MS, @@ -1148,6 +1150,7 @@ public final class MediaItem implements Bundleable { // Bundleable implementation. + @Documented @Retention(RetentionPolicy.SOURCE) @IntDef({ FIELD_START_POSITION_MS, @@ -1254,6 +1257,7 @@ public final class MediaItem implements Bundleable { // Bundleable implementation. + @Documented @Retention(RetentionPolicy.SOURCE) @IntDef({ FIELD_MEDIA_ID, diff --git a/library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java b/library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java index 0094258564..aeb0c87976 100644 --- a/library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java +++ b/library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java @@ -19,6 +19,7 @@ import android.os.Bundle; import androidx.annotation.IntDef; import androidx.annotation.Nullable; import com.google.android.exoplayer2.util.Util; +import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -69,10 +70,9 @@ public final class MediaMetadata implements Bundleable { // Bundleable implementation. + @Documented @Retention(RetentionPolicy.SOURCE) - @IntDef({ - FIELD_TITLE, - }) + @IntDef({FIELD_TITLE}) private @interface FieldNumber {} private static final int FIELD_TITLE = 0; diff --git a/library/common/src/main/java/com/google/android/exoplayer2/audio/AudioAttributes.java b/library/common/src/main/java/com/google/android/exoplayer2/audio/AudioAttributes.java index c190b42a7d..c2da130ba9 100644 --- a/library/common/src/main/java/com/google/android/exoplayer2/audio/AudioAttributes.java +++ b/library/common/src/main/java/com/google/android/exoplayer2/audio/AudioAttributes.java @@ -22,6 +22,7 @@ import androidx.annotation.RequiresApi; import com.google.android.exoplayer2.Bundleable; import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.util.Util; +import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -166,6 +167,7 @@ public final class AudioAttributes implements Bundleable { // Bundleable implementation. + @Documented @Retention(RetentionPolicy.SOURCE) @IntDef({FIELD_CONTENT_TYPE, FIELD_FLAGS, FIELD_USAGE, FIELD_ALLOWED_CAPTURE_POLICY}) private @interface FieldNumber {} diff --git a/library/common/src/main/java/com/google/android/exoplayer2/device/DeviceInfo.java b/library/common/src/main/java/com/google/android/exoplayer2/device/DeviceInfo.java index bb0386314f..20210c5635 100644 --- a/library/common/src/main/java/com/google/android/exoplayer2/device/DeviceInfo.java +++ b/library/common/src/main/java/com/google/android/exoplayer2/device/DeviceInfo.java @@ -85,6 +85,7 @@ public final class DeviceInfo implements Bundleable { // Bundleable implementation. + @Documented @Retention(RetentionPolicy.SOURCE) @IntDef({FIELD_PLAYBACK_TYPE, FIELD_MIN_VOLUME, FIELD_MAX_VOLUME}) private @interface FieldNumber {}