Home
last modified time | relevance | path

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

123

/cts/tests/tests/provider/src/android/provider/cts/
DCalendarTest.java128 static String generateCalendarOwnerEmail(String account) { in generateCalendarOwnerEmail() argument
129 return "OWNER_" + account + "@example.com"; in generateCalendarOwnerEmail()
141 String account, int seed) { in getNewCalendarValues() argument
146 values.put(Calendars.ACCOUNT_NAME, account); in getNewCalendarValues()
151 values.put(Calendars.OWNER_ACCOUNT, generateCalendarOwnerEmail(account)); in getNewCalendarValues()
204 public static int deleteCalendarByAccount(ContentResolver resolver, String account) { in deleteCalendarByAccount() argument
206 new String[] { account }); in deleteCalendarByAccount()
209 public static Cursor getCalendarsByAccount(ContentResolver resolver, String account) { in getCalendarsByAccount() argument
212 if (account != null) { in getCalendarsByAccount()
215 selectionArgs[1] = account; in getCalendarsByAccount()
[all …]
/cts/hostsidetests/incident/apps/batterystatsapp/src/com/android/server/cts/device/batterystats/
DBatteryStatsAuthenticator.java60 final Account account = getTestAccount(); in ensureTestAccount() local
63 result.putString(AccountManager.KEY_ACCOUNT_TYPE, account.type); in ensureTestAccount()
64 result.putString(AccountManager.KEY_ACCOUNT_NAME, account.name); in ensureTestAccount()
68 if (!Arrays.asList(am.getAccountsByType(account.type)).contains(account) ){ in ensureTestAccount()
69 am.addAccountExplicitly(account, "password", new Bundle()); in ensureTestAccount()
79 for (Account account : am.getAccountsByType(BatteryStatsAuthenticator.ACCOUNT_TYPE)) { in removeAllAccounts()
80 Log.i(TAG, "Removing " + account + "..."); in removeAllAccounts()
81 am.removeAccountExplicitly(account); in removeAllAccounts()
108 public Bundle updateCredentials(AccountAuthenticatorResponse response, Account account, in updateCredentials() argument
114 public Bundle confirmCredentials(AccountAuthenticatorResponse response, Account account, in confirmCredentials() argument
[all …]
DBatteryStatsSyncAdapter.java54 public void onPerformSync(Account account, Bundle extras, String authority, in onPerformSync() argument
101 public static void requestSync(Account account) throws Exception { in requestSync() argument
109 ContentResolver.requestSync(account, BatteryStatsProvider.AUTHORITY, extras); in requestSync()
117 public static void cancelPendingSyncs(Account account) throws Exception { in cancelPendingSyncs() argument
120 ContentResolver.cancelSync(account, BatteryStatsProvider.AUTHORITY); in cancelPendingSyncs()
123 if (!ContentResolver.isSyncPending(account, BatteryStatsProvider.AUTHORITY) in cancelPendingSyncs()
124 && !ContentResolver.isSyncActive(account, BatteryStatsProvider.AUTHORITY)) { in cancelPendingSyncs()
DBatteryStatsSyncTest.java52 final Account account = BatteryStatsAuthenticator.getTestAccount(); in testRunSyncs() local
59 ContentResolver.setIsSyncable(account, BatteryStatsProvider.AUTHORITY, 1); in testRunSyncs()
62 BatteryStatsSyncAdapter.cancelPendingSyncs(account); in testRunSyncs()
68 BatteryStatsSyncAdapter.requestSync(account); in testRunSyncs()
/cts/tests/tests/accounts/common/src/android/accounts/cts/common/
DTestAccountAuthenticator.java109 Account account, in confirmCredentials() argument
111 if (!mAccountType.equals(account.type)) { in confirmCredentials()
116 new ConfirmCredentialsTx(account, options, result)); in confirmCredentials()
120 if (account.name.startsWith(Fixtures.PREFIX_NAME_SUCCESS)) { in confirmCredentials()
123 result.putString(AccountManager.KEY_ACCOUNT_NAME, account.name); in confirmCredentials()
124 result.putString(AccountManager.KEY_ACCOUNT_TYPE, account.type); in confirmCredentials()
125 } else if (account.name.startsWith(Fixtures.PREFIX_NAME_INTERVENE)) { in confirmCredentials()
129 eventualActivityResultData.putExtra(AccountManager.KEY_ACCOUNT_NAME, account.name); in confirmCredentials()
130 eventualActivityResultData.putExtra(AccountManager.KEY_ACCOUNT_TYPE, account.type); in confirmCredentials()
155 Account account, in getAuthToken() argument
[all …]
DTestDefaultAuthenticator.java80 Account account, in confirmCredentials() argument
89 Account account, in getAuthToken() argument
105 Account account, in updateCredentials() argument
108 if (!mAccountType.equals(account.type)) { in updateCredentials()
112 result.putString(AccountManager.KEY_ACCOUNT_NAME, account.name); in updateCredentials()
113 result.putString(AccountManager.KEY_ACCOUNT_TYPE, account.type); in updateCredentials()
115 new UpdateCredentialsTx(account, authTokenType, options, result)); in updateCredentials()
122 Account account, in hasFeatures() argument
/cts/hostsidetests/devicepolicy/app/AccountCheck/Tester/
DREADME.txt4 Note: AccountCheckHostSideTest should pass even with a pre-existing ALLOWED account. Meaning, even
5 after you followed the below steps to add an ALLOWED account, AccountCheckHostSideTest should
15 - Add an account with DEVICE_OR_PROFILE_OWNER_ALLOWED.
17 --esa features android.account.DEVICE_OR_PROFILE_OWNER_ALLOWED \
20 - Add an account with DEVICE_OR_PROFILE_OWNER_DISALLOWED.
22 --esa features android.account.DEVICE_OR_PROFILE_OWNER_DISALLOWED \
26 $ dumpsys-account
29 …Account {name=8894956487610:android.account.DEVICE_OR_PROFILE_OWNER_ALLOWED, type=com.android.cts.…
/cts/hostsidetests/devicepolicy/app/AccountCheck/Auth/src/com/android/cts/devicepolicy/accountcheck/
DAccountCheckTest.java51 for (Account account : mAccountManager.getAccountsByType(ACCOUNT_TYPE)) { in testRemoveAllAccounts()
52 Log.i(TAG, "Removing account: " + account); in testRemoveAllAccounts()
53 mAccountManager.removeAccountExplicitly(account); in testRemoveAllAccounts()
149 for (Account account : accounts) { in testCheckPreconfiguredAccountFeatures()
150 Log.v(TAG, "Checking " + account); in testCheckPreconfiguredAccountFeatures()
151 if (hasAccountFeatures(am, account, feature_disallow)) { in testCheckPreconfiguredAccountFeatures()
152 error.append(account + " has " + feature_disallow[0] + "\n"); in testCheckPreconfiguredAccountFeatures()
154 if (!hasAccountFeatures(am, account, feature_allow)) { in testCheckPreconfiguredAccountFeatures()
155 error.append(account + " doesn't have " + feature_allow[0] + "\n"); in testCheckPreconfiguredAccountFeatures()
163 private boolean hasAccountFeatures(AccountManager am, Account account, String[] features) { in hasAccountFeatures() argument
[all …]
DTestAuthenticator.java92 public Bundle updateCredentials(AccountAuthenticatorResponse response, Account account, in updateCredentials() argument
98 public Bundle confirmCredentials(AccountAuthenticatorResponse response, Account account, in confirmCredentials() argument
104 public Bundle getAuthToken(AccountAuthenticatorResponse response, Account account, in getAuthToken() argument
115 public Bundle hasFeatures(AccountAuthenticatorResponse response, Account account, in hasFeatures() argument
118 final int p = account.name.indexOf(':'); in hasFeatures()
122 Arrays.asList(TextUtils.split(account.name.substring(p + 1), ",")); in hasFeatures()
/cts/tests/tests/accounts/common/src/android/accounts/cts/common/tx/
DGetAccountRemovalAllowedTx.java24 public final Account account; field in GetAccountRemovalAllowedTx
28 account = in.readParcelable(null); in GetAccountRemovalAllowedTx()
33 Account account, in GetAccountRemovalAllowedTx() argument
35 this.account = account; in GetAccountRemovalAllowedTx()
46 out.writeParcelable(account, flags); in writeToParcel()
DConfirmCredentialsTx.java24 public final Account account; field in ConfirmCredentialsTx
29 account = in.readParcelable(null); in ConfirmCredentialsTx()
35 Account account, in ConfirmCredentialsTx() argument
38 this.account = account; in ConfirmCredentialsTx()
50 out.writeParcelable(account, flags); in writeToParcel()
DStartUpdateCredentialsSessionTx.java24 public final Account account; field in StartUpdateCredentialsSessionTx
29 account = in.readParcelable(null); in StartUpdateCredentialsSessionTx()
35 Account account, in StartUpdateCredentialsSessionTx() argument
38 this.account = account; in StartUpdateCredentialsSessionTx()
50 out.writeParcelable(account, flags); in writeToParcel()
DGetAuthTokenTx.java24 public final Account account; field in GetAuthTokenTx
30 account = in.readParcelable(null); in GetAuthTokenTx()
37 Account account, in GetAuthTokenTx() argument
41 this.account = account; in GetAuthTokenTx()
54 out.writeParcelable(account, flags); in writeToParcel()
DHasFeaturesTx.java27 public final Account account; field in HasFeaturesTx
32 account = in.readParcelable(null); in HasFeaturesTx()
38 Account account, in HasFeaturesTx() argument
41 this.account = account; in HasFeaturesTx()
57 out.writeParcelable(account, flags); in writeToParcel()
DUpdateCredentialsTx.java24 public final Account account; field in UpdateCredentialsTx
30 account = in.readParcelable(null); in UpdateCredentialsTx()
37 Account account, in UpdateCredentialsTx() argument
41 this.account = account; in UpdateCredentialsTx()
54 out.writeParcelable(account, flags); in writeToParcel()
/cts/tests/tests/accounts/src/android/accounts/cts/
DAccountTest.java10 private Account account; field in AccountTest
14 account = new Account("abc@xyz.org", "com.my.auth"); in setUp()
34 assertEquals(0, account.describeContents()); in testDescribeContents()
40 account.writeToParcel(parcel, 0); in testWriteToParcel()
46 assertEquals(account, newAccount); in testWriteToParcel()
DMockAccountAuthenticator.java177 public Bundle updateCredentials(AccountAuthenticatorResponse response, Account account, in updateCredentials() argument
180 this.mAccount = account; in updateCredentials()
202 public Bundle confirmCredentials(AccountAuthenticatorResponse response, Account account, in confirmCredentials() argument
205 this.mAccount = account; in confirmCredentials()
225 Account account, in getAuthToken() argument
231 this.mAccount = account; in getAuthToken()
236 result.putString(AccountManager.KEY_ACCOUNT_NAME, account.name); in getAuthToken()
237 result.putString(AccountManager.KEY_ACCOUNT_TYPE, account.type); in getAuthToken()
267 public Bundle hasFeatures(AccountAuthenticatorResponse response, Account account, in hasFeatures() argument
271 this.mAccount = account; in hasFeatures()
[all …]
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DAccountAuthenticator.java83 public Bundle updateCredentials(AccountAuthenticatorResponse response, Account account, in updateCredentials() argument
89 public Bundle confirmCredentials(AccountAuthenticatorResponse response, Account account, in confirmCredentials() argument
98 public Bundle getAuthToken(AccountAuthenticatorResponse response, Account account, in getAuthToken() argument
109 public Bundle hasFeatures(AccountAuthenticatorResponse response, Account account, in hasFeatures() argument
118 …ic Bundle getAccountCredentialsForCloning(AccountAuthenticatorResponse response, Account account) { in getAccountCredentialsForCloning() argument
119 if (TEST_ACCOUNT.equals(account)) { in getAccountCredentialsForCloning()
122 Log.e(TAG, "failed in getAccountCredentialsForCloning. account: " + account); in getAccountCredentialsForCloning()
128 public Bundle addAccountFromCredentials(AccountAuthenticatorResponse response, Account account, in addAccountFromCredentials() argument
130 if (accountCredentials != null && TEST_ACCOUNT.equals(account) in addAccountFromCredentials()
136 + " account: " + account); in addAccountFromCredentials()
/cts/hostsidetests/devicepolicy/app/AccountCheck/Tester/src/com/android/cts/devicepolicy/accountcheck/tester/
DTestAuthenticator.java75 final Account account = new Account(name, accountType); in createAccount() local
77 account, "password", new Bundle()); in createAccount()
78 return account; in createAccount()
102 public Bundle updateCredentials(AccountAuthenticatorResponse response, Account account, in updateCredentials() argument
108 public Bundle confirmCredentials(AccountAuthenticatorResponse response, Account account, in confirmCredentials() argument
114 public Bundle getAuthToken(AccountAuthenticatorResponse response, Account account, in getAuthToken() argument
125 public Bundle hasFeatures(AccountAuthenticatorResponse response, Account account, in hasFeatures() argument
128 final int p = account.name.indexOf(':'); in hasFeatures()
132 Arrays.asList(TextUtils.split(account.name.substring(p + 1), ",")); in hasFeatures()
140 Log.i(TAG, "Checking feature for account '" + account + "' for features=" in hasFeatures()
/cts/hostsidetests/content/test-apps/SyncAccountAccessStubs/src/com/android/cts/stub/
DStubAuthenticator.java74 Account account, Bundle bundle) throws NetworkErrorException { in confirmCredentials() argument
80 Account account, String type, Bundle bundle) throws NetworkErrorException { in getAuthToken() argument
94 Account account, String tokenType, Bundle bundle) in updateCredentials() argument
101 Account account, String[] options) throws NetworkErrorException { in hasFeatures() argument
107 Account account) throws NetworkErrorException { in getAccountRemovalAllowed() argument
115 for (Account account : accountManager.getAccounts()) { in removeAccounts()
116 accountManager.removeAccountExplicitly(account); in removeAccounts()
/cts/tests/tests/provider/src/android/provider/cts/contacts/
DRawContactUtil.java42 public static long createRawContactWithName(ContentResolver resolver, Account account, in createRawContactWithName() argument
44 Long rawContactId = insertRawContact(resolver, account); in createRawContactWithName()
50 Account account) { in createRawContactWithAutoGeneratedName() argument
51 Long rawContactId = insertRawContact(resolver, account); in createRawContactWithAutoGeneratedName()
56 public static long insertRawContact(ContentResolver resolver, Account account) { in insertRawContact() argument
58 values.put(ContactsContract.RawContacts.ACCOUNT_NAME, account.name); in insertRawContact()
59 values.put(ContactsContract.RawContacts.ACCOUNT_TYPE, account.type); in insertRawContact()
/cts/tests/tests/content/src/android/content/cts/
DContentResolverSyncTestCase.java76 private void addAccountExplicitly(Account account, String password, Bundle userdata) { in addAccountExplicitly() argument
77 assertTrue(sAccountManager.addAccountExplicitly(account, password, userdata)); in addAccountExplicitly()
80 private boolean removeAccount(AccountManager am, Account account, in removeAccount() argument
84 AccountManagerFuture<Boolean> futureBoolean = am.removeAccount(account, in removeAccount()
99 private void addAccountAndVerifyInitSync(Account account, String password, in addAccountAndVerifyInitSync() argument
104 addAccountExplicitly(account, password, null /* userData */); in addAccountAndVerifyInitSync()
118 assertEquals(account, getMockSyncAdapter().getAccounts().get(accountIndex)); in addAccountAndVerifyInitSync()
122 private void cancelSync(Account account, String authority, int latchTimeoutMillis) { in cancelSync() argument
128 ContentResolver.cancelSync(account, authority); in cancelSync()
138 private void requestSync(Account account, String authority, int latchTimeoutMillis) { in requestSync() argument
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/telecom/
DEnablePhoneAccountTestActivity.java53 PhoneAccount account = PhoneAccountUtils.getPhoneAccount(this); in onCreate()
54 if (account != null) { in onCreate()
65 PhoneAccount account = PhoneAccountUtils.getPhoneAccount(this); in onCreate()
66 if (account != null && account.isEnabled()) { in onCreate()
/cts/tests/tests/provider/src/android/provider/cts/contacts/account/
DStaticAccountAuthenticator.java17 package android.provider.cts.contacts.account;
68 public Bundle confirmCredentials(AccountAuthenticatorResponse response, Account account, in confirmCredentials() argument
76 public Bundle getAuthToken(AccountAuthenticatorResponse response, Account account, in getAuthToken() argument
87 public Bundle updateCredentials(AccountAuthenticatorResponse response, Account account, in updateCredentials() argument
93 public Bundle hasFeatures(AccountAuthenticatorResponse response, Account account, in hasFeatures() argument
/cts/hostsidetests/content/test-apps/CtsSyncInvalidAccountAuthorityTestCases/src/android/content/sync/cts/
DStubAuthenticator.java67 Account account, Bundle bundle) throws NetworkErrorException { in confirmCredentials() argument
73 Account account, String type, Bundle bundle) throws NetworkErrorException { in getAuthToken() argument
84 Account account, String tokenType, Bundle bundle) in updateCredentials() argument
91 Account account, String[] options) throws NetworkErrorException { in hasFeatures() argument
97 Account account) throws NetworkErrorException { in getAccountRemovalAllowed() argument

123