diff options
author | Marcus Hagerott <mhagerott@google.com> | 2016-12-12 17:21:57 -0800 |
---|---|---|
committer | Marcus Hagerott <mhagerott@google.com> | 2016-12-16 16:43:03 -0800 |
commit | 75895e73379aa26a3d4135c772af4ecb8a79b4c9 (patch) | |
tree | 1187a975c90fb08a739c4cde19a150eef797514e /tests/src/com | |
parent | cdb539b3abfcc1447be337ef3741e7501510cf14 (diff) | |
download | Contacts-75895e73379aa26a3d4135c772af4ecb8a79b4c9.tar.gz |
Add AccountInfo class
This holds the AccountWithDataSet, AccountType and AccountDisplayInfo
for an account because many usages of accounts need all three of these.
Test: manually verify that accounts in nav drawer are correct
Bug 33627801
Change-Id: I39962f9945714aa7ce48aca97f220f119a1741cd
Diffstat (limited to 'tests/src/com')
-rw-r--r-- | tests/src/com/android/contacts/test/mocks/MockAccountTypeManager.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/src/com/android/contacts/test/mocks/MockAccountTypeManager.java b/tests/src/com/android/contacts/test/mocks/MockAccountTypeManager.java index e1c370af4..956f775b4 100644 --- a/tests/src/com/android/contacts/test/mocks/MockAccountTypeManager.java +++ b/tests/src/com/android/contacts/test/mocks/MockAccountTypeManager.java @@ -18,6 +18,7 @@ package com.android.contacts.test.mocks; import android.accounts.Account; import com.android.contacts.model.AccountTypeManager; +import com.android.contacts.model.account.AccountInfo; import com.android.contacts.model.account.AccountType; import com.android.contacts.model.account.AccountTypeWithDataSet; import com.android.contacts.model.account.AccountWithDataSet; @@ -70,19 +71,18 @@ public class MockAccountTypeManager extends AccountTypeManager { } @Override - public List<AccountWithDataSet> getAccounts(Predicate<AccountWithDataSet> filter) { - return Lists.newArrayList(Collections2.filter(Arrays.asList(mAccounts), filter)); + public ListenableFuture<List<AccountInfo>> getAccountsAsync() { + throw new UnsupportedOperationException("not implemented"); } @Override - public ListenableFuture<List<AccountWithDataSet>> getAllAccountsAsync() { - return Futures.immediateFuture(Arrays.asList(mAccounts)); + public ListenableFuture<List<AccountInfo>> filterAccountsAsync(Predicate<AccountInfo> filter) { + throw new UnsupportedOperationException("not implemented"); } @Override - public ListenableFuture<List<AccountWithDataSet>> filterAccountsByTypeAsync( - Predicate<AccountType> type) { - return Futures.immediateFuture(Arrays.asList(mAccounts)); + public AccountInfo getAccountInfoForAccount(AccountWithDataSet account) { + throw new UnsupportedOperationException("not implemented"); } @Override |