Home
last modified time | relevance | path

Searched refs:account (Results 1 – 25 of 284) sorted by relevance

12345678910>>...12

/packages/apps/Contacts/tests/src/com/android/contacts/util/
DAccountDisplayInfoFactoryTests.java26 import com.android.contacts.model.account.AccountDisplayInfo;
27 import com.android.contacts.model.account.AccountDisplayInfoFactory;
28 import com.android.contacts.model.account.AccountType;
29 import com.android.contacts.model.account.AccountWithDataSet;
52 addTypeMapping(account("user", "com.example"), "title", comExampleIcon); in test_displayableAccount_hasIconFromAccountType()
53 addTypeMapping(account(null, null), "device", someDrawable()); in test_displayableAccount_hasIconFromAccountType()
54 addTypeMapping(account("foo", "bar.type"), "bar", someDrawable()); in test_displayableAccount_hasIconFromAccountType()
55 addTypeMapping(account("user2", "com.example"), "title", comExampleIcon); in test_displayableAccount_hasIconFromAccountType()
60 account("user", "com.example")); in test_displayableAccount_hasIconFromAccountType()
67 addTypeMapping(account("user@example.com", "com.example"), "title", comExampleIcon); in test_displayableAccount_hasNameFromAccount()
[all …]
/packages/apps/Contacts/src/com/android/contacts/util/
DSyncUtil.java26 import com.android.contacts.model.account.AccountWithDataSet;
27 import com.android.contacts.model.account.GoogleAccountType;
44 public static final boolean isSyncStatusPendingOrActive(Account account) { in isSyncStatusPendingOrActive() argument
45 if (account == null) { in isSyncStatusPendingOrActive()
48 return ContentResolver.isSyncPending(account, ContactsContract.AUTHORITY) in isSyncStatusPendingOrActive()
49 || ContentResolver.isSyncActive(account, ContactsContract.AUTHORITY); in isSyncStatusPendingOrActive()
68 public static final boolean isUnsyncableGoogleAccount(Account account) { in isUnsyncableGoogleAccount() argument
69 if (account == null || !GoogleAccountType.ACCOUNT_TYPE.equals(account.type)) { in isUnsyncableGoogleAccount()
72 return ContentResolver.getIsSyncable(account, ContactsContract.AUTHORITY) <= 0; in isUnsyncableGoogleAccount()
79 public static boolean isAlertVisible(Context context, Account account, int reason) { in isAlertVisible() argument
[all …]
DAccountSelectionUtil.java37 import com.android.contacts.model.account.AccountType;
38 import com.android.contacts.model.account.AccountWithDataSet;
122 final AccountWithDataSet account = this.getItem(position); in getSelectAccountDialog()
124 account.type, account.dataSet); in getSelectAccountDialog()
128 text2.setText(account.name); in getSelectAccountDialog()
157 public static void doImport(Activity activity, int resId, AccountWithDataSet account, in doImport() argument
160 doImportFromSim(activity, account, subscriptionId); in doImport()
162 doImportFromVcfFile(activity, account); in doImport()
166 public static void doImportFromSim(Context context, AccountWithDataSet account, in doImportFromSim() argument
170 if (account != null) { in doImportFromSim()
[all …]
DAccountFilterUtil.java43 import com.android.contacts.model.account.AccountDisplayInfo;
44 import com.android.contacts.model.account.AccountDisplayInfoFactory;
45 import com.android.contacts.model.account.AccountInfo;
46 import com.android.contacts.model.account.AccountType;
47 import com.android.contacts.model.account.AccountWithDataSet;
143 final AccountWithDataSet account = accountInfo.getAccount(); in getFiltersForAccounts() local
146 mDeviceLocalFactory, account.type)) && in getFiltersForAccounts()
147 !account.hasData(getContext())) { in getFiltersForAccounts()
154 mDeviceLocalFactory, account.type)) { in getFiltersForAccounts()
155 accountFilters.add(ContactListFilter.createDeviceContactsFilter(icon, account)); in getFiltersForAccounts()
[all …]
/packages/apps/Contacts/src/com/android/contacts/model/
DAccountTypeManager.java43 import com.android.contacts.model.account.AccountInfo;
44 import com.android.contacts.model.account.AccountType;
45 import com.android.contacts.model.account.AccountTypeProvider;
46 import com.android.contacts.model.account.AccountTypeWithDataSet;
47 import com.android.contacts.model.account.AccountWithDataSet;
48 import com.android.contacts.model.account.FallbackAccountType;
49 import com.android.contacts.model.account.GoogleAccountType;
152 public AccountInfo getAccountInfoForAccount(AccountWithDataSet account) {
205 public abstract AccountInfo getAccountInfoForAccount(AccountWithDataSet account); in getAccountInfoForAccount() argument
279 public final AccountType getAccountTypeForAccount(AccountWithDataSet account) {
[all …]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/accounts/
DAccountSyncFragment.java87 public static AccountSyncFragment newInstance(Account account) { in newInstance() argument
89 prepareArgs(b, account); in newInstance()
95 public static void prepareArgs(Bundle b, Account account) { in prepareArgs() argument
96 b.putParcelable(ARG_ACCOUNT, account); in prepareArgs()
156 Account account = syncPref.getAccount(); in onPreferenceTreeClick() local
159 requestOrCancelSync(account, authority, true); in onPreferenceTreeClick()
162 boolean oldSyncState = ContentResolver.getSyncAutomaticallyAsUser(account, in onPreferenceTreeClick()
166 ContentResolver.setSyncAutomaticallyAsUser(account, authority, syncOn, userId); in onPreferenceTreeClick()
171 requestOrCancelSync(account, authority, syncOn); in onPreferenceTreeClick()
228 private void requestOrCancelSync(Account account, String authority, boolean flag) { in requestOrCancelSync() argument
[all …]
/packages/apps/Contacts/src/com/android/contacts/list/
DCustomContactListFilterActivity.java62 import com.android.contacts.model.account.AccountInfo;
63 import com.android.contacts.model.account.AccountWithDataSet;
64 import com.android.contacts.model.account.GoogleAccountType;
165 final AccountWithDataSet account = info.getAccount(); in createAccountSet() local
168 if (account.isNullAccount()) { in createAccountSet()
175 .appendQueryParameter(Groups.ACCOUNT_NAME, account.name) in createAccountSet()
176 .appendQueryParameter(Groups.ACCOUNT_TYPE, account.type); in createAccountSet()
177 if (account.dataSet != null) { in createAccountSet()
178 groupsUri.appendQueryParameter(Groups.DATA_SET, account.dataSet).build(); in createAccountSet()
199 GroupDelta.fromSettings(resolver, account.name, account.type, in createAccountSet()
[all …]
DContactListFilter.java29 import com.android.contacts.model.account.AccountWithDataSet;
30 import com.android.contacts.model.account.GoogleAccountType;
102 AccountWithDataSet account) { in createDeviceContactsFilter() argument
104 account.type, account.name, account.dataSet, icon); in createDeviceContactsFilter()
416 for (AccountWithDataSet account : accounts) { in isSyncable()
417 if (GoogleAccountType.ACCOUNT_TYPE.equals(account.type) in isSyncable()
418 && account.dataSet == null) { in isSyncable()
446 for (AccountWithDataSet account : accounts) { in getSyncableAccounts()
447 if (GoogleAccountType.ACCOUNT_TYPE.equals(account.type) in getSyncableAccounts()
448 && account.dataSet == null) { in getSyncableAccounts()
[all …]
/packages/apps/Contacts/tests/src/com/android/contacts/tests/
DAccountsTestHelper.java31 import com.android.contacts.model.account.AccountWithDataSet;
62 public void addTestAccount(AccountWithDataSet account) { in addTestAccount() argument
63 Account newAccount = new Account(account.name, account.type); in addTestAccount()
75 final AccountWithDataSet account = new AccountWithDataSet(name, TEST_ACCOUNT_TYPE, null); in addTestAccount() local
76 addTestAccount(account); in addTestAccount()
77 return account; in addTestAccount()
89 public void removeTestAccount(AccountWithDataSet account) { in removeTestAccount() argument
90 final Account remove = account.getAccountOrNull(); in removeTestAccount()
106 public void removeContactsForAccount(AccountWithDataSet account) { in removeContactsForAccount() argument
109 new String[] { account.name, account.type }); in removeContactsForAccount()
[all …]
/packages/services/Telecomm/src/com/android/server/telecom/
DPhoneAccountRegistrar.java186 PhoneAccount account = getPhoneAccountUnchecked(accountHandle); in getSubscriptionIdForPhoneAccount() local
188 if (account != null && account.hasCapabilities(PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION)) { in getSubscriptionIdForPhoneAccount()
251 PhoneAccount account = getPhoneAccount(defaultPhoneAccountHandle.phoneAccountHandle, in getUserSelectedOutgoingPhoneAccount() local
254 if (account != null) { in getUserSelectedOutgoingPhoneAccount()
288 .filter(account -> groupId.equals(account.getGroupId()) && in getPhoneAccountByGroupId()
289 !account.getAccountHandle().equals(excludePhoneAccountHandle) && in getPhoneAccountByGroupId()
290 Objects.equals(account.getAccountHandle().getComponentName(), in getPhoneAccountByGroupId()
318 PhoneAccount account = getPhoneAccount(accountHandle, userHandle); in setUserSelectedOutgoingPhoneAccount() local
319 if (account == null) { in setUserSelectedOutgoingPhoneAccount()
325 if (!account.hasCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER)) { in setUserSelectedOutgoingPhoneAccount()
[all …]
/packages/apps/Contacts/src/com/android/contacts/model/account/
DAccountDisplayInfoFactory.java16 package com.android.contacts.model.account;
62 public AccountDisplayInfo getAccountDisplayInfo(AccountWithDataSet account) { in getAccountDisplayInfo() argument
63 final AccountType type = mAccountTypeManager.getAccountTypeForAccount(account); in getAccountDisplayInfo()
64 final CharSequence name = shouldUseTypeLabelForName(account) in getAccountDisplayInfo()
66 : account.name; in getAccountDisplayInfo()
67 return new AccountDisplayInfo(account, name, type.getDisplayLabel(mContext), in getAccountDisplayInfo()
78 final AccountWithDataSet account = new AccountWithDataSet(delta.getAccountName(), in getAccountDisplayInfoFor() local
80 return getAccountDisplayInfo(account); in getAccountDisplayInfoFor()
92 private boolean shouldUseTypeLabelForName(AccountWithDataSet account) { in shouldUseTypeLabelForName() argument
93 final int type = mDeviceAccountTypeFactory.classifyAccount(account.type); in shouldUseTypeLabelForName()
[all …]
/packages/apps/Contacts/tests/src/com/android/contacts/editor/
DEditorUiUtilsTest.java28 import com.android.contacts.model.account.AccountDisplayInfo;
29 import com.android.contacts.model.account.AccountInfo;
30 import com.android.contacts.model.account.AccountType;
31 import com.android.contacts.model.account.AccountWithDataSet;
32 import com.android.contacts.model.account.DeviceLocalAccountType;
79 final AccountInfo account = new AccountInfo(new AccountDisplayInfo(ACCOUNT, ACCOUNT_NAME, in testGetProfileAccountInfo_NonLocalAccount() local
84 account); in testGetProfileAccountInfo_NonLocalAccount()
94 final AccountInfo account = new AccountInfo(new AccountDisplayInfo(ACCOUNT, "Device", in testGetProfileAccountInfo_DeviceLocalAccount() local
98 account); in testGetProfileAccountInfo_DeviceLocalAccount()
106 final AccountDisplayInfo account = new AccountDisplayInfo(ACCOUNT, ACCOUNT_NAME, in testGetAccountInfo_AccountType_NonGoogle() local
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/accounts/
DAccountSyncSettings.java161 private void addSyncStateSwitch(Account account, String authority, in addSyncStateSwitch() argument
165 item = new SyncStateSwitchPreference(getPrefContext(), account, authority, in addSyncStateSwitch()
169 item.setup(account, authority, packageName, uid); in addSyncStateSwitch()
256 final Account account = syncPref.getAccount(); in onPreferenceTreeClick() local
260 boolean syncAutomatically = ContentResolver.getSyncAutomaticallyAsUser(account, in onPreferenceTreeClick()
269 requestOrCancelSync(account, authority, true); in onPreferenceTreeClick()
282 ContentResolver.setSyncAutomaticallyAsUser(account, authority, syncOn, userId); in onPreferenceTreeClick()
287 requestOrCancelSync(account, authority, syncOn); in onPreferenceTreeClick()
365 private void requestOrCancelSync(Account account, String authority, boolean flag) { in requestOrCancelSync() argument
369 ContentResolver.requestSyncAsUser(account, authority, mUserHandle.getIdentifier(), in requestOrCancelSync()
[all …]
/packages/apps/Settings/src/com/android/settings/accounts/
DAccountSyncSettings.java161 private void addSyncStateSwitch(Account account, String authority, in addSyncStateSwitch() argument
165 item = new SyncStateSwitchPreference(getPrefContext(), account, authority, in addSyncStateSwitch()
169 item.setup(account, authority, packageName, uid); in addSyncStateSwitch()
256 final Account account = syncPref.getAccount(); in onPreferenceTreeClick() local
260 boolean syncAutomatically = ContentResolver.getSyncAutomaticallyAsUser(account, in onPreferenceTreeClick()
269 requestOrCancelSync(account, authority, true); in onPreferenceTreeClick()
282 ContentResolver.setSyncAutomaticallyAsUser(account, authority, syncOn, userId); in onPreferenceTreeClick()
287 requestOrCancelSync(account, authority, syncOn); in onPreferenceTreeClick()
365 private void requestOrCancelSync(Account account, String authority, boolean flag) { in requestOrCancelSync() argument
369 ContentResolver.requestSyncAsUser(account, authority, mUserHandle.getIdentifier(), in requestOrCancelSync()
[all …]
/packages/apps/TV/src/com/android/tv/util/account/
DAccountHelperImpl.java17 package com.android.tv.util.account;
30 public class AccountHelperImpl implements com.android.tv.util.account.AccountHelper {
54 for (Account account : getEligibleAccounts()) { in getSelectedAccount()
55 if (account.name.equals(accountId)) { in getSelectedAccount()
56 mSelectedAccount = account; in getSelectedAccount()
81 Account account = getFirstEligibleAccount(); in selectFirstAccount() local
82 if (account != null) { in selectFirstAccount()
83 selectAccount(account); in selectFirstAccount()
85 return account; in selectFirstAccount()
101 private void selectAccount(Account account) { in selectAccount() argument
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/accounts/
DAccountSyncHelper.java45 static Set<SyncAdapterType> getVisibleSyncAdaptersForAccount(Context context, Account account, in getVisibleSyncAdaptersForAccount() argument
47 Set<SyncAdapterType> syncableAdapters = getSyncableSyncAdaptersForAccount(account, in getVisibleSyncAdaptersForAccount()
57 static Set<SyncAdapterType> getSyncableSyncAdaptersForAccount(Account account, in getSyncableSyncAdaptersForAccount() argument
68 if (!syncAdapter.accountType.equals(account.type)) { in getSyncableSyncAdaptersForAccount()
72 boolean isSyncable = ContentResolver.getIsSyncableAsUser(account, authority, in getSyncableSyncAdaptersForAccount()
91 static void requestSyncIfAllowed(Account account, String authority, int userId) { in requestSyncIfAllowed() argument
92 if (!syncIsAllowed(account, authority, userId)) { in requestSyncIfAllowed()
98 ContentResolver.requestSyncAsUser(account, authority, userId, extras); in requestSyncIfAllowed()
118 static boolean isSyncing(Account account, List<SyncInfo> currentSyncs, String authority) { in isSyncing() argument
120 if (syncInfo.account.equals(account) && syncInfo.authority.equals(authority)) { in isSyncing()
[all …]
DAccountSyncDetailsFragment.java61 public static AccountSyncDetailsFragment newInstance(Account account, UserHandle userHandle) { in newInstance() argument
64 bundle.putParcelable(EXTRA_ACCOUNT, account); in newInstance()
93 Account account = getArguments().getParcelable(EXTRA_ACCOUNT); in onAttach() local
98 .setAccount(account); in onAttach()
104 .setAccount(account); in onAttach()
150 Account account = getArguments().getParcelable(EXTRA_ACCOUNT); in requestSyncForEnabledProviders() local
154 Set<SyncAdapterType> adapters = AccountSyncHelper.getSyncableSyncAdaptersForAccount(account, in requestSyncForEnabledProviders()
157 AccountSyncHelper.requestSyncIfAllowed(account, adapter.authority, userId); in requestSyncForEnabledProviders()
162 Account account = getArguments().getParcelable(EXTRA_ACCOUNT); in cancelSyncForEnabledProviders() local
166 Set<SyncAdapterType> adapters = AccountSyncHelper.getSyncableSyncAdaptersForAccount(account, in cancelSyncForEnabledProviders()
[all …]
/packages/apps/Dialer/java/com/android/dialer/calllogutils/
DPhoneAccountUtils.java32 PhoneAccount account = getAccountOrNull(context, accountHandle); in getAccountLabel() local
33 if (account != null && account.getLabel() != null) { in getAccountLabel()
34 return account.getLabel().toString(); in getAccountLabel()
41 final PhoneAccount account = TelecomUtil.getPhoneAccount(context, accountHandle); in getAccountColor() local
45 return account == null ? PhoneAccount.NO_HIGHLIGHT_COLOR : account.getHighlightColor(); in getAccountColor()
55 final PhoneAccount account = TelecomUtil.getPhoneAccount(context, accountHandle); in getAccountSupportsCallSubject() local
57 return account != null && account.hasCapabilities(PhoneAccount.CAPABILITY_CALL_SUBJECT); in getAccountSupportsCallSubject()
/packages/apps/Contacts/tests/src/com/android/contacts/tests/testauth/
DTestAuthenticator.java69 final Account account = new Account(newUniqueUserName(), accountType); in addAccount() local
72 AccountManager.get(mContext).addAccountExplicitly(account, PASSWORD, null); in addAccount()
75 bundle.putString(AccountManager.KEY_ACCOUNT_NAME, account.name); in addAccount()
76 bundle.putString(AccountManager.KEY_ACCOUNT_TYPE, account.type); in addAccount()
84 public Bundle getAuthToken(AccountAuthenticatorResponse response, Account account, in getAuthToken() argument
87 Log.v(TestauthConstants.LOG_TAG, "getAuthToken() account=" + account); in getAuthToken()
90 bundle.putString(AccountManager.KEY_ACCOUNT_NAME, account.name); in getAuthToken()
91 bundle.putString(AccountManager.KEY_ACCOUNT_TYPE, account.type); in getAuthToken()
92 bundle.putString(AccountManager.KEY_AUTHTOKEN, account.name); in getAuthToken()
99 AccountAuthenticatorResponse response, Account account, Bundle options) { in confirmCredentials() argument
[all …]
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/testutils/
DShadowContentResolver.java63 protected static int getIsSyncableAsUser(Account account, String authority, int userId) { in getIsSyncableAsUser() argument
68 protected static boolean getSyncAutomaticallyAsUser(Account account, String authority, in getSyncAutomaticallyAsUser() argument
84 protected static SyncStatusInfo getSyncStatusAsUser(Account account, String authority, in getSyncStatusAsUser() argument
94 public static void setIsSyncable(Account account, String authority, int syncable) { in setIsSyncable() argument
99 protected static void setSyncAutomaticallyAsUser(Account account, String authority, in setSyncAutomaticallyAsUser() argument
113 public static void setSyncStatus(Account account, String authority, SyncStatusInfo status) { in setSyncStatus() argument
118 public static void cancelSyncAsUser(Account account, String authority, @UserIdInt int userId) { in cancelSyncAsUser() argument
120 sSyncListener.onSyncCanceled(account, authority, userId); in cancelSyncAsUser()
125 public static void requestSyncAsUser(Account account, String authority, @UserIdInt int userId, in requestSyncAsUser() argument
128 sSyncListener.onSyncRequested(account, authority, userId, extras); in requestSyncAsUser()
[all …]
/packages/services/Telecomm/src/com/android/server/telecom/settings/
DEnableAccountPreferenceFragment.java46 public AccountSwitchPreference(Context context, PhoneAccount account) { in AccountSwitchPreference() argument
48 mAccount = account; in AccountSwitchPreference()
50 setTitle(account.getLabel()); in AccountSwitchPreference()
51 setSummary(account.getShortDescription()); in AccountSwitchPreference()
52 Icon icon = account.getIcon(); in AccountSwitchPreference()
56 setChecked(account.isEnabled()); in AccountSwitchPreference()
96 PhoneAccount account = mTelecomManager.getPhoneAccount(handle); in onResume() local
97 if (account != null) { in onResume()
99 0 != (account.getCapabilities() & PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION); in onResume()
101 screen.addPreference(new AccountSwitchPreference(context, account)); in onResume()
/packages/apps/Contacts/src/com/android/contacts/activities/
DAttachPhotoActivity.java52 import com.android.contacts.model.account.AccountInfo;
53 import com.android.contacts.model.account.AccountType;
54 import com.android.contacts.model.account.AccountWithDataSet;
165 AccountWithDataSet account = result.getParcelableExtra( in onActivityResult() local
167 if (account != null) { in onActivityResult()
168 createNewRawContact(account); in onActivityResult()
329 AccountType account = raw.getRawContactAccountType(this); in saveToContact() local
331 RawContactModifier.ensureKindExists(raw, account, Photo.CONTENT_ITEM_TYPE); in saveToContact()
385 private void createNewRawContact(final AccountWithDataSet account) { in createNewRawContact() argument
393 after.put(RawContacts.ACCOUNT_TYPE, account != null ? account.type : null); in createNewRawContact()
[all …]
/packages/apps/Dialer/java/com/android/contacts/common/model/
DAccountTypeManager.java47 import com.android.contacts.common.model.account.AccountType;
48 import com.android.contacts.common.model.account.AccountTypeWithDataSet;
49 import com.android.contacts.common.model.account.AccountWithDataSet;
50 import com.android.contacts.common.model.account.ExchangeAccountType;
51 import com.android.contacts.common.model.account.ExternalAccountType;
52 import com.android.contacts.common.model.account.FallbackAccountType;
53 import com.android.contacts.common.model.account.GoogleAccountType;
54 import com.android.contacts.common.model.account.SamsungAccountType;
124 public final AccountType getAccountTypeForAccount(AccountWithDataSet account) { in getAccountTypeForAccount() argument
125 if (account != null) { in getAccountTypeForAccount()
[all …]
/packages/apps/Contacts/
Dproguard.flags40 -keep class com.android.contacts.model.account.AccountDisplayInfo { *; }
41 -keep class com.android.contacts.model.account.AccountDisplayInfoFactory { *; }
42 -keep class com.android.contacts.model.account.AccountInfo { *; }
43 -keep class com.android.contacts.model.account.AccountType { *; }
44 -keep class com.android.contacts.model.account.AccountType$* { *; }
45 -keep class com.android.contacts.model.account.AccountTypeWithDataSet { *; }
46 -keep class com.android.contacts.model.account.AccountWithDataSet { *; }
47 -keep class com.android.contacts.model.account.BaseAccountType { *; }
48 -keep class com.android.contacts.model.account.BaseAccountType$* { *; }
49 -keep class com.android.contacts.model.account.DeviceLocalAccountType { *; }
[all …]
/packages/apps/Contacts/src/com/android/contacts/vcard/
DSelectAccountActivity.java27 import com.android.contacts.model.account.AccountWithDataSet;
67 final AccountWithDataSet account = accountList.get(0); in onCreate() local
69 intent.putExtra(ACCOUNT_NAME, account.name); in onCreate()
70 intent.putExtra(ACCOUNT_TYPE, account.type); in onCreate()
71 intent.putExtra(DATA_SET, account.dataSet); in onCreate()
86 final AccountWithDataSet account = mAccountList.get(which); in onCreate()
88 intent.putExtra(ACCOUNT_NAME, account.name); in onCreate()
89 intent.putExtra(ACCOUNT_TYPE, account.type); in onCreate()
90 intent.putExtra(DATA_SET, account.dataSet); in onCreate()

12345678910>>...12