Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebb97455 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android Git Automerger
Browse files

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

* commit '62dee3d8':
  Fix build, only invalidate when creating user.
parents abd0c099 62dee3d8
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -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)) {
+4 −0
Original line number Original line Diff line number Diff line
@@ -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 {