am 62dee3d8: am 0fca2a3e: Merge "Fix build, only invalidate when creating user." into jb-mr1-dev

* commit '62dee3d8ebb3a1d1e0adfb61c9ed505ecf8e2a85':
  Fix build, only invalidate when creating user.
This commit is contained in:
Jeff Sharkey
2012-10-10 08:38:03 -07:00
committed by Android Git Automerger
2 changed files with 5 additions and 2 deletions

View File

@@ -261,6 +261,7 @@ public class AccountManagerService
accounts = new UserAccounts(mContext, userId);
mUsers.append(userId, accounts);
purgeOldGrants(accounts);
mAuthenticatorCache.invalidateCache(accounts.userId);
validateAccountsAndPopulateCache(accounts);
}
return accounts;
@@ -300,8 +301,6 @@ public class AccountManagerService
}
private void validateAccountsAndPopulateCache(UserAccounts accounts) {
mAuthenticatorCache.invalidateCache(accounts.userId);
final HashSet<AuthenticatorDescription> knownAuth = Sets.newHashSet();
for (RegisteredServicesCache.ServiceInfo<AuthenticatorDescription> service :
mAuthenticatorCache.getAllServices(accounts.userId)) {

View File

@@ -223,6 +223,10 @@ public class AccountManagerServiceTest extends AndroidTestCase {
final RegisteredServicesCacheListener<AuthenticatorDescription> listener,
final Handler handler) {
}
@Override
public void invalidateCache(int userId) {
}
}
static public class MyMockContext extends MockContext {