Add back api= as an attribute to @RequiresApi
I changed the api= attribute to value= to make the
annotation more convenient to use, but apparently that
CL didn't make it into the beta1 build, so now that
code may be referencing api=, we'll need to include it
as well.
Change-Id: I5b267193923e28d4d45631c0715b460083fca828
diff --git a/annotations/src/android/support/annotation/RequiresApi.java b/annotations/src/android/support/annotation/RequiresApi.java
index 39f0b51..ddd3158 100644
--- a/annotations/src/android/support/annotation/RequiresApi.java
+++ b/annotations/src/android/support/annotation/RequiresApi.java
@@ -36,6 +36,14 @@
@Retention(CLASS)
@Target({TYPE,METHOD,CONSTRUCTOR,FIELD})
public @interface RequiresApi {
+ /**
+ * The API level to require. Alias for {@link #api} which allows you to leave out the
+ * {@code api=} part.
+ */
@IntRange(from=1)
- int value();
+ int value() default 1;
+
+ /** The API level to require */
+ @IntRange(from=1)
+ int api() default 1;
}