HomeSort by relevance Sort by last modified time
    Searched refs:AccountType (Results 1 - 25 of 51) sorted by null

1 2 3

  /packages/apps/ContactsCommon/TestCommon/src/com/android/contacts/common/test/mocks/
MockAccountTypeManager.java 19 import com.android.contacts.common.model.account.AccountType;
36 public AccountType[] mTypes;
39 public MockAccountTypeManager(AccountType[] types, AccountWithDataSet[] accounts) {
45 public AccountType getAccountType(AccountTypeWithDataSet accountTypeWithDataSet) {
46 // Add fallback accountType to mimic the behavior of AccountTypeManagerImpl
47 AccountType mFallbackAccountType = new BaseAccountType() {
53 mFallbackAccountType.accountType = "fallback";
54 for (AccountType type : mTypes) {
55 if (Objects.equal(accountTypeWithDataSet.accountType, type.accountType)
    [all...]
  /packages/apps/ContactsCommon/tests/src/com/android/contacts/common/model/
AccountTypeManagerTest.java 23 import com.android.contacts.common.model.account.AccountType;
46 final AccountType typeA = new MockAccountType("type1", null, null);
47 final AccountType typeB = new MockAccountType("type1", "minus", null);
48 final AccountType typeC = new MockAccountType("type2", null, "c");
49 final AccountType typeD = new MockAccountType("type2", "minus", "d");
58 Map<AccountTypeWithDataSet, AccountType> types =
129 private static AccountWithDataSet createAccountWithDataSet(String name, AccountType type) {
130 return new AccountWithDataSet(name, type.accountType, type.dataSet);
134 * Array of {@link AccountType} -> {@link Map}
136 private static Map<AccountTypeWithDataSet, AccountType> buildAccountTypes(AccountType... types)
    [all...]
  /packages/apps/ContactsCommon/tests/src/com/android/contacts/common/model/account/
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/ContactsCommon/src/com/android/contacts/common/model/
AccountTypeManager.java 46 import com.android.contacts.common.model.account.AccountType;
73 * Singleton holder for all parsed {@link AccountType} available on the
122 public abstract AccountType getAccountType(AccountTypeWithDataSet accountTypeWithDataSet);
124 public final AccountType getAccountType(String accountType, String dataSet) {
125 return getAccountType(AccountTypeWithDataSet.get(accountType, dataSet));
128 public final AccountType getAccountTypeForAccount(AccountWithDataSet account) {
133 * @return Unmodifiable map from {@link AccountTypeWithDataSet}s to {@link AccountType}s
145 public abstract Map<AccountTypeWithDataSet, AccountType> getUsableInvitableAccountTypes();
149 * {@link AccountType#accountType}, {@link AccountType#dataSet}, and {@link DataKind#mimeType}
    [all...]
Contact.java 28 import com.android.contacts.common.model.account.AccountType;
77 private ImmutableList<AccountType> mInvitableAccountTypes;
214 String accountType, String accountName, int exportSupport) {
217 mDirectoryAccountType = accountType;
357 public ImmutableList<AccountType> getInvitableAccountTypes() {
396 AccountType accountType = rawContact.getAccountType(context);
397 if (accountType != null && accountType.areContactsWritable()) {
489 /* package */ void setInvitableAccountTypes(ImmutableList<AccountType> accountTypes)
    [all...]
RawContactModifier.java 55 import com.android.contacts.common.model.account.AccountType;
56 import com.android.contacts.common.model.account.AccountType.EditField;
57 import com.android.contacts.common.model.account.AccountType.EditType;
58 import com.android.contacts.common.model.account.AccountType.EventEditType;
77 * new rows, or enforcing {@link AccountType}.
88 * {@link AccountType}.
114 RawContactDelta state, AccountType accountType, String mimeType) {
115 final DataKind kind = accountType.getKindForMimetype(mimeType);
137 * {@link AccountType}
    [all...]
  /packages/apps/Contacts/src/com/android/contacts/group/
GroupDetailDisplayUtils.java 27 import com.android.contacts.common.model.account.AccountType;
44 AccountType accountType = accountTypeManager.getAccountType(accountTypeString, dataSet);
51 label.setText(accountType.getViewGroupLabel(context));
58 accountIcon.setImageDrawable(accountType.getDisplayIcon(context));
GroupBrowseListAdapter.java 32 import com.android.contacts.common.model.account.AccountType;
120 String accountType = mCursor.getString(GroupListLoader.ACCOUNT_TYPE);
137 accountType.equals(previousGroupAccountType) &&
143 return new GroupListItem(accountName, accountType, dataSet, groupId, title,
198 AccountType accountType = mAccountTypeManager.getAccountType(
200 viewCache.accountType.setText(accountType.getDisplayLabel(mContext));
213 public final TextView accountType;
223 accountType = (TextView) view.findViewById(R.id.account_type)
    [all...]
  /packages/apps/Contacts/src/com/android/contacts/editor/
BaseRawContactEditorView.java 34 import com.android.contacts.common.model.account.AccountType;
35 import com.android.contacts.common.model.account.AccountType.EditType;
44 * {@link RawContactModifier} to ensure that {@link AccountType} are enforced.
117 * {@link RawContactDelta} state and the {@link AccountType} that
120 public abstract void setState(RawContactDelta state, AccountType source, ViewIdGenerator vig,
AggregationSuggestionView.java 33 import com.android.contacts.common.model.account.AccountType;
120 String accountType = rawContact.accountType;
122 if (accountType == null) {
125 AccountType type = accountTypes.getAccountType(accountType, dataSet);
ContactEditorUtils.java 31 import com.android.contacts.common.model.account.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/ContactsCommon/src/com/android/contacts/common/model/dataitem/
DataKind.java 23 import com.android.contacts.common.model.account.AccountType.EditField;
24 import com.android.contacts.common.model.account.AccountType.EditType;
25 import com.android.contacts.common.model.account.AccountType.StringInflater;
  /packages/apps/ContactsCommon/tests/src/com/android/contacts/common/
RawContactModifierTests.java 47 import com.android.contacts.common.model.account.AccountType;
48 import com.android.contacts.common.model.account.AccountType.EditType;
61 * Tests for {@link RawContactModifier} to verify that {@link AccountType}
87 public static class MockContactsSource extends AccountType {
91 this.accountType = TEST_ACCOUNT_TYPE;
155 * Build a {@link AccountType} that has various odd constraints for
158 protected AccountType getAccountType() {
165 protected AccountTypeManager getAccountTypes(AccountType... types) {
207 final AccountType source = getAccountType();
252 final AccountType source = getAccountType()
    [all...]
  /packages/apps/Contacts/tests/src/com/android/contacts/interactions/
ContactDeletionInteractionTest.java 35 import com.android.contacts.common.model.account.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/ContactsCommon/src/com/android/contacts/common/model/account/
AccountType.java 50 public abstract class AccountType {
51 private static final String TAG = "AccountType";
56 public String accountType = null;
202 return getResourceText(context, syncAdapterPackageName, titleRes, accountType);
223 return AccountTypeWithDataSet.get(accountType, dataSet);
499 * Compare two {@link AccountType} by their {@link AccountType#getDisplayLabel} with the
502 public static class DisplayLabelComparator implements Comparator<AccountType> {
511 private String getDisplayLabel(AccountType type) {
517 public int compare(AccountType lhs, AccountType rhs)
    [all...]
FallbackAccountType.java 30 this.accountType = null;
70 static AccountType createWithPackageNameForTest(Context context, String resPackageName) {
  /packages/apps/Contacts/src/com/android/contacts/quickcontact/
InvisibleContactUtil.java 15 import com.android.contacts.common.model.account.AccountType;
53 final AccountType type = rawContact.getAccountType(context);
84 final AccountType type = rawContactEntityDelta.getAccountType(accountTypes);
  /packages/apps/Contacts/tests/src/com/android/contacts/editor/
ContactEditorUtilsTest.java 23 import com.android.contacts.common.model.account.AccountType;
50 "a", TYPE1.accountType, TYPE1.dataSet);
52 "b", TYPE1.accountType, TYPE1.dataSet);
55 "a", TYPE2.accountType, TYPE2.dataSet);
57 "a", TYPE2EX.accountType, TYPE2EX.dataSet);
60 "c", TYPE3.accountType, TYPE3.dataSet);
65 mAccountTypes = new MockAccountTypeManager(new AccountType[] {},
73 private void setAccountTypes(AccountType... types) {
94 MoreAsserts.assertEquals(Sets.newHashSet(TYPE1.accountType), Sets.newHashSet(types));
100 MoreAsserts.assertEquals(Sets.newHashSet(TYPE1.accountType, TYPE2EX.accountType)
    [all...]
  /packages/apps/Contacts/src/com/android/contacts/activities/
GroupDetailActivity.java 37 import com.android.contacts.common.model.account.AccountType;
134 final AccountType accountType =
137 || TextUtils.isEmpty(accountType.getViewGroupActivity())) {
150 intent.setClassName(accountType.syncAdapterPackageName,
151 accountType.getViewGroupActivity());
ContactEditorActivity.java 41 import com.android.contacts.common.model.account.AccountType;
222 final AccountType accountType = accountTypes.getAccountType(
226 intent.setClassName(accountType.syncAdapterPackageName,
227 accountType.getCreateContactActivityClassName());
247 final AccountType accountType = accountTypes.getAccountType(
251 intent.setClassName(accountType.syncAdapterPackageName,
252 accountType.getEditContactActivityClassName());
AttachPhotoActivity.java 45 import com.android.contacts.common.model.account.AccountType;
256 AccountType account = raw.getRawContactAccountType(this);
  /packages/apps/ContactsCommon/src/com/android/contacts/common/
MoreContactUtils.java 32 import com.android.contacts.common.model.account.AccountType;
217 * {@link AccountType#getInviteContactActivityClassName()} or
218 * {@link AccountType#syncAdapterPackageName}).
220 public static Intent getInvitableIntent(AccountType accountType, Uri lookupUri) {
221 String syncAdapterPackageName = accountType.syncAdapterPackageName;
222 String className = accountType.getInviteContactActivityClassName();
  /packages/apps/ContactsCommon/src/com/android/contacts/common/list/
ContactListFilterView.java 30 import com.android.contacts.common.model.account.AccountType;
82 mAccountType = (TextView) findViewById(R.id.accountType);
123 final AccountType accountType =
124 accountTypes.getAccountType(mFilter.accountType, mFilter.dataSet);
126 mAccountType.setText(accountType.getDisplayLabel(getContext()));
  /packages/apps/ContactsCommon/src/com/android/contacts/common/util/
AccountsListAdapter.java 30 import com.android.contacts.common.model.account.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/activities/
PeopleActivityTest.java 45 import com.android.contacts.common.model.account.AccountType;
101 AccountType accountType = new BaseAccountType() {
107 accountType.accountType = TEST_ACCOUNT_TYPE;
113 new AccountType[] { accountType }, new AccountWithDataSet[] { account });

Completed in 404 milliseconds

1 2 3