diff --git a/core/java/android/annotation/UnsupportedAppUsage.java b/core/java/android/annotation/UnsupportedAppUsage.java index ac3daaf638ad8..a454df5d68f4f 100644 --- a/core/java/android/annotation/UnsupportedAppUsage.java +++ b/core/java/android/annotation/UnsupportedAppUsage.java @@ -124,6 +124,32 @@ public @interface UnsupportedAppUsage { */ String implicitMember() default ""; + /** + * Public API alternatives to this API. + * + *

If non-empty, the string must be a description of the public API alternative(s) to this + * API. The explanation must contain at least one Javadoc link tag to public API methods or + * fields. e.g.: + * {@literal @UnsupportedAppUsage(publicAlternatives="Use {@link foo.bar.Baz#bat()} instead.")} + * + *

Any elements that can be deduced can be omitted, e.g.: + *

+ * @return A Javadoc-formatted string. + */ + @SuppressWarnings("JavadocReference") + String publicAlternatives() default ""; + /** * Container for {@link UnsupportedAppUsage} that allows it to be applied repeatedly to types. */