HomeSort by relevance Sort by last modified time
    Searched refs:AccountType (Results 1 - 25 of 56) 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;
74 * Singleton holder for all parsed {@link AccountType} available on the
123 public abstract AccountType getAccountType(AccountTypeWithDataSet accountTypeWithDataSet);
125 public final AccountType getAccountType(String accountType, String dataSet) {
126 return getAccountType(AccountTypeWithDataSet.get(accountType, dataSet));
129 public final AccountType getAccountTypeForAccount(AccountWithDataSet account) {
137 * @return Unmodifiable map from {@link AccountTypeWithDataSet}s to {@link AccountType}s
149 public abstract Map<AccountTypeWithDataSet, AccountType> getUsableInvitableAccountTypes();
153 * {@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));
  /packages/apps/Contacts/src/com/android/contacts/editor/
RawContactDeltaComparator.java 21 import com.android.contacts.common.model.account.AccountType;
50 final AccountType type1 = accountTypes.getAccountType(accountType1, dataSet1);
53 final AccountType type2 = accountTypes.getAccountType(accountType2, dataSet2);
77 if (type1.accountType != null && type2.accountType == null) {
79 } else if (type1.accountType == null && type2.accountType != null) {
83 if (type1.accountType != null && type2.accountType != null) {
84 value = type1.accountType.compareTo(type2.accountType)
    [all...]
EditorUiUtils.java 28 import com.android.contacts.common.model.account.AccountType;
90 String accountName, AccountType accountType) {
91 CharSequence accountTypeDisplayLabel = accountType.getDisplayLabel(context);
111 if (GoogleAccountType.ACCOUNT_TYPE.equals(accountType.accountType)
112 && accountType.dataSet == null) {
130 CharSequence accountType) {
132 if (!TextUtils.isEmpty(accountType)) {
133 builder.append(accountType).append('\n')
    [all...]
CompactRawContactsEditorView.java 25 import com.android.contacts.common.model.account.AccountType;
26 import com.android.contacts.common.model.account.AccountType.EditField;
337 AccountType accountType = null;
340 accountType = rawContactDelta.getAccountType(mAccountTypeManager);
341 if (accountType != null && accountType.areContactsWritable()) {
351 if (accountType == null) {
359 isUserProfile, defaultAccountRawContactDelta.getAccountName(), accountType);
389 final AccountType accountType = rawContactDelta.getAccountType(mAccountTypeManager)
    [all...]
AggregationSuggestionView.java 34 import com.android.contacts.common.model.account.AccountType;
121 String accountType = rawContact.accountType;
123 if (accountType == null) {
126 AccountType type = accountTypes.getAccountType(accountType, dataSet);
BaseRawContactEditorView.java 37 import com.android.contacts.common.model.account.AccountType;
38 import com.android.contacts.common.model.account.AccountType.EditType;
48 * {@link RawContactModifier} to ensure that {@link AccountType} are enforced.
212 * {@link RawContactDelta} state and the {@link AccountType} that
215 public abstract void setState(RawContactDelta state, AccountType source, ViewIdGenerator vig,
  /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 34 import com.android.contacts.common.model.account.AccountType;
79 AccountType readOnlyAccountType = new BaseAccountType() {
85 readOnlyAccountType.accountType = READONLY_ACCOUNT_TYPE;
87 AccountType writableAccountType = new BaseAccountType() {
93 writableAccountType.accountType = WRITABLE_ACCOUNT_TYPE;
97 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 38 import com.android.contacts.common.model.account.AccountType;
135 final AccountType accountType =
138 || TextUtils.isEmpty(accountType.getViewGroupActivity())) {
151 intent.setClassName(accountType.syncAdapterPackageName,
152 accountType.getViewGroupActivity());
ContactEditorBaseActivity.java 23 import com.android.contacts.common.model.account.AccountType;
334 final AccountType accountType = accountTypes.getAccountType(
338 intent.setClassName(accountType.syncAdapterPackageName,
339 accountType.getCreateContactActivityClassName());
359 final AccountType accountType = accountTypes.getAccountType(
363 intent.setClassName(accountType.syncAdapterPackageName,
364 accountType.getEditContactActivityClassName());
  /packages/apps/ContactsCommon/src/com/android/contacts/common/
MoreContactUtils.java 32 import com.android.contacts.common.model.account.AccountType;
225 * {@link AccountType#getInviteContactActivityClassName()} or
226 * {@link AccountType#syncAdapterPackageName}).
228 public static Intent getInvitableIntent(AccountType accountType, Uri lookupUri) {
229 String syncAdapterPackageName = accountType.syncAdapterPackageName;
230 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 44 import com.android.contacts.common.model.account.AccountType;
94 AccountType accountType = new BaseAccountType() {
100 accountType.accountType = TEST_ACCOUNT_TYPE;
106 new AccountType[] { accountType }, new AccountWithDataSet[] { account });

Completed in 317 milliseconds

1 2 3