diff --git a/core/java/android/annotation/UnsupportedAppUsage.java b/core/java/android/annotation/UnsupportedAppUsage.java index 05de3e8caa3fb..fbba6dafde290 100644 --- a/core/java/android/annotation/UnsupportedAppUsage.java +++ b/core/java/android/annotation/UnsupportedAppUsage.java @@ -50,6 +50,39 @@ public @interface UnsupportedAppUsage { */ long trackingBug() default 0; + /** + * Indicates that usage of this API is limited to apps based on their target SDK version. + * + * Access to the API is allowed if the targetSdkVersion in the apps manifest is no greater than + * this value. Access checks are performed at runtime. + * + * This is used to give app developers a grace period to migrate off a non-SDK interface. When + * making Android version N, existing APIs can have a maxTargetSdk of N-1 added to them. + * Developers must then migrate off the API when their app is updated in future, but it will + * continue working in the meantime. + * + * Possible values are: + *