OSDN Git Service

Tweak GET_ACCOUNTS behavior and improve memory.
authorCarlos Valdivia <carlosvaldivia@google.com>
Thu, 18 Jun 2015 03:17:37 +0000 (20:17 -0700)
committerCarlos Valdivia <carlosvaldivia@google.com>
Wed, 1 Jul 2015 02:30:36 +0000 (19:30 -0700)
commitc37ee22714ddec1104ba3a2189cf77924ac27812
treee295aecf4d0ced4d23bfb3ac8a3802ca91adbb39
parent2438c9b2e7892a8515209cb1d440c3b5147165b2
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
core/java/android/accounts/AccountManager.java
services/core/java/com/android/server/accounts/AccountManagerService.java
services/core/java/com/android/server/accounts/TokenCache.java