diff options
| author | 2018-08-09 13:58:15 +0000 | |
|---|---|---|
| committer | 2018-08-09 13:58:15 +0000 | |
| commit | 78f8ffbffd908fa02b7b54bf62bfee9a7f2c7c9c (patch) | |
| tree | ca7096726db063c2c0c4a9e648dee13c13215aea | |
| parent | 196eb1d929a2b292c2a513579338e6304ee30b0a (diff) | |
| parent | ad576cc8b9b3a43ef06c21b8221f68ccc50b6f08 (diff) | |
Merge "Add @UnsupportedAppUsage annotations"
| -rw-r--r-- | config/hiddenapi-light-greylist.txt | 18 | ||||
| -rw-r--r-- | config/hiddenapi-vendor-list.txt | 1 | ||||
| -rw-r--r-- | core/java/android/accounts/Account.java | 3 | ||||
| -rw-r--r-- | core/java/android/accounts/AccountAndUser.java | 5 | ||||
| -rw-r--r-- | core/java/android/accounts/AccountAuthenticatorResponse.java | 2 | ||||
| -rw-r--r-- | core/java/android/accounts/AccountManager.java | 12 | ||||
| -rw-r--r-- | core/java/android/accounts/AuthenticatorDescription.java | 3 |
7 files changed, 25 insertions, 19 deletions
diff --git a/config/hiddenapi-light-greylist.txt b/config/hiddenapi-light-greylist.txt index 2bf417b8a8be..35325dcbcd1c 100644 --- a/config/hiddenapi-light-greylist.txt +++ b/config/hiddenapi-light-greylist.txt @@ -1,23 +1,5 @@ Landroid/accessibilityservice/IAccessibilityServiceConnection$Stub;-><init>()V Landroid/accessibilityservice/IAccessibilityServiceConnection$Stub;->asInterface(Landroid/os/IBinder;)Landroid/accessibilityservice/IAccessibilityServiceConnection; -Landroid/accounts/Account;->accessId:Ljava/lang/String; -Landroid/accounts/Account;->TAG:Ljava/lang/String; -Landroid/accounts/AccountAndUser;-><init>(Landroid/accounts/Account;I)V -Landroid/accounts/AccountAndUser;->account:Landroid/accounts/Account; -Landroid/accounts/AccountAndUser;->userId:I -Landroid/accounts/AccountAuthenticatorResponse;-><init>(Landroid/accounts/IAccountAuthenticatorResponse;)V -Landroid/accounts/AccountManager$AmsTask;->mActivity:Landroid/app/Activity; -Landroid/accounts/AccountManager$AmsTask;->mHandler:Landroid/os/Handler; -Landroid/accounts/AccountManager$AmsTask;->mResponse:Landroid/accounts/IAccountManagerResponse; -Landroid/accounts/AccountManager$GetAuthTokenByTypeAndFeaturesTask;->mAuthTokenType:Ljava/lang/String; -Landroid/accounts/AccountManager$GetAuthTokenByTypeAndFeaturesTask;->mLoginOptions:Landroid/os/Bundle; -Landroid/accounts/AccountManager$GetAuthTokenByTypeAndFeaturesTask;->mMyCallback:Landroid/accounts/AccountManagerCallback; -Landroid/accounts/AccountManager;-><init>(Landroid/content/Context;Landroid/accounts/IAccountManager;)V -Landroid/accounts/AccountManager;->confirmCredentialsAsUser(Landroid/accounts/Account;Landroid/os/Bundle;Landroid/app/Activity;Landroid/accounts/AccountManagerCallback;Landroid/os/Handler;Landroid/os/UserHandle;)Landroid/accounts/AccountManagerFuture; -Landroid/accounts/AccountManager;->getAccountsByTypeAsUser(Ljava/lang/String;Landroid/os/UserHandle;)[Landroid/accounts/Account; -Landroid/accounts/AccountManager;->mContext:Landroid/content/Context; -Landroid/accounts/AuthenticatorDescription;-><init>(Landroid/os/Parcel;)V -Landroid/accounts/AuthenticatorDescription;-><init>(Ljava/lang/String;)V Landroid/accounts/IAccountAuthenticator$Stub$Proxy;-><init>(Landroid/os/IBinder;)V Landroid/accounts/IAccountAuthenticator$Stub$Proxy;->mRemote:Landroid/os/IBinder; Landroid/accounts/IAccountAuthenticator$Stub;-><init>()V diff --git a/config/hiddenapi-vendor-list.txt b/config/hiddenapi-vendor-list.txt index c1933fc46f58..a9094482be9b 100644 --- a/config/hiddenapi-vendor-list.txt +++ b/config/hiddenapi-vendor-list.txt @@ -1,4 +1,3 @@ -Landroid/accounts/AccountManager;-><init>(Landroid/content/Context;Landroid/accounts/IAccountManager;Landroid/os/Handler;)V Landroid/app/Activity;->managedQuery(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor; Landroid/app/Activity;->registerRemoteAnimations(Landroid/view/RemoteAnimationDefinition;)V Landroid/app/ActivityManager$RecentTaskInfo;->configuration:Landroid/content/res/Configuration; diff --git a/core/java/android/accounts/Account.java b/core/java/android/accounts/Account.java index b6e85f18a695..f07f5ece7bc1 100644 --- a/core/java/android/accounts/Account.java +++ b/core/java/android/accounts/Account.java @@ -18,6 +18,7 @@ package android.accounts; import android.annotation.NonNull; import android.annotation.Nullable; +import android.annotation.UnsupportedAppUsage; import android.content.Context; import android.os.Parcelable; import android.os.Parcel; @@ -36,6 +37,7 @@ import java.util.Set; * suitable for use as the key of a {@link java.util.Map} */ public class Account implements Parcelable { + @UnsupportedAppUsage private static final String TAG = "Account"; @GuardedBy("sAccessedAccounts") @@ -43,6 +45,7 @@ public class Account implements Parcelable { public final String name; public final String type; + @UnsupportedAppUsage private final @Nullable String accessId; public boolean equals(Object o) { diff --git a/core/java/android/accounts/AccountAndUser.java b/core/java/android/accounts/AccountAndUser.java index 04157cc31847..b0d53438d97c 100644 --- a/core/java/android/accounts/AccountAndUser.java +++ b/core/java/android/accounts/AccountAndUser.java @@ -16,15 +16,20 @@ package android.accounts; +import android.annotation.UnsupportedAppUsage; + /** * Used to store the Account and the UserId this account is associated with. * * @hide */ public class AccountAndUser { + @UnsupportedAppUsage public Account account; + @UnsupportedAppUsage public int userId; + @UnsupportedAppUsage public AccountAndUser(Account account, int userId) { this.account = account; this.userId = userId; diff --git a/core/java/android/accounts/AccountAuthenticatorResponse.java b/core/java/android/accounts/AccountAuthenticatorResponse.java index 41f26ac164b7..bcc9f90c35f1 100644 --- a/core/java/android/accounts/AccountAuthenticatorResponse.java +++ b/core/java/android/accounts/AccountAuthenticatorResponse.java @@ -16,6 +16,7 @@ package android.accounts; +import android.annotation.UnsupportedAppUsage; import android.os.Bundle; import android.os.Parcelable; import android.os.Parcel; @@ -33,6 +34,7 @@ public class AccountAuthenticatorResponse implements Parcelable { /** * @hide */ + @UnsupportedAppUsage public AccountAuthenticatorResponse(IAccountAuthenticatorResponse response) { mAccountAuthenticatorResponse = response; } diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java index 5176d71ea67b..3189d089e6d8 100644 --- a/core/java/android/accounts/AccountManager.java +++ b/core/java/android/accounts/AccountManager.java @@ -27,6 +27,7 @@ import android.annotation.SystemApi; import android.annotation.SystemService; import android.annotation.SdkConstant.SdkConstantType; import android.annotation.BroadcastBehavior; +import android.annotation.UnsupportedAppUsage; import android.app.Activity; import android.content.BroadcastReceiver; import android.content.ComponentName; @@ -336,6 +337,7 @@ public class AccountManager { public static final String ACCOUNT_ACCESS_TOKEN_TYPE = "com.android.AccountManager.ACCOUNT_ACCESS_TOKEN_TYPE"; + @UnsupportedAppUsage private final Context mContext; private final IAccountManager mService; private final Handler mMainHandler; @@ -409,6 +411,7 @@ public class AccountManager { /** * @hide */ + @UnsupportedAppUsage public AccountManager(Context context, IAccountManager service) { mContext = context; mService = service; @@ -418,6 +421,7 @@ public class AccountManager { /** * @hide used for testing only */ + @UnsupportedAppUsage public AccountManager(Context context, IAccountManager service, Handler handler) { mContext = context; mService = service; @@ -685,6 +689,7 @@ public class AccountManager { /** @hide Same as {@link #getAccountsByType(String)} but for a specific user. */ @NonNull + @UnsupportedAppUsage public Account[] getAccountsByTypeAsUser(String type, UserHandle userHandle) { try { return mService.getAccountsAsUser(type, userHandle.getIdentifier(), @@ -2014,6 +2019,7 @@ public class AccountManager { * Same as {@link #confirmCredentials(Account, Bundle, Activity, AccountManagerCallback, Handler)} * but for the specified user. */ + @UnsupportedAppUsage public AccountManagerFuture<Bundle> confirmCredentialsAsUser(final Account account, final Bundle options, final Activity activity, @@ -2225,9 +2231,12 @@ public class AccountManager { } private abstract class AmsTask extends FutureTask<Bundle> implements AccountManagerFuture<Bundle> { + @UnsupportedAppUsage final IAccountManagerResponse mResponse; + @UnsupportedAppUsage final Handler mHandler; final AccountManagerCallback<Bundle> mCallback; + @UnsupportedAppUsage final Activity mActivity; public AmsTask(Activity activity, Handler handler, AccountManagerCallback<Bundle> callback) { super(new Callable<Bundle>() { @@ -2552,10 +2561,13 @@ public class AccountManager { } volatile AccountManagerFuture<Bundle> mFuture = null; final String mAccountType; + @UnsupportedAppUsage final String mAuthTokenType; final String[] mFeatures; final Bundle mAddAccountOptions; + @UnsupportedAppUsage final Bundle mLoginOptions; + @UnsupportedAppUsage final AccountManagerCallback<Bundle> mMyCallback; private volatile int mNumAccounts = 0; diff --git a/core/java/android/accounts/AuthenticatorDescription.java b/core/java/android/accounts/AuthenticatorDescription.java index 5d9abb068bd8..6875867108de 100644 --- a/core/java/android/accounts/AuthenticatorDescription.java +++ b/core/java/android/accounts/AuthenticatorDescription.java @@ -16,6 +16,7 @@ package android.accounts; +import android.annotation.UnsupportedAppUsage; import android.os.Parcelable; import android.os.Parcel; @@ -76,6 +77,7 @@ public class AuthenticatorDescription implements Parcelable { return new AuthenticatorDescription(type); } + @UnsupportedAppUsage private AuthenticatorDescription(String type) { this.type = type; this.packageName = null; @@ -86,6 +88,7 @@ public class AuthenticatorDescription implements Parcelable { this.customTokens = false; } + @UnsupportedAppUsage private AuthenticatorDescription(Parcel source) { this.type = source.readString(); this.packageName = source.readString(); |