Merge "Fix build, only invalidate when creating user." into jb-mr1-dev
This commit is contained in:
@@ -261,6 +261,7 @@ public class AccountManagerService
|
|||||||
accounts = new UserAccounts(mContext, userId);
|
accounts = new UserAccounts(mContext, userId);
|
||||||
mUsers.append(userId, accounts);
|
mUsers.append(userId, accounts);
|
||||||
purgeOldGrants(accounts);
|
purgeOldGrants(accounts);
|
||||||
|
mAuthenticatorCache.invalidateCache(accounts.userId);
|
||||||
validateAccountsAndPopulateCache(accounts);
|
validateAccountsAndPopulateCache(accounts);
|
||||||
}
|
}
|
||||||
return accounts;
|
return accounts;
|
||||||
@@ -300,8 +301,6 @@ public class AccountManagerService
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void validateAccountsAndPopulateCache(UserAccounts accounts) {
|
private void validateAccountsAndPopulateCache(UserAccounts accounts) {
|
||||||
mAuthenticatorCache.invalidateCache(accounts.userId);
|
|
||||||
|
|
||||||
final HashSet<AuthenticatorDescription> knownAuth = Sets.newHashSet();
|
final HashSet<AuthenticatorDescription> knownAuth = Sets.newHashSet();
|
||||||
for (RegisteredServicesCache.ServiceInfo<AuthenticatorDescription> service :
|
for (RegisteredServicesCache.ServiceInfo<AuthenticatorDescription> service :
|
||||||
mAuthenticatorCache.getAllServices(accounts.userId)) {
|
mAuthenticatorCache.getAllServices(accounts.userId)) {
|
||||||
|
|||||||
@@ -223,6 +223,10 @@ public class AccountManagerServiceTest extends AndroidTestCase {
|
|||||||
final RegisteredServicesCacheListener<AuthenticatorDescription> listener,
|
final RegisteredServicesCacheListener<AuthenticatorDescription> listener,
|
||||||
final Handler handler) {
|
final Handler handler) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void invalidateCache(int userId) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static public class MyMockContext extends MockContext {
|
static public class MyMockContext extends MockContext {
|
||||||
|
|||||||
Reference in New Issue
Block a user