Home
last modified time | relevance | path

Searched refs:mAccountManager (Results 1 – 15 of 15) sorted by relevance

/packages/apps/Settings/tests/robotests/src/com/android/settings/accounts/
DAccountPreferenceControllerTest.java79 private AccountManager mAccountManager; field in AccountPreferenceControllerTest
92 shadowApp.setSystemService(Context.ACCOUNT_SERVICE, mAccountManager); in setUp()
96 when(mAccountManager.getAuthenticatorTypesAsUser(anyInt())) in setUp()
98 when(mAccountManager.getAccountsAsUser(anyInt())).thenReturn(new Account[0]); in setUp()
339 when(mAccountManager.getAccountsAsUser(anyInt())).thenReturn(accounts); in onResume_twoAccountsOfSameType_shouldAddThreePreferences()
345 when(mAccountManager.getAccountsByTypeAsUser(eq("com.acct1"), any(UserHandle.class))) in onResume_twoAccountsOfSameType_shouldAddThreePreferences()
352 when(mAccountManager.getAuthenticatorTypesAsUser(anyInt())).thenReturn(authDescs); in onResume_twoAccountsOfSameType_shouldAddThreePreferences()
392 when(mAccountManager.getAccountsAsUser(anyInt())).thenReturn(allAccounts); in onResume_twoAccountsOfSameName_shouldAddFivePreferences()
393 when(mAccountManager.getAccountsByTypeAsUser(eq("com.acct1"), any(UserHandle.class))) in onResume_twoAccountsOfSameName_shouldAddFivePreferences()
395 when(mAccountManager.getAccountsByTypeAsUser(eq("com.acct2"), any(UserHandle.class))) in onResume_twoAccountsOfSameName_shouldAddFivePreferences()
[all …]
DRemoveAccountPreferenceControllerTest.java87 private AccountManager mAccountManager; field in RemoveAccountPreferenceControllerTest
106 ShadowApplication.getInstance().setSystemService(Context.ACCOUNT_SERVICE, mAccountManager); in setUp()
113 when(mAccountManager.getAuthenticatorTypesAsUser(anyInt())) in setUp()
115 when(mAccountManager.getAccountsAsUser(anyInt())).thenReturn(new Account[0]); in setUp()
177 when(activity.getSystemService(Context.ACCOUNT_SERVICE)).thenReturn(mAccountManager); in confirmRemove_shouldRemoveAccount()
189 verify(mAccountManager).removeAccountAsUser(eq(account), nullable(Activity.class), in confirmRemove_shouldRemoveAccount()
211 when(activity.getSystemService(Context.ACCOUNT_SERVICE)).thenReturn(mAccountManager); in confirmRemove_activityGone_shouldSilentlyRemoveAccount()
222 verify(mAccountManager).removeAccountAsUser(eq(account), nullable(Activity.class), in confirmRemove_activityGone_shouldSilentlyRemoveAccount()
DAccountTypePreferenceLoaderTest.java58 private AccountManager mAccountManager; field in AccountTypePreferenceLoaderTest
72 shadowContext.setSystemService(Context.ACCOUNT_SERVICE, mAccountManager); in setUp()
73 when(mAccountManager.getAuthenticatorTypesAsUser(anyInt())).thenReturn( in setUp()
75 when(mAccountManager.getAccountsAsUser(anyInt())).thenReturn(new Account[0]); in setUp()
DAccountSyncPreferenceControllerTest.java56 private AccountManager mAccountManager; field in AccountSyncPreferenceControllerTest
66 ShadowApplication.getInstance().setSystemService(Context.ACCOUNT_SERVICE, mAccountManager); in setUp()
68 when(mAccountManager.getAuthenticatorTypesAsUser(anyInt())).thenReturn( in setUp()
70 when(mAccountManager.getAccountsAsUser(anyInt())).thenReturn(new Account[0]); in setUp()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/
DCopyAccountToUserTaskTest.java66 @Mock private AccountManager mAccountManager; field in CopyAccountToUserTaskTest
78 when(mContext.getSystemService(Context.ACCOUNT_SERVICE)).thenReturn(mAccountManager); in setUp()
79 when(mAccountManager.copyAccountToUser( in setUp()
99 verify(mAccountManager).copyAccountToUser( in testRun()
123 verify(mAccountManager).copyAccountToUser( in testRun_error()
144 verifyZeroInteractions(mAccountManager); in testRun_nullAccount()
160 verifyZeroInteractions(mAccountManager); in testRun_sameUser()
/packages/apps/Contacts/tests/src/com/android/contacts/tests/
DAccountsTestHelper.java44 private final AccountManager mAccountManager; field in AccountsTestHelper
57 mAccountManager = AccountManager.get(mContext); in AccountsTestHelper()
64 assertTrue(mAccountManager.addAccountExplicitly(newAccount, null, null)); in addTestAccount()
91 mAccountManager.removeAccountExplicitly(remove); in removeTestAccount()
102 mAccountManager.getAccountsByType(TEST_ACCOUNT_TYPE)); in hasTestAccount()
121 mAccountManager.removeAccountExplicitly(account); in cleanup()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/accounts/
DAuthUtils.java35 private final AccountManager mAccountManager; field in AuthUtils
38 mAccountManager = AccountManager.get(context); in AuthUtils()
45 mAccountManager.invalidateAuthToken(accountType, authToken); in invalidateAuthToken()
55 return mAccountManager.getAuthToken(account, authTokenType, options, notifyAuthFailure, in getAuthToken()
65 return mAccountManager.blockingGetAuthToken(account, authTokenType, notifyAuthFailure); in blockingGetAuthToken()
/packages/apps/Contacts/tests/src/com/android/contacts/model/
DAccountTypeManagerTest.java58 @Mock private AccountManager mAccountManager; field in AccountTypeManagerTest
105 when(mAccountManager.getAccountsByType(Mockito.anyString())).thenReturn(ACCOUNTS); in testGetDefaultAccount_NoDefaultAccountPreferenceSet()
110 when(mAccountManager.getAccountsByType(Mockito.anyString())).thenReturn(ACCOUNTS); in testGetDefaultAccount_DefaultAccountPreferenceSet()
117 when(mAccountManager.getAccountsByType(Mockito.anyString())).thenReturn(ACCOUNTS); in testGetDefaultAccount_DefaultAccountPreferenceSet_NonGoogleAccountType()
124 when(mAccountManager.getAccountsByType(Mockito.anyString())).thenReturn(ACCOUNTS); in testGetDefaultAccount_DefaultAccountPreferenceSet_UnknownName()
133 mAccountManager, mPrefs, "contact_editor_default_account_key"); in getDefaultGoogleAccountName()
/packages/apps/Contacts/src/com/android/contacts/model/
DAccountTypeManager.java339 private final AccountManager mAccountManager;
360 return getAccountsWithDataSets(mAccountManager.getAccounts(), typeProvider);
383 mAccountManager = AccountManager.get(mContext);
404 mAccountManager.addOnAccountsUpdatedListener(this, mMainThreadHandler, false);
477 getAccountsWithDataSets(mAccountManager.getAccounts(), mTypeProvider);
499 mAccountManager.getAuthenticatorTypes(), ContentResolver.getSyncAdapterTypes())) {
616 return getDefaultGoogleAccount(mAccountManager, sharedPreferences, defaultAccountKey);
622 mAccountManager.getAccountsByType(GoogleAccountType.ACCOUNT_TYPE);
645 final Account[] accounts = mAccountManager.getAccounts();
696 final Account[] accounts = mAccountManager.getAccountsByType(account.type);
DDeviceLocalAccountLocator.java86 private final AccountManager mAccountManager; field in DeviceLocalAccountLocator.NexusDeviceAccountLocator
89 mAccountManager = accountManager; in NexusDeviceAccountLocator()
95 final Account[] accounts = mAccountManager in getDeviceLocalAccounts()
/packages/apps/Settings/tests/robotests/src/com/android/settings/
DMasterClearTest.java88 private AccountManager mAccountManager; field in MasterClearTest
369 when(mMockActivity.getSystemService(Context.ACCOUNT_SERVICE)).thenReturn(mAccountManager); in testGetAccountConfirmationIntent_no_relevant_accounts()
370 when(mAccountManager.getAccountsByType(TEST_ACCOUNT_TYPE)).thenReturn(accounts); in testGetAccountConfirmationIntent_no_relevant_accounts()
383 when(mMockActivity.getSystemService(Context.ACCOUNT_SERVICE)).thenReturn(mAccountManager); in testGetAccountConfirmationIntent_unresolved()
384 when(mAccountManager.getAccountsByType(TEST_ACCOUNT_TYPE)).thenReturn(accounts); in testGetAccountConfirmationIntent_unresolved()
402 when(mMockActivity.getSystemService(Context.ACCOUNT_SERVICE)).thenReturn(mAccountManager); in testTryShowAccountConfirmation_ok()
403 when(mAccountManager.getAccountsByType(TEST_ACCOUNT_TYPE)).thenReturn(accounts); in testTryShowAccountConfirmation_ok()
/packages/apps/Bluetooth/src/com/android/bluetooth/pbapclient/
DPbapClientConnectionHandler.java128 private AccountManager mAccountManager; field in PbapClientConnectionHandler
148 mAccountManager = AccountManager.get(mPbapClientStateMachine.getContext()); in PbapClientConnectionHandler()
165 mAccountManager = AccountManager.get(mPbapClientStateMachine.getContext()); in PbapClientConnectionHandler()
458 if (mAccountManager.addAccountExplicitly(account, null, null)) { in addAccount()
468 if (mAccountManager.removeAccountExplicitly(account)) { in removeAccount()
/packages/apps/Dialer/java/com/android/contacts/common/model/
DAccountTypeManager.java242 private AccountManager mAccountManager; field in AccountTypeManagerImpl
269 mAccountManager = AccountManager.get(mContext); in AccountTypeManagerImpl()
306 mAccountManager.addOnAccountsUpdatedListener(this, mListenerHandler, false); in AccountTypeManagerImpl()
421 final AccountManager am = mAccountManager; in loadAccountsInBackground()
518 Account[] accounts = mAccountManager.getAccounts(); in loadAccountsInBackground()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/accounts/
DAccountListPreferenceControllerTest.java63 private AccountManager mAccountManager = AccountManager.get(application); field in AccountListPreferenceControllerTest
236 return Shadow.extract(mAccountManager); in getShadowAccountManager()
DChooseAccountPreferenceControllerTest.java75 private AccountManager mAccountManager = AccountManager.get(application); field in ChooseAccountPreferenceControllerTest
249 return Shadow.extract(mAccountManager); in getShadowAccountManager()