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

1 2 3

  /packages/apps/Contacts/tests/src/com/android/contacts/tests/
FakeDeviceAccountTypeFactory.java 18 import com.android.contacts.model.account.AccountType;
26 private final Map<String, AccountType> mDeviceAccountTypes = new HashMap<>();
27 private final Map<String, AccountType> mSimAccountTypes = new HashMap<>();
30 public int classifyAccount(String accountType) {
31 if (mDeviceAccountTypes.containsKey(accountType)) {
33 } else if (mSimAccountTypes.containsKey(accountType)) {
41 public AccountType getAccountType(String accountType) {
42 final AccountType type = mDeviceAccountTypes.get(accountType);
    [all...]
FakeAccountType.java 24 import com.android.contacts.model.account.AccountType;
27 public class FakeAccountType extends AccountType {
54 accountType = type;
77 public static FakeAccountType create(String accountType, String label) {
79 result.accountType = accountType;
84 public static FakeAccountType create(String accountType, String label, Drawable icon) {
86 result.accountType = accountType;
92 public static AccountType create(AccountWithDataSet account, String label, Drawable icon)
    [all...]
  /packages/apps/Contacts/tests/src/com/android/contacts/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/Contacts/tests/src/com/android/contacts/test/mocks/
MockAccountTypeManager.java 22 import com.android.contacts.model.account.AccountType;
38 public AccountType[] mTypes;
41 public MockAccountTypeManager(AccountType[] types, AccountWithDataSet[] accounts) {
47 public AccountType getAccountType(AccountTypeWithDataSet accountTypeWithDataSet) {
48 // Add fallback accountType to mimic the behavior of AccountTypeManagerImpl
49 AccountType mFallbackAccountType = new BaseAccountType() {
55 mFallbackAccountType.accountType = "fallback";
56 for (AccountType type : mTypes) {
57 if (Objects.equal(accountTypeWithDataSet.accountType, type.accountType)
    [all...]
  /packages/apps/Dialer/java/com/android/contacts/common/model/
AccountTypeManager.java 47 import com.android.contacts.common.model.account.AccountType;
71 * Singleton holder for all parsed {@link AccountType} available on the system, typically filled
118 public abstract AccountType getAccountType(AccountTypeWithDataSet accountTypeWithDataSet);
120 public final AccountType getAccountType(String accountType, String dataSet) {
121 return getAccountType(AccountTypeWithDataSet.get(accountType, dataSet));
124 public final AccountType getAccountTypeForAccount(AccountWithDataSet account) {
132 * @return Unmodifiable map from {@link AccountTypeWithDataSet}s to {@link AccountType}s which
142 public abstract Map<AccountTypeWithDataSet, AccountType> getUsableInvitableAccountTypes();
145 * Find the best {@link DataKind} matching the requested {@link AccountType#accountType}, {@lin
    [all...]
Contact.java 27 import com.android.contacts.common.model.account.AccountType;
66 private ImmutableList<AccountType> mInvitableAccountTypes;
201 String accountType,
206 mDirectoryAccountType = accountType;
289 public ImmutableList<AccountType> getInvitableAccountTypes() {
293 /* package */ void setInvitableAccountTypes(ImmutableList<AccountType> accountTypes) {
  /packages/apps/Contacts/src/com/android/contacts/util/
DeviceLocalAccountTypeFactory.java 21 import com.android.contacts.model.account.AccountType;
41 @DeviceLocalAccountTypeFactory.LocalAccountType int classifyAccount(String accountType);
43 AccountType getAccountType(String accountType);
67 public int classifyAccount(String accountType) {
68 return accountType == null ? TYPE_DEVICE : TYPE_OTHER;
72 public AccountType getAccountType(String accountType) {
73 if (accountType != null) {
74 throw new IllegalArgumentException(accountType + " is not a device account type.")
    [all...]
  /packages/apps/Contacts/src/com/android/contacts/editor/
KindSectionData.java 23 import com.android.contacts.model.account.AccountType;
24 import com.android.contacts.model.account.AccountType.EditField;
35 private final AccountType mAccountType;
39 public KindSectionData(AccountType accountType, DataKind dataKind,
41 mAccountType = accountType;
46 public AccountType getAccountType() {
RawContactDeltaComparator.java 24 import com.android.contacts.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...]
  /packages/apps/Contacts/src/com/android/contacts/model/account/
AccountTypeProvider.java 44 * Provides access to {@link AccountType}s with contact data
57 private final ConcurrentMap<String, List<AccountType>> mCache = new ConcurrentHashMap<>();
79 * <p>There are many {@link AccountType}s for each accountType because {@AccountType} includes
84 public List<AccountType> getAccountTypes(String accountType) {
86 if (accountType == null) {
87 AccountType type = mLocalAccountTypeFactory.getAccountType(accountType);
    [all...]
AccountInfo.java 30 * Holds an {@link AccountWithDataSet} and the corresponding {@link AccountType} for an account.
35 private final AccountType mType;
37 public AccountInfo(AccountDisplayInfo displayInfo, AccountType type) {
42 public AccountType getType() {
AccountType.java 54 public abstract class AccountType {
55 private static final String TAG = "AccountType";
60 public String accountType = null;
184 return getResourceText(context, syncAdapterPackageName, titleRes, accountType);
190 * <p>The {@link AccountWithDataSet#type} must match {@link #accountType} of this instance</p>
193 Preconditions.checkArgument(Objects.equal(account.type, accountType),
194 "Account types must match: account.type=%s but accountType=%s",
195 account.type, accountType);
220 return AccountTypeWithDataSet.get(accountType, dataSet);
326 accountType = authenticator.type
    [all...]
  /packages/apps/Contacts/tests/src/com/android/contacts/model/
AccountTypeManagerTest.java 25 import com.android.contacts.model.account.AccountType;
68 private static AccountWithDataSet createAccountWithDataSet(String name, AccountType type) {
69 return new AccountWithDataSet(name, type.accountType, type.dataSet);
73 * Array of {@link AccountType} -> {@link Map}
75 private static Map<AccountTypeWithDataSet, AccountType> buildAccountTypes(AccountType... types) {
76 final HashMap<AccountTypeWithDataSet, AccountType> result = Maps.newHashMap();
77 for (AccountType type : types) {
RawContactModifierTests.java 37 import com.android.contacts.model.account.AccountType;
38 import com.android.contacts.model.account.AccountType.EditType;
51 * Tests for {@link RawContactModifier} to verify that {@link AccountType}
80 public static class MockContactsSource extends AccountType {
84 this.accountType = TEST_ACCOUNT_TYPE;
148 * Build a {@link AccountType} that has various odd constraints for
151 protected AccountType getAccountType() {
158 protected AccountTypeManager getAccountTypes(AccountType... types) {
200 final AccountType source = getAccountType();
245 final AccountType source = getAccountType()
    [all...]
  /packages/apps/Contacts/src/com/android/contacts/model/dataitem/
DataKind.java 23 import com.android.contacts.model.account.AccountType.EditField;
24 import com.android.contacts.model.account.AccountType.EditType;
25 import com.android.contacts.model.account.AccountType.StringInflater;
  /packages/apps/Dialer/java/com/android/contacts/common/model/dataitem/
DataKind.java 22 import com.android.contacts.common.model.account.AccountType.EditField;
23 import com.android.contacts.common.model.account.AccountType.EditType;
24 import com.android.contacts.common.model.account.AccountType.StringInflater;
  /packages/apps/Contacts/tests/src/com/android/contacts/interactions/
ContactDeletionInteractionTest.java 29 import com.android.contacts.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/Contacts/src/com/android/contacts/model/
AccountTypeManager.java 44 import com.android.contacts.model.account.AccountType;
72 * Singleton holder for all parsed {@link AccountType} available on the
161 public AccountType getAccountType(AccountTypeWithDataSet accountTypeWithDataSet) {
224 GoogleAccountType.ACCOUNT_TYPE.equals(input.getType().accountType);
272 public abstract AccountType getAccountType(AccountTypeWithDataSet accountTypeWithDataSet);
274 public final AccountType getAccountType(String accountType, String dataSet) {
275 return getAccountType(AccountTypeWithDataSet.get(accountType, dataSet));
278 public final AccountType getAccountTypeForAccount(AccountWithDataSet account) {
287 * {@link AccountType#accountType}, {@link AccountType#dataSet}, and {@link DataKind#mimeType}
    [all...]
  /packages/apps/Dialer/java/com/android/contacts/common/model/account/
AccountType.java 48 public abstract class AccountType {
50 private static final String TAG = "AccountType";
60 public String accountType = null;
212 return getResourceText(context, syncAdapterPackageName, titleRes, accountType);
227 return AccountTypeWithDataSet.get(accountType, dataSet);
479 * Compare two {@link AccountType} by their {@link AccountType#getDisplayLabel} with the current
482 public static class DisplayLabelComparator implements Comparator<AccountType> {
492 private String getDisplayLabel(AccountType type) {
498 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/quickcontact/
InvisibleContactUtil.java 17 import com.android.contacts.model.account.AccountType;
53 final AccountType type = rawContact.getAccountType(context);
98 final AccountType type = rawContactEntityDelta.getAccountType(accountTypes);
  /packages/apps/Dialer/java/com/android/contacts/common/
MoreContactUtils.java 26 import com.android.contacts.common.model.account.AccountType;
197 * AccountType#getInviteContactActivityClassName()} or {@link
198 * AccountType#syncAdapterPackageName}).
200 public static Intent getInvitableIntent(AccountType accountType, Uri lookupUri) {
201 String syncAdapterPackageName = accountType.syncAdapterPackageName;
202 String className = accountType.getInviteContactActivityClassName();
  /packages/apps/Contacts/tests/src/com/android/contacts/util/
AccountDisplayInfoFactoryTests.java 28 import com.android.contacts.model.account.AccountType;
41 private Map<AccountWithDataSet, AccountType> mKnownTypes;
178 final Map<AccountWithDataSet, AccountType> mapping) {
179 return new MockAccountTypeManager(mapping.values().toArray(new AccountType[mapping.size()]),
  /packages/apps/Contacts/src/com/android/contacts/
MoreContactUtils.java 29 import com.android.contacts.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/Contacts/src/com/android/contacts/group/
GroupMetaData.java 29 import com.android.contacts.model.account.AccountType;
49 public final String accountType;
66 final AccountType accountType = accountTypeManager.getAccountType(
69 final boolean editable = accountType == null
70 ? false : accountType.isGroupMembershipEditable();
74 this.accountType = cursor.getString(GroupMetaDataLoader.ACCOUNT_TYPE);
91 accountType = source.readString();
105 dest.writeString(accountType);
132 .add("accountType", accountType
    [all...]

Completed in 513 milliseconds

1 2 3