diff options
author | Carlos Valdivia <carlosvaldivia@google.com> | 2015-06-17 20:17:37 -0700 |
---|---|---|
committer | Carlos Valdivia <carlosvaldivia@google.com> | 2015-06-30 19:30:36 -0700 |
commit | c37ee22714ddec1104ba3a2189cf77924ac27812 (patch) | |
tree | e295aecf4d0ced4d23bfb3ac8a3802ca91adbb39 /core/java/android/accounts | |
parent | 2438c9b2e7892a8515209cb1d440c3b5147165b2 (diff) | |
download | frameworks_base-c37ee22714ddec1104ba3a2189cf77924ac27812.zip frameworks_base-c37ee22714ddec1104ba3a2189cf77924ac27812.tar.gz frameworks_base-c37ee22714ddec1104ba3a2189cf77924ac27812.tar.bz2 |
Tweak GET_ACCOUNTS behavior and improve memory.
Related to recent permissions and system health changes. This change
will make it so that calls to AccountManager#getAccountsByType will work
for the owning account authenticator even if they don't have
permissions. This is pretty fundamental to having a working
authenticator and it doesn't make sense to have it be disabled (or have
authenticators hack around the framework).
Also changed how TokenCache works so that memory usage is still
predictable (no more than 64kb) but token caching won't be at the mercy
of garbage collection. This is important for writing stable cts tests.
Change-Id: Ib31b550616b266ee5a04eb26b04ba0023ca0cb83
Diffstat (limited to 'core/java/android/accounts')
-rw-r--r-- | core/java/android/accounts/AccountManager.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java index 3001c2c..aa7692b 100644 --- a/core/java/android/accounts/AccountManager.java +++ b/core/java/android/accounts/AccountManager.java @@ -489,7 +489,8 @@ public class AccountManager { * <p>It is safe to call this method from the main thread. * * <p>This method requires the caller to hold the permission - * {@link android.Manifest.permission#GET_ACCOUNTS}. + * {@link android.Manifest.permission#GET_ACCOUNTS} or share a uid with the + * authenticator that owns the account type. * * @param type The type of accounts to return, null to retrieve all accounts * @return An array of {@link Account}, one per matching account. Empty @@ -615,7 +616,8 @@ public class AccountManager { * {@link AccountManagerFuture} must not be used on the main thread. * * <p>This method requires the caller to hold the permission - * {@link android.Manifest.permission#GET_ACCOUNTS}. + * {@link android.Manifest.permission#GET_ACCOUNTS} or share a uid with the + * authenticator that owns the account type. * * @param type The type of accounts to return, must not be null * @param features An array of the account features to require, |