Skip to content

Commit d7bd15f

Browse files
tonykwokTony Guo
authored andcommitted
Add missing @retention(SOURCE) to UnsupportedDrmException.Reason
This can fix the following warning caused by commit a7aa84a: Warning: com.google.android.exoplayer2.drm.UnsupportedDrmException.Reason: The typedef annotation should have @retention(RetentionPolicy.SOURCE) Author: Tony Guo <tony.guo.peng@gmail.com> Date: Mon Feb 28 10:56:52 2022 +0800
1 parent 7781247 commit d7bd15f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

library/core/src/main/java/com/google/android/exoplayer2/drm/UnsupportedDrmException.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323

2424
import androidx.annotation.IntDef;
2525
import java.lang.annotation.Documented;
26+
import java.lang.annotation.Retention;
27+
import java.lang.annotation.RetentionPolicy;
2628
import java.lang.annotation.Target;
2729

2830
/** Thrown when the requested DRM scheme is not supported. */
@@ -33,8 +35,9 @@ public final class UnsupportedDrmException extends Exception {
3335
* #REASON_INSTANTIATION_ERROR}.
3436
*/
3537
// @Target list includes both 'default' targets and TYPE_USE, to ensure backwards compatibility
36-
// with Kotlin usages from before TYPE_USE was added. @Retention(RetentionPolicy.SOURCE)
38+
// with Kotlin usages from before TYPE_USE was added.
3739
@Documented
40+
@Retention(RetentionPolicy.SOURCE)
3841
@Target({FIELD, METHOD, PARAMETER, LOCAL_VARIABLE, TYPE_USE})
3942
@IntDef({REASON_UNSUPPORTED_SCHEME, REASON_INSTANTIATION_ERROR})
4043
public @interface Reason {}

0 commit comments

Comments
 (0)