Remove support for android.support.annotation.
We have migrated these to androidx.annotation 3+ years ago,
it is time to remove the code for it in metalava.
Test: ./gradlew test
Change-Id: I418020371158357b01ccd05edeac2c4ac7e606e5
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 8c572d5..00a3df3 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -10,16 +10,15 @@
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
<item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
- <item index="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
- <item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
- <item index="6" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.Nullable" />
- <item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableDecl" />
- <item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableType" />
- <item index="9" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
- <item index="10" class="java.lang.String" itemvalue="com.android.annotations.Nullable" />
- <item index="11" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.Nullable" />
- <item index="12" class="java.lang.String" itemvalue="io.reactivex.annotations.Nullable" />
- <item index="13" class="java.lang.String" itemvalue="io.reactivex.rxjava3.annotations.Nullable" />
+ <item index="4" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
+ <item index="5" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.Nullable" />
+ <item index="6" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableDecl" />
+ <item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableType" />
+ <item index="8" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
+ <item index="9" class="java.lang.String" itemvalue="com.android.annotations.Nullable" />
+ <item index="10" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.Nullable" />
+ <item index="11" class="java.lang.String" itemvalue="io.reactivex.annotations.Nullable" />
+ <item index="12" class="java.lang.String" itemvalue="io.reactivex.rxjava3.annotations.Nullable" />
</list>
</value>
</option>
@@ -30,16 +29,15 @@
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="javax.validation.constraints.NotNull" />
<item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
- <item index="4" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
- <item index="5" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
- <item index="6" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.NonNull" />
- <item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullDecl" />
- <item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullType" />
- <item index="9" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
- <item index="10" class="java.lang.String" itemvalue="com.android.annotations.NonNull" />
- <item index="11" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.NonNull" />
- <item index="12" class="java.lang.String" itemvalue="io.reactivex.annotations.NonNull" />
- <item index="13" class="java.lang.String" itemvalue="io.reactivex.rxjava3.annotations.NonNull" />
+ <item index="4" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
+ <item index="5" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.NonNull" />
+ <item index="6" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullDecl" />
+ <item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullType" />
+ <item index="8" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
+ <item index="9" class="java.lang.String" itemvalue="com.android.annotations.NonNull" />
+ <item index="10" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.NonNull" />
+ <item index="11" class="java.lang.String" itemvalue="io.reactivex.annotations.NonNull" />
+ <item index="12" class="java.lang.String" itemvalue="io.reactivex.rxjava3.annotations.NonNull" />
</list>
</value>
</option>
diff --git a/FORMAT.md b/FORMAT.md
index 4e7e515..41626c2 100644
--- a/FORMAT.md
+++ b/FORMAT.md
@@ -449,7 +449,6 @@
```
method public void setTitleTextColor(@android.annotation.ColorInt int);
- method public void setTitleTextColor(@android.support.annotation.ColorInt int);
method public void setTitleTextColor(@androidx.annotation.ColorInt int);
```
diff --git a/manual/android/accounts/annotations.xml b/manual/android/accounts/annotations.xml
index f47e761..f223d60 100644
--- a/manual/android/accounts/annotations.xml
+++ b/manual/android/accounts/annotations.xml
@@ -1,157 +1,157 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<item name="android.accounts.AccountManager android.accounts.AccountManagerFuture<android.accounts.Account> renameAccount(android.accounts.Account, java.lang.String, android.accounts.AccountManagerCallback<android.accounts.Account>, android.os.Handler)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.AUTHENTICATE_ACCOUNTS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager android.accounts.AccountManagerFuture<android.os.Bundle> addAccount(java.lang.String, java.lang.String, java.lang.String[], android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.MANAGE_ACCOUNTS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager android.accounts.AccountManagerFuture<android.os.Bundle> confirmCredentials(android.accounts.Account, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.MANAGE_ACCOUNTS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager android.accounts.AccountManagerFuture<android.os.Bundle> editProperties(java.lang.String, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.MANAGE_ACCOUNTS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.USE_CREDENTIALS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, android.os.Bundle, boolean, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.USE_CREDENTIALS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, boolean, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.USE_CREDENTIALS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager android.accounts.AccountManagerFuture<android.os.Bundle> getAuthTokenByFeatures(java.lang.String, java.lang.String, java.lang.String[], android.app.Activity, android.os.Bundle, android.os.Bundle, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.MANAGE_ACCOUNTS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager android.accounts.AccountManagerFuture<android.os.Bundle> removeAccount(android.accounts.Account, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.MANAGE_ACCOUNTS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager android.accounts.AccountManagerFuture<android.os.Bundle> updateCredentials(android.accounts.Account, java.lang.String, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.MANAGE_ACCOUNTS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager android.accounts.AccountManagerFuture<java.lang.Boolean> removeAccount(android.accounts.Account, android.accounts.AccountManagerCallback<java.lang.Boolean>, android.os.Handler)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.MANAGE_ACCOUNTS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager boolean addAccountExplicitly(android.accounts.Account, java.lang.String, android.os.Bundle)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.AUTHENTICATE_ACCOUNTS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager boolean notifyAccountAuthenticated(android.accounts.Account)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.AUTHENTICATE_ACCOUNTS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager boolean removeAccountExplicitly(android.accounts.Account)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.AUTHENTICATE_ACCOUNTS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager java.lang.String blockingGetAuthToken(android.accounts.Account, java.lang.String, boolean)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.USE_CREDENTIALS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager java.lang.String getPassword(android.accounts.Account)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.AUTHENTICATE_ACCOUNTS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager java.lang.String getUserData(android.accounts.Account, java.lang.String)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.AUTHENTICATE_ACCOUNTS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager java.lang.String peekAuthToken(android.accounts.Account, java.lang.String)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.AUTHENTICATE_ACCOUNTS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager void addOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener, android.os.Handler, boolean)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.GET_ACCOUNTS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager void clearPassword(android.accounts.Account)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.MANAGE_ACCOUNTS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager void invalidateAuthToken(java.lang.String, java.lang.String)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="anyOf" val="{"android.permission.MANAGE_ACCOUNTS", "android.permission.USE_CREDENTIALS"}" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager void setAuthToken(android.accounts.Account, java.lang.String, java.lang.String)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.AUTHENTICATE_ACCOUNTS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager void setPassword(android.accounts.Account, java.lang.String)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.AUTHENTICATE_ACCOUNTS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager void setUserData(android.accounts.Account, java.lang.String, java.lang.String)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.AUTHENTICATE_ACCOUNTS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager android.accounts.Account[] getAccounts()">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.GET_ACCOUNTS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.accounts.AccountManager android.accounts.Account[] getAccountsByType(java.lang.String)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""android.permission.GET_ACCOUNTS"" />
<val name="apis" val=""..22"" />
</annotation>
diff --git a/manual/android/location/annotations.xml b/manual/android/location/annotations.xml
index 9aa7540..fcb41f7 100644
--- a/manual/android/location/annotations.xml
+++ b/manual/android/location/annotations.xml
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<item name="android.location.LocationManager void removeProximityAlert(android.app.PendingIntent)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="anyOf" val="{"android.permission.ACCESS_COARSE_LOCATION", "android.permission.ACCESS_FINE_LOCATION"}" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.location.LocationManager void removeUpdates(android.location.LocationListener)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="anyOf" val="{"android.permission.ACCESS_COARSE_LOCATION", "android.permission.ACCESS_FINE_LOCATION"}" />
<val name="apis" val=""..22"" />
</annotation>
diff --git a/manual/android/provider/annotations.xml b/manual/android/provider/annotations.xml
index ab67042..9a1dc0a 100644
--- a/manual/android/provider/annotations.xml
+++ b/manual/android/provider/annotations.xml
@@ -1,87 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<root>
<item name="android.provider.Browser BOOKMARKS_URI">
- <annotation name="android.support.annotation.RequiresPermission.Read">
+ <annotation name="androidx.annotation.RequiresPermission.Read">
<val name="value" val=""com.android.browser.permission.READ_HISTORY_BOOKMARKS"" />
<val name="apis" val=""..22"" />
</annotation>
- <annotation name="android.support.annotation.RequiresPermission.Write">
+ <annotation name="androidx.annotation.RequiresPermission.Write">
<val name="value" val=""com.android.browser.permission.WRITE_HISTORY_BOOKMARKS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.provider.Browser SEARCHES_URI">
- <annotation name="android.support.annotation.RequiresPermission.Read">
+ <annotation name="androidx.annotation.RequiresPermission.Read">
<val name="value" val=""com.android.browser.permission.READ_HISTORY_BOOKMARKS"" />
<val name="apis" val=""..22"" />
</annotation>
- <annotation name="android.support.annotation.RequiresPermission.Write">
+ <annotation name="androidx.annotation.RequiresPermission.Write">
<val name="value" val=""com.android.browser.permission.WRITE_HISTORY_BOOKMARKS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.provider.Browser android.database.Cursor getAllBookmarks(android.content.ContentResolver)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""com.android.browser.permission.READ_HISTORY_BOOKMARKS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.provider.Browser android.database.Cursor getAllVisitedUrls(android.content.ContentResolver)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""com.android.browser.permission.READ_HISTORY_BOOKMARKS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.provider.Browser boolean canClearHistory(android.content.ContentResolver)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""com.android.browser.permission.READ_HISTORY_BOOKMARKS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.provider.Browser void addSearchUrl(android.content.ContentResolver, java.lang.String)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="allOf" val="{"com.android.browser.permission.READ_HISTORY_BOOKMARKS", "com.android.browser.permission.WRITE_HISTORY_BOOKMARKS"}" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.provider.Browser void clearHistory(android.content.ContentResolver)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""com.android.browser.permission.WRITE_HISTORY_BOOKMARKS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.provider.Browser void clearSearches(android.content.ContentResolver)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""com.android.browser.permission.WRITE_HISTORY_BOOKMARKS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.provider.Browser void deleteFromHistory(android.content.ContentResolver, java.lang.String)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""com.android.browser.permission.WRITE_HISTORY_BOOKMARKS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.provider.Browser void deleteHistoryTimeFrame(android.content.ContentResolver, long, long)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""com.android.browser.permission.WRITE_HISTORY_BOOKMARKS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.provider.Browser void requestAllIcons(android.content.ContentResolver, java.lang.String, android.webkit.WebIconDatabase.IconListener)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="value" val=""com.android.browser.permission.READ_HISTORY_BOOKMARKS"" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.provider.Browser void truncateHistory(android.content.ContentResolver)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="allOf" val="{"com.android.browser.permission.READ_HISTORY_BOOKMARKS", "com.android.browser.permission.WRITE_HISTORY_BOOKMARKS"}" />
<val name="apis" val=""..22"" />
</annotation>
</item>
<item name="android.provider.Browser void updateVisitedHistory(android.content.ContentResolver, java.lang.String, boolean)">
- <annotation name="android.support.annotation.RequiresPermission">
+ <annotation name="androidx.annotation.RequiresPermission">
<val name="allOf" val="{"com.android.browser.permission.READ_HISTORY_BOOKMARKS", "com.android.browser.permission.WRITE_HISTORY_BOOKMARKS"}" />
<val name="apis" val=""..22"" />
</annotation>
diff --git a/manual/android/util/annotations.xml b/manual/android/util/annotations.xml
index c4e8392..0f17dfc 100644
--- a/manual/android/util/annotations.xml
+++ b/manual/android/util/annotations.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<root>
<item name="android.util.Log boolean isLoggable(java.lang.String, int) 0">
- <annotation name="android.support.annotation.Size">
+ <annotation name="androidx.annotation.Size">
<val name="max" val="23" />
<val name="apis" val=""..23"" />
</annotation>
diff --git a/src/main/java/com/android/tools/metalava/AndroidApiChecks.kt b/src/main/java/com/android/tools/metalava/AndroidApiChecks.kt
index 2b76fd9..74add34 100644
--- a/src/main/java/com/android/tools/metalava/AndroidApiChecks.kt
+++ b/src/main/java/com/android/tools/metalava/AndroidApiChecks.kt
@@ -176,7 +176,7 @@
private fun checkRequiresPermission(method: MethodItem) {
val text = method.documentation
- val annotation = method.modifiers.findAnnotation("android.support.annotation.RequiresPermission")
+ val annotation = method.modifiers.findAnnotation("androidx.annotation.RequiresPermission")
if (annotation != null) {
for (attribute in annotation.attributes) {
var values: List<AnnotationAttributeValue>? = null
diff --git a/src/main/java/com/android/tools/metalava/AnnotationsMerger.kt b/src/main/java/com/android/tools/metalava/AnnotationsMerger.kt
index 5fe2896..8c46600 100644
--- a/src/main/java/com/android/tools/metalava/AnnotationsMerger.kt
+++ b/src/main/java/com/android/tools/metalava/AnnotationsMerger.kt
@@ -563,7 +563,7 @@
/** Reads in annotation data from an XML item (using IntelliJ IDE's external annotations XML format) and
* creates a corresponding [AnnotationItem], performing some "translations" in the process (e.g. mapping
- * from IntelliJ annotations like `org.jetbrains.annotations.Nullable` to `android.support.annotation.Nullable`. */
+ * from IntelliJ annotations like `org.jetbrains.annotations.Nullable` to `androidx.annotation.Nullable`. */
private fun createAnnotation(annotationElement: Element): AnnotationItem? {
val tagName = annotationElement.tagName
assert(tagName == "annotation") { tagName }
diff --git a/src/main/java/com/android/tools/metalava/Constants.kt b/src/main/java/com/android/tools/metalava/Constants.kt
index 2a4d1ff..5f2354c 100644
--- a/src/main/java/com/android/tools/metalava/Constants.kt
+++ b/src/main/java/com/android/tools/metalava/Constants.kt
@@ -25,7 +25,6 @@
const val JAVA_LANG_DEPRECATED = "java.lang.Deprecated"
const val ORG_JETBRAINS_ANNOTATIONS_PREFIX = "org.jetbrains.annotations."
const val ORG_INTELLIJ_LANG_ANNOTATIONS_PREFIX = "org.intellij.lang.annotations."
-const val ANDROID_SUPPORT_ANNOTATION_PREFIX = "android.support.annotation."
const val ANDROID_ANNOTATION_PREFIX = "android.annotation."
const val ANDROIDX_ANNOTATION_PREFIX = "androidx.annotation."
const val ANDROIDX_NONNULL = "androidx.annotation.NonNull"
@@ -38,7 +37,6 @@
const val ANDROID_NULLABLE = "android.annotation.Nullable"
const val ANDROID_NONNULL = "android.annotation.NonNull"
const val ANDROIDX_VISIBLE_FOR_TESTING = "androidx.annotation.VisibleForTesting"
-const val ANDROID_SUPPORT_VISIBLE_FOR_TESTING = "android.support.annotation.VisibleForTesting"
const val ATTR_OTHERWISE = "otherwise"
const val ATTR_ALLOW_IN = "allowIn"
const val CARRIER_PRIVILEGES_MARKER = "carrier privileges"
diff --git a/src/main/java/com/android/tools/metalava/DocAnalyzer.kt b/src/main/java/com/android/tools/metalava/DocAnalyzer.kt
index c9b40d8..482725b 100644
--- a/src/main/java/com/android/tools/metalava/DocAnalyzer.kt
+++ b/src/main/java/com/android/tools/metalava/DocAnalyzer.kt
@@ -129,11 +129,9 @@
var result: MutableList<String>? = null
for (annotation in annotations) {
val name = annotation.qualifiedName
- if (name != null && name.endsWith("Thread") &&
- (
- name.startsWith(ANDROID_SUPPORT_ANNOTATION_PREFIX) ||
- name.startsWith(ANDROIDX_ANNOTATION_PREFIX)
- )
+ if (name != null &&
+ name.endsWith("Thread") &&
+ name.startsWith(ANDROIDX_ANNOTATION_PREFIX)
) {
if (result == null) {
result = mutableListOf()
diff --git a/src/main/java/com/android/tools/metalava/ExtractAnnotations.kt b/src/main/java/com/android/tools/metalava/ExtractAnnotations.kt
index c645832..c5c7408 100644
--- a/src/main/java/com/android/tools/metalava/ExtractAnnotations.kt
+++ b/src/main/java/com/android/tools/metalava/ExtractAnnotations.kt
@@ -188,8 +188,7 @@
val qualifiedName = annotation.qualifiedName ?: continue
if (qualifiedName.startsWith(JAVA_LANG_PREFIX) ||
qualifiedName.startsWith(ANDROIDX_ANNOTATION_PREFIX) ||
- qualifiedName.startsWith(ANDROID_ANNOTATION_PREFIX) ||
- qualifiedName.startsWith(ANDROID_SUPPORT_ANNOTATION_PREFIX)
+ qualifiedName.startsWith(ANDROID_ANNOTATION_PREFIX)
) {
if (annotation.isTypeDefAnnotation()) {
// Imported typedef
diff --git a/src/main/java/com/android/tools/metalava/model/AnnotationItem.kt b/src/main/java/com/android/tools/metalava/model/AnnotationItem.kt
index ab47628..26cea66 100644
--- a/src/main/java/com/android/tools/metalava/model/AnnotationItem.kt
+++ b/src/main/java/com/android/tools/metalava/model/AnnotationItem.kt
@@ -29,7 +29,6 @@
import com.android.tools.metalava.ANDROIDX_NULLABLE
import com.android.tools.metalava.ANDROID_NONNULL
import com.android.tools.metalava.ANDROID_NULLABLE
-import com.android.tools.metalava.ANDROID_SUPPORT_ANNOTATION_PREFIX
import com.android.tools.metalava.ApiPredicate
import com.android.tools.metalava.JAVA_LANG_PREFIX
import com.android.tools.metalava.Options
@@ -190,83 +189,47 @@
}
when (qualifiedName) {
// Resource annotations
- "android.support.annotation.AnimRes",
"android.annotation.AnimRes" -> return "androidx.annotation.AnimRes"
- "android.support.annotation.AnimatorRes",
"android.annotation.AnimatorRes" -> return "androidx.annotation.AnimatorRes"
- "android.support.annotation.AnyRes",
"android.annotation.AnyRes" -> return "androidx.annotation.AnyRes"
- "android.support.annotation.ArrayRes",
"android.annotation.ArrayRes" -> return "androidx.annotation.ArrayRes"
- "android.support.annotation.AttrRes",
"android.annotation.AttrRes" -> return "androidx.annotation.AttrRes"
- "android.support.annotation.BoolRes",
"android.annotation.BoolRes" -> return "androidx.annotation.BoolRes"
- "android.support.annotation.ColorRes",
"android.annotation.ColorRes" -> return "androidx.annotation.ColorRes"
- "android.support.annotation.DimenRes",
"android.annotation.DimenRes" -> return "androidx.annotation.DimenRes"
- "android.support.annotation.DrawableRes",
"android.annotation.DrawableRes" -> return "androidx.annotation.DrawableRes"
- "android.support.annotation.FontRes",
"android.annotation.FontRes" -> return "androidx.annotation.FontRes"
- "android.support.annotation.FractionRes",
"android.annotation.FractionRes" -> return "androidx.annotation.FractionRes"
- "android.support.annotation.IdRes",
"android.annotation.IdRes" -> return "androidx.annotation.IdRes"
- "android.support.annotation.IntegerRes",
"android.annotation.IntegerRes" -> return "androidx.annotation.IntegerRes"
- "android.support.annotation.InterpolatorRes",
"android.annotation.InterpolatorRes" -> return "androidx.annotation.InterpolatorRes"
- "android.support.annotation.LayoutRes",
"android.annotation.LayoutRes" -> return "androidx.annotation.LayoutRes"
- "android.support.annotation.MenuRes",
"android.annotation.MenuRes" -> return "androidx.annotation.MenuRes"
- "android.support.annotation.PluralsRes",
"android.annotation.PluralsRes" -> return "androidx.annotation.PluralsRes"
- "android.support.annotation.RawRes",
"android.annotation.RawRes" -> return "androidx.annotation.RawRes"
- "android.support.annotation.StringRes",
"android.annotation.StringRes" -> return "androidx.annotation.StringRes"
- "android.support.annotation.StyleRes",
"android.annotation.StyleRes" -> return "androidx.annotation.StyleRes"
- "android.support.annotation.StyleableRes",
"android.annotation.StyleableRes" -> return "androidx.annotation.StyleableRes"
- "android.support.annotation.TransitionRes",
"android.annotation.TransitionRes" -> return "androidx.annotation.TransitionRes"
- "android.support.annotation.XmlRes",
"android.annotation.XmlRes" -> return "androidx.annotation.XmlRes"
// Threading
- "android.support.annotation.AnyThread",
"android.annotation.AnyThread" -> return "androidx.annotation.AnyThread"
- "android.support.annotation.BinderThread",
"android.annotation.BinderThread" -> return "androidx.annotation.BinderThread"
- "android.support.annotation.MainThread",
"android.annotation.MainThread" -> return "androidx.annotation.MainThread"
- "android.support.annotation.UiThread",
"android.annotation.UiThread" -> return "androidx.annotation.UiThread"
- "android.support.annotation.WorkerThread",
"android.annotation.WorkerThread" -> return "androidx.annotation.WorkerThread"
// Colors
- "android.support.annotation.ColorInt",
"android.annotation.ColorInt" -> return "androidx.annotation.ColorInt"
- "android.support.annotation.ColorLong",
"android.annotation.ColorLong" -> return "androidx.annotation.ColorLong"
- "android.support.annotation.HalfFloat",
"android.annotation.HalfFloat" -> return "androidx.annotation.HalfFloat"
// Ranges and sizes
- "android.support.annotation.FloatRange",
"android.annotation.FloatRange" -> return "androidx.annotation.FloatRange"
- "android.support.annotation.IntRange",
"android.annotation.IntRange" -> return "androidx.annotation.IntRange"
- "android.support.annotation.Size",
"android.annotation.Size" -> return "androidx.annotation.Size"
- "android.support.annotation.Px",
"android.annotation.Px" -> return "androidx.annotation.Px"
- "android.support.annotation.Dimension",
"android.annotation.Dimension" -> return "androidx.annotation.Dimension"
// Null
@@ -276,22 +239,17 @@
ANDROIDX_NULLABLE,
ANDROID_NULLABLE,
- "android.support.annotation.Nullable",
"libcore.util.Nullable",
"org.jetbrains.annotations.Nullable" -> return nullableAnnotationName(target)
ANDROIDX_NONNULL,
ANDROID_NONNULL,
- "android.support.annotation.NonNull",
"libcore.util.NonNull",
"org.jetbrains.annotations.NotNull" -> return nonNullAnnotationName(target)
// Typedefs
- "android.support.annotation.IntDef",
"android.annotation.IntDef" -> return "androidx.annotation.IntDef"
- "android.support.annotation.StringDef",
"android.annotation.StringDef" -> return "androidx.annotation.StringDef"
- "android.support.annotation.LongDef",
"android.annotation.LongDef" -> return "androidx.annotation.LongDef"
// Context Types
@@ -301,12 +259,9 @@
// Misc
"android.annotation.DeprecatedForSdk" -> return "java.lang.Deprecated"
- "android.support.annotation.CallSuper",
"android.annotation.CallSuper" -> return "androidx.annotation.CallSuper"
- "android.support.annotation.CheckResult",
"android.annotation.CheckResult" -> return "androidx.annotation.CheckResult"
"android.annotation.Discouraged" -> return "androidx.annotation.Discouraged"
- "android.support.annotation.RequiresPermission",
"android.annotation.RequiresPermission" -> return "androidx.annotation.RequiresPermission"
"android.annotation.RequiresPermission.Read" -> return "androidx.annotation.RequiresPermission.Read"
"android.annotation.RequiresPermission.Write" -> return "androidx.annotation.RequiresPermission.Write"
@@ -364,7 +319,7 @@
isNullableAnnotation(qualifiedName) -> nullableAnnotationName(target)
isNonNullAnnotation(qualifiedName) -> nonNullAnnotationName(target)
- // Support library annotations are all included, as is the built-in stuff like @Retention
+ // AndroidX annotations are all included, as is the built-in stuff like @Retention
qualifiedName.startsWith(ANDROIDX_ANNOTATION_PREFIX) -> return qualifiedName
qualifiedName.startsWith(JAVA_LANG_PREFIX) -> return qualifiedName
@@ -378,15 +333,6 @@
}
}
- qualifiedName.startsWith(ANDROID_SUPPORT_ANNOTATION_PREFIX) -> {
- return mapName(
- codebase,
- ANDROIDX_ANNOTATION_PREFIX + qualifiedName.substring(ANDROID_SUPPORT_ANNOTATION_PREFIX.length),
- filter,
- target
- )
- }
-
else -> {
// Remove, unless (a) public or (b) specifically included in --showAnnotations
return if (options.showAnnotations.matches(qualifiedName)) {
@@ -435,13 +381,10 @@
// The typedef annotations are special: they should not be in the signature
// files, but we want to include them in the external annotations file such that tools
// can enforce them.
- "android.support.annotation.IntDef",
"android.annotation.IntDef",
"androidx.annotation.IntDef",
- "android.support.annotation.StringDef",
"android.annotation.StringDef",
"androidx.annotation.StringDef",
- "android.support.annotation.LongDef",
"android.annotation.LongDef",
"androidx.annotation.LongDef" -> return TYPEDEF_ANNOTATION_TARGETS
@@ -581,9 +524,6 @@
source.startsWith("android.annotation.", 1) -> {
"@" + source.substring("@android.annotation.".length)
}
- source.startsWith(ANDROID_SUPPORT_ANNOTATION_PREFIX, 1) -> {
- "@" + source.substring("@android.support.annotation.".length)
- }
source.startsWith(ANDROIDX_ANNOTATION_PREFIX, 1) -> {
"@" + source.substring("@androidx.annotation.".length)
}
@@ -598,7 +538,7 @@
fun unshortenAnnotation(source: String): String {
return when {
source == "@Deprecated" -> "@java.lang.Deprecated"
- // These 3 annotations are in the android.annotation. package, not android.support.annotation
+ // These 3 annotations are in the android.annotation. package, not androidx.annotation
source.startsWith("@SystemService") ||
source.startsWith("@TargetApi") ||
source.startsWith("@SuppressLint") ->
diff --git a/src/main/java/com/android/tools/metalava/model/TypeItem.kt b/src/main/java/com/android/tools/metalava/model/TypeItem.kt
index b5f17bd..8084dca 100644
--- a/src/main/java/com/android/tools/metalava/model/TypeItem.kt
+++ b/src/main/java/com/android/tools/metalava/model/TypeItem.kt
@@ -176,10 +176,6 @@
if (cleaned.contains("@androidx.annotation.")) {
cleaned = cleaned.replace("@androidx.annotation.", "@")
}
- if (cleaned.contains("@android.support.annotation.")) {
- cleaned = cleaned.replace("@android.support.annotation.", "@")
- }
-
return stripJavaLangPrefix(cleaned)
}
diff --git a/src/main/java/com/android/tools/metalava/model/psi/PsiAnnotationItem.kt b/src/main/java/com/android/tools/metalava/model/psi/PsiAnnotationItem.kt
index ef131a7..4077b2a 100644
--- a/src/main/java/com/android/tools/metalava/model/psi/PsiAnnotationItem.kt
+++ b/src/main/java/com/android/tools/metalava/model/psi/PsiAnnotationItem.kt
@@ -178,7 +178,7 @@
// because that may not use fully qualified names, e.g. the source may say
// @RequiresPermission(Manifest.permission.ACCESS_COARSE_LOCATION)
// and we want to compute
- // @android.support.annotation.RequiresPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION)
+ // @androidx.annotation.RequiresPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION)
when (value) {
null -> sb.append("null")
is PsiLiteral -> sb.append(constantToSource(value.value))
diff --git a/src/main/java/com/android/tools/metalava/model/psi/PsiModifierItem.kt b/src/main/java/com/android/tools/metalava/model/psi/PsiModifierItem.kt
index ae12b2d..a94e5ae 100644
--- a/src/main/java/com/android/tools/metalava/model/psi/PsiModifierItem.kt
+++ b/src/main/java/com/android/tools/metalava/model/psi/PsiModifierItem.kt
@@ -18,7 +18,6 @@
import com.android.tools.metalava.ANDROIDX_VISIBLE_FOR_TESTING
import com.android.tools.metalava.ANDROID_DEPRECATED_FOR_SDK
-import com.android.tools.metalava.ANDROID_SUPPORT_VISIBLE_FOR_TESTING
import com.android.tools.metalava.ATTR_ALLOW_IN
import com.android.tools.metalava.ATTR_OTHERWISE
import com.android.tools.metalava.model.AnnotationItem
@@ -250,9 +249,7 @@
psiAnnotations.distinct().map {
val qualifiedName = it.qualifiedName
// Consider also supporting com.android.internal.annotations.VisibleForTesting?
- if (qualifiedName == ANDROIDX_VISIBLE_FOR_TESTING ||
- qualifiedName == ANDROID_SUPPORT_VISIBLE_FOR_TESTING
- ) {
+ if (qualifiedName == ANDROIDX_VISIBLE_FOR_TESTING) {
val otherwise = it.findAttributeValue(ATTR_OTHERWISE)
val ref = when {
otherwise is PsiReferenceExpression -> otherwise.referenceName ?: ""
@@ -300,9 +297,7 @@
.map {
val qualifiedName = it.qualifiedName
- if (qualifiedName == ANDROIDX_VISIBLE_FOR_TESTING ||
- qualifiedName == ANDROID_SUPPORT_VISIBLE_FOR_TESTING
- ) {
+ if (qualifiedName == ANDROIDX_VISIBLE_FOR_TESTING) {
val otherwise = it.findAttributeValue(ATTR_OTHERWISE)
val ref = when {
otherwise is PsiReferenceExpression -> otherwise.referenceName ?: ""
diff --git a/src/main/java/com/android/tools/metalava/model/psi/UAnnotationItem.kt b/src/main/java/com/android/tools/metalava/model/psi/UAnnotationItem.kt
index 8e2aebe..c76dfcf 100644
--- a/src/main/java/com/android/tools/metalava/model/psi/UAnnotationItem.kt
+++ b/src/main/java/com/android/tools/metalava/model/psi/UAnnotationItem.kt
@@ -162,7 +162,7 @@
// because that may not use fully qualified names, e.g. the source may say
// @RequiresPermission(Manifest.permission.ACCESS_COARSE_LOCATION)
// and we want to compute
- // @android.support.annotation.RequiresPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION)
+ // @androidx.annotation.RequiresPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION)
when (value) {
null -> sb.append("null")
is ULiteralExpression -> sb.append(CodePrinter.constantToSource(value.value))
diff --git a/src/test/java/com/android/tools/metalava/AnnotationsMergerTest.kt b/src/test/java/com/android/tools/metalava/AnnotationsMergerTest.kt
index 5c46667..3ade649 100644
--- a/src/test/java/com/android/tools/metalava/AnnotationsMergerTest.kt
+++ b/src/test/java/com/android/tools/metalava/AnnotationsMergerTest.kt
@@ -57,7 +57,6 @@
extraArguments = arrayOf(
ARG_HIDE_PACKAGE, "android.annotation",
ARG_HIDE_PACKAGE, "androidx.annotation",
- ARG_HIDE_PACKAGE, "android.support.annotation"
),
api = """
package test.pkg {
@@ -93,19 +92,19 @@
mergeXmlAnnotations = """<?xml version="1.0" encoding="UTF-8"?>
<root>
<item name="test.pkg.MyTest">
- <annotation name="android.support.annotation.UiThread" />
+ <annotation name="androidx.annotation.UiThread" />
</item>
<item name="test.pkg.MyTest java.lang.Double convert(java.lang.Float)">
- <annotation name="android.support.annotation.Nullable" />
+ <annotation name="androidx.annotation.Nullable" />
</item>
<item name="test.pkg.MyTest java.lang.Double convert(java.lang.Float) 0">
- <annotation name="android.support.annotation.NonNull" />
+ <annotation name="androidx.annotation.NonNull" />
</item>
<item name="test.pkg.MyTest myNumber">
- <annotation name="android.support.annotation.Nullable" />
+ <annotation name="androidx.annotation.Nullable" />
</item>
<item name="test.pkg.MyTest int clamp(int)">
- <annotation name="android.support.annotation.IntRange">
+ <annotation name="androidx.annotation.IntRange">
<val name="from" val="10" />
<val name="to" val="20" />
</annotation>
@@ -646,7 +645,7 @@
</annotation>
</item>
<item name="android.text.TextUtils boolean isEmpty(java.lang.CharSequence) 0">
- <annotation name="android.support.annotation.Nullable" />
+ <annotation name="androidx.annotation.Nullable" />
</item>
<item name="android.graphics.RuntimeShader RuntimeShader(java.lang.String) 0">
<annotation name="org.intellij.lang.annotations.Language">
diff --git a/src/test/java/com/android/tools/metalava/BaselineTest.kt b/src/test/java/com/android/tools/metalava/BaselineTest.kt
index 8821e0c..be243fe 100644
--- a/src/test/java/com/android/tools/metalava/BaselineTest.kt
+++ b/src/test/java/com/android/tools/metalava/BaselineTest.kt
@@ -164,7 +164,6 @@
extraArguments = arrayOf(
ARG_SHOW_ANNOTATION, "android.annotation.TestApi",
ARG_HIDE_PACKAGE, "android.annotation",
- ARG_HIDE_PACKAGE, "android.support.annotation",
ARG_API_LINT
),
baseline = """
diff --git a/src/test/java/com/android/tools/metalava/CompatibilityCheckTest.kt b/src/test/java/com/android/tools/metalava/CompatibilityCheckTest.kt
index 7cec552..5c8b1e3 100644
--- a/src/test/java/com/android/tools/metalava/CompatibilityCheckTest.kt
+++ b/src/test/java/com/android/tools/metalava/CompatibilityCheckTest.kt
@@ -1730,7 +1730,6 @@
extraArguments = arrayOf(
ARG_SHOW_ANNOTATION, "android.annotation.SystemApi",
ARG_HIDE_PACKAGE, "android.annotation",
- ARG_HIDE_PACKAGE, "android.support.annotation"
),
checkCompatibilityApiReleased =
@@ -1782,7 +1781,6 @@
extraArguments = arrayOf(
ARG_SHOW_ANNOTATION, "android.annotation.TestApi",
ARG_HIDE_PACKAGE, "android.annotation",
- ARG_HIDE_PACKAGE, "android.support.annotation"
),
checkCompatibilityApiReleased =
@@ -1850,7 +1848,6 @@
extraArguments = arrayOf(
ARG_SHOW_ANNOTATION, "android.annotation.SystemApi",
ARG_HIDE_PACKAGE, "android.annotation",
- ARG_HIDE_PACKAGE, "android.support.annotation"
),
checkCompatibilityApiReleased =
@@ -1914,7 +1911,6 @@
""",
extraArguments = arrayOf(
ARG_HIDE_PACKAGE, "android.annotation",
- ARG_HIDE_PACKAGE, "android.support.annotation"
),
checkCompatibilityApiReleased = """
@@ -2421,7 +2417,6 @@
extraArguments = arrayOf(
ARG_SHOW_ANNOTATION, "android.annotation.SystemApi",
ARG_HIDE_PACKAGE, "android.annotation",
- ARG_HIDE_PACKAGE, "android.support.annotation"
),
expectedIssues = ""
@@ -2475,7 +2470,6 @@
extraArguments = arrayOf(
ARG_SHOW_ANNOTATION, "android.annotation.SystemApi",
ARG_HIDE_PACKAGE, "android.annotation",
- ARG_HIDE_PACKAGE, "android.support.annotation"
),
expectedIssues = ""
)
@@ -2715,7 +2709,6 @@
extraArguments = arrayOf(
ARG_SHOW_ANNOTATION, "android.annotation.SystemApi",
ARG_HIDE_PACKAGE, "android.annotation",
- ARG_HIDE_PACKAGE, "android.support.annotation"
),
expectedIssues = """
@@ -2758,7 +2751,6 @@
extraArguments = arrayOf(
ARG_SHOW_ANNOTATION, "android.annotation.SystemApi",
ARG_HIDE_PACKAGE, "android.annotation",
- ARG_HIDE_PACKAGE, "android.support.annotation"
),
expectedIssues = """
diff --git a/src/test/java/com/android/tools/metalava/ShowAnnotationTest.kt b/src/test/java/com/android/tools/metalava/ShowAnnotationTest.kt
index 5db731c..185421c 100644
--- a/src/test/java/com/android/tools/metalava/ShowAnnotationTest.kt
+++ b/src/test/java/com/android/tools/metalava/ShowAnnotationTest.kt
@@ -48,7 +48,6 @@
extraArguments = arrayOf(
ARG_HIDE_PACKAGE, "android.annotation",
- ARG_HIDE_PACKAGE, "android.support.annotation"
),
api = """
@@ -105,7 +104,6 @@
extraArguments = arrayOf(
ARG_HIDE_PACKAGE, "android.annotation",
- ARG_HIDE_PACKAGE, "android.support.annotation"
),
api = """
@@ -165,7 +163,6 @@
extraArguments = arrayOf(
ARG_SHOW_ANNOTATION, "android.annotation.TestApi",
ARG_HIDE_PACKAGE, "android.annotation",
- ARG_HIDE_PACKAGE, "android.support.annotation"
),
api = """
@@ -250,7 +247,6 @@
extraArguments = arrayOf(
ARG_SHOW_ANNOTATION, "android.annotation.TestApi",
ARG_HIDE_PACKAGE, "android.annotation",
- ARG_HIDE_PACKAGE, "android.support.annotation"
)
)
}
@@ -297,7 +293,6 @@
extraArguments = arrayOf(
ARG_SHOW_SINGLE_ANNOTATION, "android.annotation.SystemApi",
ARG_HIDE_PACKAGE, "android.annotation",
- ARG_HIDE_PACKAGE, "android.support.annotation"
),
api = """
diff --git a/src/test/java/com/android/tools/metalava/model/TypeItemTest.kt b/src/test/java/com/android/tools/metalava/model/TypeItemTest.kt
index 1bcce06..4d66e16 100644
--- a/src/test/java/com/android/tools/metalava/model/TypeItemTest.kt
+++ b/src/test/java/com/android/tools/metalava/model/TypeItemTest.kt
@@ -23,11 +23,11 @@
class TypeItemTest {
@Test
fun test() {
- assertThat(TypeItem.shortenTypes("@android.support.annotation.Nullable")).isEqualTo("@Nullable")
+ assertThat(TypeItem.shortenTypes("@androidx.annotation.Nullable")).isEqualTo("@Nullable")
assertThat(TypeItem.shortenTypes(JAVA_LANG_STRING)).isEqualTo("String")
assertThat(TypeItem.shortenTypes("java.lang.reflect.Method")).isEqualTo("java.lang.reflect.Method")
assertThat(TypeItem.shortenTypes("java.util.List<java.lang.String>")).isEqualTo("java.util.List<java.lang.String>")
- assertThat(TypeItem.shortenTypes("java.util.List<@android.support.annotation.NonNull java.lang.String>")).isEqualTo(
+ assertThat(TypeItem.shortenTypes("java.util.List<@androidx.annotation.NonNull java.lang.String>")).isEqualTo(
"java.util.List<@NonNull java.lang.String>"
)
}
diff --git a/src/test/java/com/android/tools/metalava/model/text/TextTypeItemTest.kt b/src/test/java/com/android/tools/metalava/model/text/TextTypeItemTest.kt
index 6e99591..6326f2f 100644
--- a/src/test/java/com/android/tools/metalava/model/text/TextTypeItemTest.kt
+++ b/src/test/java/com/android/tools/metalava/model/text/TextTypeItemTest.kt
@@ -23,12 +23,12 @@
@Test
fun `test typeString()`() {
val full =
- "@android.support.annotation.Nullable java.util.List<@android.support.annotation.Nullable java.lang.String>"
+ "@androidx.annotation.Nullable java.util.List<@androidx.annotation.Nullable java.lang.String>"
assertThat(TextTypeItem.toTypeString(full, false, false, false)).isEqualTo(
"java.util.List<java.lang.String>"
)
assertThat(TextTypeItem.toTypeString(full, false, true, false)).isEqualTo(
- "java.util.List<@android.support.annotation.Nullable java.lang.String>"
+ "java.util.List<@androidx.annotation.Nullable java.lang.String>"
)
assertThat(TextTypeItem.toTypeString(full, false, false, true)).isEqualTo(
"java.util.List"
@@ -40,7 +40,7 @@
true,
false
)
- ).isEqualTo("@android.support.annotation.Nullable java.util.List<@android.support.annotation.Nullable java.lang.String>")
+ ).isEqualTo("@androidx.annotation.Nullable java.util.List<@androidx.annotation.Nullable java.lang.String>")
assertThat(
TextTypeItem.toTypeString(
full,
@@ -48,7 +48,7 @@
true,
true
)
- ).isEqualTo("@android.support.annotation.Nullable java.util.List")
+ ).isEqualTo("@androidx.annotation.Nullable java.util.List")
assertThat(TextTypeItem.toTypeString("int", false, false, false)).isEqualTo("int")
assertThat(