Home | History | Annotate | Download | only in account

Lines Matching defs:accountType

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);
95 List<AccountType> types = mCache.get(accountType);
97 types = loadTypes(accountType);
98 mCache.put(accountType, types);
109 final List<AccountType> accountTypes = getAccountTypes(type);
110 for (AccountType accountType : accountTypes) {
111 if (Objects.equal(accountType.dataSet, dataSet)) {
119 * Returns the AccountType with the matching type and dataSet or null if no account with those
122 public AccountType getType(String type, String dataSet) {
123 final List<AccountType> accountTypes = getAccountTypes(type);
124 for (AccountType accountType : accountTypes) {
125 if (Objects.equal(accountType.dataSet, dataSet)) {
126 return accountType;
133 * Returns the AccountType for a particular account or null if no account type exists for the
136 public AccountType getTypeForAccount(AccountWithDataSet account) {
153 public boolean supportsContactsSyncing(String accountType) {
154 return mAuthTypes.containsKey(accountType);
157 private List<AccountType> loadTypes(String type) {
166 AccountType accountType;
168 accountType = new GoogleAccountType(mContext, auth.packageName);
170 accountType = new ExchangeAccountType(mContext, auth.packageName, type);
173 accountType = new SamsungAccountType(mContext, auth.packageName, type);
180 accountType = mLocalAccountTypeFactory.getAccountType(type);
186 accountType = new ExternalAccountType(mContext, auth.packageName, false);
188 if (!accountType.isInitialized()) {
189 if (accountType.isEmbedded()) {
191 + accountType.getClass().getCanonicalName());
202 accountType.initializeFieldsFromAuthenticator(auth);
204 final ImmutableList.Builder<AccountType> result = ImmutableList.builder();
205 result.add(accountType);
207 for (String extensionPackage : accountType.getExtensionPackageNames()) {
219 if (TextUtils.isEmpty(extensionType.accountType)) {
221 + " the CONTACTS_STRUCTURE metadata doesn't have the accountType"
225 if (!Objects.equal(extensionType.accountType, type)) {
227 + " the account type + " + extensionType.accountType +
233 + accountType.accountType + ", dataSet=" + accountType.dataSet
247 mContactSyncableTypes.add(type.accountType);