diff --git a/libraries/common/src/main/java/androidx/media3/common/util/UnstableApi.java b/libraries/common/src/main/java/androidx/media3/common/util/UnstableApi.java index f5793a071b..29d11cb3ff 100644 --- a/libraries/common/src/main/java/androidx/media3/common/util/UnstableApi.java +++ b/libraries/common/src/main/java/androidx/media3/common/util/UnstableApi.java @@ -55,50 +55,10 @@ import java.lang.annotation.Target; *

By default usages of APIs annotated with this annotation generate lint errors in Gradle and * Android Studio, in order to alert developers to the risk of breaking changes. * - *

Individual usage sites or whole packages can be opted-in to suppress the lint error by using - * the {@link androidx.annotation.OptIn} annotation. - * - *

In a Java class: - * - *

{@code
- * import androidx.annotation.OptIn;
- * import androidx.media3.common.util.UnstableApi;
- * ...
- * @OptIn(markerClass = UnstableApi.class)
- * private void methodUsingUnstableApis() { ... }
- * }
- * - *

In a {@code package-info.java} file, to opt-in a whole package: - * - *

{@code
- * @OptIn(markerClass = UnstableApi.class)
- * package name.of.your.package;
- *
- * import androidx.annotation.OptIn;
- * import androidx.media3.common.util.UnstableApi;
- * }
- * - *

In Kotlin: - * - *

{@code
- * import androidx.annotation.OptIn
- * import androidx.media3.common.util.UnstableApi
- * ...
- * @OptIn(UnstableApi::class)
- * private fun methodUsingUnstableApis() { ... }
- * }
- * - *

Whole projects can be opted-in by suppressing the specific lint error in their {@code lint.xml} file: - * - *

{@code
- * 
- * 
- *   
- *     
- * 
- * }
+ *

See the + * troubleshooting section on these lint errors for details on how to annotate Java and Kotlin + * usages with {@code @OptIn}. */ @Documented @Retention(CLASS)