/packages/apps/Contacts/tests/src/com/android/contacts/tests/mocks/ |
MockAccountTypeManager.java | 18 import com.android.contacts.model.AccountType; 37 public AccountType[] mTypes; 40 public MockAccountTypeManager(AccountType[] types, AccountWithDataSet[] accounts) { 46 public AccountType getAccountType(AccountTypeWithDataSet accountTypeWithDataSet) { 47 for (AccountType type : mTypes) { 48 if (Objects.equal(accountTypeWithDataSet.accountType, type.accountType) 67 public Map<AccountTypeWithDataSet, AccountType> getUsableInvitableAccountTypes() { 72 public List<AccountType> getAccountTypes(boolean writableOnly) { 73 final List<AccountType> ret = Lists.newArrayList() [all...] |
/packages/apps/Contacts/tests/src/com/android/contacts/model/ |
AccountTypeManagerTest.java | 43 final AccountType typeA = new MockAccountType("type1", null, null); 44 final AccountType typeB = new MockAccountType("type1", "minus", null); 45 final AccountType typeC = new MockAccountType("type2", null, "c"); 46 final AccountType typeD = new MockAccountType("type2", "minus", "d"); 55 Map<AccountTypeWithDataSet, AccountType> types = 126 private static AccountWithDataSet createAccountWithDataSet(String name, AccountType type) { 127 return new AccountWithDataSet(name, type.accountType, type.dataSet); 131 * Array of {@link AccountType} -> {@link Map} 133 private static Map<AccountTypeWithDataSet, AccountType> buildAccountTypes(AccountType... types) [all...] |
AccountTypeTest.java | 26 * Test case for {@link AccountType}. 41 assertEquals(DEFAULT, AccountType.getResourceText(c, null, -1, DEFAULT)); 44 assertEquals(DEFAULT, AccountType.getResourceText(c, packageName, -1, DEFAULT)); 49 AccountType.getResourceText(c, packageName, externalResID, DEFAULT)); 54 AccountType.getResourceText(c, null, internalResId, DEFAULT)); 58 * Verify if {@link AccountType#getInviteContactActionLabel} correctly gets the resource ID 59 * from {@link AccountType#getInviteContactActionResId} 67 AccountType accountType = new AccountType() { [all...] |
/packages/apps/Contacts/src/com/android/contacts/model/ |
AccountTypeManager.java | 68 * Singleton holder for all parsed {@link AccountType} available on the 107 public abstract AccountType getAccountType(AccountTypeWithDataSet accountTypeWithDataSet); 109 public final AccountType getAccountType(String accountType, String dataSet) { 110 return getAccountType(AccountTypeWithDataSet.get(accountType, dataSet)); 113 public final AccountType getAccountTypeForAccount(AccountWithDataSet account) { 118 * @return Unmodifiable map from {@link AccountTypeWithDataSet}s to {@link AccountType}s 130 public abstract Map<AccountTypeWithDataSet, AccountType> getUsableInvitableAccountTypes(); 134 * {@link AccountType#accountType}, {@link AccountType#dataSet}, and {@link DataKind#mimeType} [all...] |
DataKind.java | 20 import com.android.contacts.model.AccountType.EditField; 21 import com.android.contacts.model.AccountType.EditType; 22 import com.android.contacts.model.AccountType.StringInflater;
|
AccountType.java | 49 public abstract class AccountType { 50 private static final String TAG = "AccountType"; 55 public String accountType = null; 211 return getResourceText(context, syncAdapterPackageName, titleRes, accountType); 232 return AccountTypeWithDataSet.get(accountType, dataSet); 509 * Compare two {@link AccountType} by their {@link AccountType#getDisplayLabel} with the 512 public static class DisplayLabelComparator implements Comparator<AccountType> { 521 private String getDisplayLabel(AccountType type) { 527 public int compare(AccountType lhs, AccountType rhs) [all...] |
FallbackAccountType.java | 29 this.accountType = null; 69 static AccountType createWithPackageNameForTest(Context context, String resPackageName) {
|
/packages/apps/Contacts/src/com/android/contacts/group/ |
GroupDetailDisplayUtils.java | 20 import com.android.contacts.model.AccountType; 44 AccountType accountType = accountTypeManager.getAccountType(accountTypeString, dataSet); 51 label.setText(accountType.getViewGroupLabel(context)); 58 accountIcon.setImageDrawable(accountType.getDisplayIcon(context));
|
GroupBrowseListAdapter.java | 22 import com.android.contacts.model.AccountType; 121 String accountType = mCursor.getString(GroupListLoader.ACCOUNT_TYPE); 138 accountType.equals(previousGroupAccountType) && 144 return new GroupListItem(accountName, accountType, dataSet, groupId, title, 199 AccountType accountType = mAccountTypeManager.getAccountType( 201 viewCache.accountType.setText(accountType.getDisplayLabel(mContext).toString()); 214 public final TextView accountType; 224 accountType = (TextView) view.findViewById(R.id.account_type) [all...] |
/packages/apps/Contacts/src/com/android/contacts/editor/ |
BaseRawContactEditorView.java | 20 import com.android.contacts.model.AccountType; 21 import com.android.contacts.model.AccountType.EditType; 45 * {@link EntityModifier} to ensure that {@link AccountType} are enforced. 118 * {@link EntityDelta} state and the {@link AccountType} that 121 public abstract void setState(EntityDelta state, AccountType source, ViewIdGenerator vig,
|
AggregationSuggestionView.java | 22 import com.android.contacts.model.AccountType; 117 String accountType = rawContact.accountType; 119 if (accountType == null) { 122 AccountType type = accountTypes.getAccountType(accountType, dataSet);
|
ContactEditorUtils.java | 19 import com.android.contacts.model.AccountType; 243 for (AccountType type : mAccountTypes.getAccountTypes(true)) { 244 types.add(type.accountType); 286 final String accountType = resultData.getStringExtra(AccountManager.KEY_ACCOUNT_TYPE); 290 if (TextUtils.isEmpty(accountType) || TextUtils.isEmpty(accountName)) return null; 292 return new AccountWithDataSet(accountName, accountType, null);
|
/packages/apps/Contacts/tests/src/com/android/contacts/ |
EntityModifierTests.java | 23 import com.android.contacts.model.AccountType; 24 import com.android.contacts.model.AccountType.EditType; 61 * Tests for {@link EntityModifier} to verify that {@link AccountType} 85 public static class MockContactsSource extends AccountType { 89 this.accountType = TEST_ACCOUNT_TYPE; 156 * Build a {@link AccountType} that has various odd constraints for 159 protected AccountType getAccountType() { 166 protected AccountTypeManager getAccountTypes(AccountType... types) { 208 final AccountType source = getAccountType(); 253 final AccountType source = getAccountType() [all...] |
/packages/apps/Contacts/src/com/android/contacts/detail/ |
ContactDetailUpdatesFragment.java | 23 import com.android.contacts.model.AccountType; 65 final AccountType accountType = getAccountTypeForStreamItemEntry(streamItemEntry); 70 intent.setClassName(accountType.syncAdapterPackageName, 71 accountType.getViewStreamItemActivity()); 84 final AccountType accountType = getAccountTypeForStreamItemEntry(tag.streamItem); 87 intent.setClassName(accountType.syncAdapterPackageName, 88 accountType.getViewStreamItemPhotoActivity()); 93 private AccountType getAccountTypeForStreamItemEntry(StreamItemEntry streamItemEntry) [all...] |
StreamItemAdapter.java | 20 import com.android.contacts.model.AccountType; 103 final AccountType accountType = 110 (accountType.getViewStreamItemPhotoActivity() == null) ? null : mPhotoClickListener 116 if (accountType.getViewStreamItemActivity() != null) {
|
PhotoSelectionHandler.java | 42 import com.android.contacts.model.AccountType; 176 final AccountType accountType = AccountTypeManager.getInstance(mContext).getAccountType( 180 delta, accountType, Photo.CONTENT_ITEM_TYPE);
|
/packages/apps/Contacts/tests/src/com/android/contacts/interactions/ |
ContactDeletionInteractionTest.java | 21 import com.android.contacts.model.AccountType; 86 AccountType readOnlyAccountType = new BaseAccountType() { 92 readOnlyAccountType.accountType = READONLY_ACCOUNT_TYPE; 94 AccountType writableAccountType = new BaseAccountType() { 100 writableAccountType.accountType = WRITABLE_ACCOUNT_TYPE; 104 new AccountType[] { writableAccountType, readOnlyAccountType }, null));
|
/packages/apps/Contacts/src/com/android/contacts/util/ |
AccountsListAdapter.java | 20 import com.android.contacts.model.AccountType; 94 final AccountType accountType = mAccountTypes.getAccountType(account.type, account.dataSet); 96 text1.setText(accountType.getDisplayLabel(mContext)); 103 icon.setImageDrawable(accountType.getDisplayIcon(mContext));
|
/packages/apps/Contacts/tests/src/com/android/contacts/editor/ |
ContactEditorUtilsTest.java | 20 import com.android.contacts.model.AccountType; 52 "a", TYPE1.accountType, TYPE1.dataSet); 54 "b", TYPE1.accountType, TYPE1.dataSet); 57 "a", TYPE2.accountType, TYPE2.dataSet); 59 "a", TYPE2EX.accountType, TYPE2EX.dataSet); 62 "c", TYPE3.accountType, TYPE3.dataSet); 67 mAccountTypes = new MockAccountTypeManager(new AccountType[] {}, 75 private void setAccountTypes(AccountType... types) { 96 MoreAsserts.assertEquals(Sets.newHashSet(TYPE1.accountType), Sets.newHashSet(types)); 102 MoreAsserts.assertEquals(Sets.newHashSet(TYPE1.accountType, TYPE2EX.accountType) [all...] |
/packages/apps/Contacts/src/com/android/contacts/activities/ |
GroupDetailActivity.java | 23 import com.android.contacts.model.AccountType; 134 final AccountType accountType = 137 || TextUtils.isEmpty(accountType.getViewGroupActivity())) { 150 intent.setClassName(accountType.syncAdapterPackageName, 151 accountType.getViewGroupActivity());
|
ContactEditorActivity.java | 24 import com.android.contacts.model.AccountType; 206 final AccountType accountType = accountTypes.getAccountType( 210 intent.setClassName(accountType.syncAdapterPackageName, 211 accountType.getCreateContactActivityClassName()); 231 final AccountType accountType = accountTypes.getAccountType( 235 intent.setClassName(accountType.syncAdapterPackageName, 236 accountType.getEditContactActivityClassName());
|
AttachPhotoActivity.java | 38 import com.android.contacts.model.AccountType; 197 AccountType account = raw.getRawContactAccountType(this);
|
/packages/apps/Contacts/src/com/android/contacts/list/ |
ContactListFilterView.java | 21 import com.android.contacts.model.AccountType; 84 mAccountType = (TextView) findViewById(R.id.accountType); 125 final AccountType accountType = 126 accountTypes.getAccountType(mFilter.accountType, mFilter.dataSet); 128 mAccountType.setText(accountType.getDisplayLabel(getContext()));
|
AccountFilterActivity.java | 21 import com.android.contacts.model.AccountType; 120 AccountType accountType = accountTypes.getAccountType(account.type, account.dataSet); 121 if (accountType.isExtension() && !account.hasData(context)) { 125 Drawable icon = accountType != null ? accountType.getDisplayIcon(context) : null;
|
/packages/apps/Contacts/tests/src/com/android/contacts/activities/ |
PeopleActivityTest.java | 25 import com.android.contacts.model.AccountType; 97 AccountType accountType = new BaseAccountType() { 103 accountType.accountType = TEST_ACCOUNT_TYPE; 109 new AccountType[] { accountType }, new AccountWithDataSet[] { account }));
|