Home
last modified time | relevance | path

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

/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/pbapclient/
DPbapClientAccountManagerTest.java86 private PbapClientAccountManager mAccountManager; field in PbapClientAccountManagerTest
118 mAccountManager = in setUp()
124 if (mAccountManager != null) { in tearDown()
125 mAccountManager.stop(); in tearDown()
126 mAccountManager = null; in tearDown()
139 Account account = mAccountManager.getAccountForDevice(device); in testGetAccountForDevice_deviceAccountNameAndTypeAreValid()
147 IllegalArgumentException.class, () -> mAccountManager.getAccountForDevice(null)); in testGetAccountForDevice_withNullDevice_throwsIllegalArgumentException()
260 assertThat(mAccountManager.getAccounts()).isNotNull(); in testGetAccounts_storageInitializedWithAccounts_returnsAccountList()
261 assertThat(mAccountManager.getAccounts()).hasSize(2); in testGetAccounts_storageInitializedWithAccounts_returnsAccountList()
262 assertThat(mAccountManager.getAccounts()).contains(accounts[0]); in testGetAccounts_storageInitializedWithAccounts_returnsAccountList()
[all …]
DPbapClientServiceTest.java99 @Mock private AccountManager mAccountManager; field in PbapClientServiceTest
155 .when(mAccountManager) in setUp()
157 doReturn(new Account[] {}).when(mAccountManager).getAccountsByType(eq(Utils.ACCOUNT_TYPE)); in setUp()
159 mAdapterService, Context.ACCOUNT_SERVICE, AccountManager.class, mAccountManager); in setUp()
/packages/apps/Settings/tests/robotests/src/com/android/settings/accounts/
DAccountPreferenceControllerTest.java82 private AccountManager mAccountManager; field in AccountPreferenceControllerTest
95 shadowApp.setSystemService(Context.ACCOUNT_SERVICE, mAccountManager); in setUp()
99 when(mAccountManager.getAuthenticatorTypesAsUser(anyInt())) in setUp()
101 when(mAccountManager.getAccountsAsUser(anyInt())).thenReturn(new Account[0]); in setUp()
344 when(mAccountManager.getAccountsAsUser(anyInt())).thenReturn(accounts); in onResume_twoAccountsOfSameType_shouldAddThreePreferences()
350 when(mAccountManager.getAccountsByTypeAsUser(eq("com.acct1"), any(UserHandle.class))) in onResume_twoAccountsOfSameType_shouldAddThreePreferences()
357 when(mAccountManager.getAuthenticatorTypesAsUser(anyInt())).thenReturn(authDescs); in onResume_twoAccountsOfSameType_shouldAddThreePreferences()
397 when(mAccountManager.getAccountsAsUser(anyInt())).thenReturn(allAccounts); in onResume_twoAccountsOfSameName_shouldAddFivePreferences()
398 when(mAccountManager.getAccountsByTypeAsUser(eq("com.acct1"), any(UserHandle.class))) in onResume_twoAccountsOfSameName_shouldAddFivePreferences()
400 when(mAccountManager.getAccountsByTypeAsUser(eq("com.acct2"), any(UserHandle.class))) in onResume_twoAccountsOfSameName_shouldAddFivePreferences()
[all …]
DRemoveAccountPreferenceControllerTest.java86 private AccountManager mAccountManager; field in RemoveAccountPreferenceControllerTest
105 ShadowApplication.getInstance().setSystemService(Context.ACCOUNT_SERVICE, mAccountManager); in setUp()
112 when(mAccountManager.getAuthenticatorTypesAsUser(anyInt())) in setUp()
114 when(mAccountManager.getAccountsAsUser(anyInt())).thenReturn(new Account[0]); in setUp()
152 when(activity.getSystemService(Context.ACCOUNT_SERVICE)).thenReturn(mAccountManager); in confirmRemove_shouldRemoveAccount()
164 verify(mAccountManager).removeAccountAsUser(eq(account), nullable(Activity.class), in confirmRemove_shouldRemoveAccount()
187 when(activity.getSystemService(Context.ACCOUNT_SERVICE)).thenReturn(mAccountManager); in confirmRemove_activityGone_shouldSilentlyRemoveAccount()
198 verify(mAccountManager).removeAccountAsUser(eq(account), nullable(Activity.class), in confirmRemove_activityGone_shouldSilentlyRemoveAccount()
DChooseAccountPreferenceControllerTest.java71 private ShadowAccountManager mAccountManager; field in ChooseAccountPreferenceControllerTest
80 mAccountManager = (ShadowAccountManager) Shadows.shadowOf(AccountManager.get(mContext)); in setUp()
118 mAccountManager.addAuthenticator(authDesc); in updateAuthDescriptions_oneProvider_shouldNotAddPreference()
143 mAccountManager.addAuthenticator(authDesc); in updateAuthDescriptions_oneAdminDisabledProvider_shouldNotAddPreference()
168 mAccountManager.addAuthenticator(authDesc); in updateAuthDescriptions_noProvider_shouldNotAddPreference()
194 mAccountManager.addAuthenticator(authDesc); in updateAuthDescriptions_twoProvider_shouldAddTwoPreference()
195 mAccountManager.addAuthenticator(authDesc2); in updateAuthDescriptions_twoProvider_shouldAddTwoPreference()
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()
DAccountDashboardFragmentTest.java57 private AccountManager mAccountManager; field in AccountDashboardFragmentTest
108 when(AccountManager.get(mContext)).thenReturn(mAccountManager); in searchIndexProvider_hasAccounts_shouldIndex()
109 doReturn(accounts).when(mAccountManager).getAccounts(); in searchIndexProvider_hasAccounts_shouldIndex()
DAccountTypePreferenceLoaderTest.java73 private AccountManager mAccountManager; field in AccountTypePreferenceLoaderTest
89 shadowContext.setSystemService(Context.ACCOUNT_SERVICE, mAccountManager); in setUp()
90 when(mAccountManager.getAuthenticatorTypesAsUser(anyInt())).thenReturn( in setUp()
92 when(mAccountManager.getAccountsAsUser(anyInt())).thenReturn(new Account[0]); in setUp()
/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/modules/Bluetooth/android/app/src/com/android/bluetooth/pbapclient/
DPbapClientContactsStorage.java69 private final PbapClientAccountManager mAccountManager; field in PbapClientContactsStorage
101 Collections.emptyList(), mAccountManager.getAccounts()); in onAccountsChanged()
113 mAccountManager = in PbapClientContactsStorage()
120 mAccountManager = accountManager; in PbapClientContactsStorage()
125 mAccountManager.start(); in start()
129 mAccountManager.stop(); in stop()
171 mAccountManager.removeAccount(account); in initialize()
182 return mAccountManager.getAccountForDevice(device); in getStorageAccountForDevice()
186 return mAccountManager.getAccounts(); in getStorageAccounts()
190 return mAccountManager.addAccount(account); in addAccount()
[all …]
DPbapClientAccountManager.java65 private final AccountManager mAccountManager; field in PbapClientAccountManager
103 mAccountManager = mContext.getSystemService(AccountManager.class); in PbapClientAccountManager()
316 Account[] availableAccounts = mAccountManager.getAccountsByType(mAccountType); in handleAccountCheck()
380 int visibility = mAccountManager.getAccountVisibility(account, mContext.getPackageName()); in isAccountAuthenticationServiceReady()
400 if (mAccountManager.addAccountExplicitly(account, null, null)) { in addAccountInternal()
428 if (mAccountManager.removeAccountExplicitly(account)) { in removeAccountInternal()
/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/apps/TvSettings/unbundle/java/com/android/tv/settings/unbundle/sdklib/
DAccountManagerCompat.java24 mAccountManager = accountManager; in AccountManagerCompat()
27 private final AccountManager mAccountManager; field in AccountManagerCompat
36 return mAccountManager.getAccountsByTypeAsUser(type, userHandle); in getAccountsByTypeAsUser()
40 mAccountManager.addSharedAccountsFromParentUser(parentUser, user); in addSharedAccountsFromParentUser()
/packages/apps/Contacts/tests/src/com/android/contacts/model/
DAccountTypeManagerTest.java60 @Mock private AccountManager mAccountManager; field in AccountTypeManagerTest
107 when(mAccountManager.getAccountsByType(Mockito.anyString())).thenReturn(ACCOUNTS); in testGetDefaultAccount_NoDefaultAccountPreferenceSet()
112 when(mAccountManager.getAccountsByType(Mockito.anyString())).thenReturn(ACCOUNTS); in testGetDefaultAccount_DefaultAccountPreferenceSet()
119 when(mAccountManager.getAccountsByType(Mockito.anyString())).thenReturn(ACCOUNTS); in testGetDefaultAccount_DefaultAccountPreferenceSet_NonGoogleAccountType()
126 when(mAccountManager.getAccountsByType(Mockito.anyString())).thenReturn(ACCOUNTS); in testGetDefaultAccount_DefaultAccountPreferenceSet_UnknownName()
135 mAccountManager, mPrefs, "contact_editor_default_account_key"); in getDefaultGoogleAccountName()
/packages/apps/Contacts/src/com/android/contacts/model/
DDeviceLocalAccountLocator.java35 private final AccountManager mAccountManager; field in DeviceLocalAccountLocator
40 mAccountManager = accountManager; in DeviceLocalAccountLocator()
48 @SuppressWarnings("MissingPermission") final Account[] accounts = mAccountManager in getDeviceLocalAccounts()
DAccountTypeManager.java349 private final AccountManager mAccountManager;
372 return getAccountsWithDataSets(mAccountManager.getAccounts(), typeProvider);
405 mAccountManager = AccountManager.get(mContext);
430 mAccountManager.addOnAccountsUpdatedListener(this, mMainThreadHandler, false);
484 getAccountsWithDataSets(mAccountManager.getAccounts(), mTypeProvider);
506 mAccountManager.getAuthenticatorTypes(), ContentResolver.getSyncAdapterTypes())) {
652 return getDefaultGoogleAccount(mAccountManager, sharedPreferences, defaultAccountKey);
658 mAccountManager.getAccountsByType(GoogleAccountType.ACCOUNT_TYPE);
681 final Account[] accounts = mAccountManager.getAccounts();
732 final Account[] accounts = mAccountManager.getAccountsByType(account.type);
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DDefaultAccountManager.java47 private final AccountManager mAccountManager; field in DefaultAccountManager
60 mAccountManager = accountManager; in DefaultAccountManager()
122 Account[] accounts = mAccountManager.getAccounts(); in getEligibleCloudAccounts()
191 Account[] accountsInThisType = mAccountManager.getAccountsByType(account.type); in isCloudAccount()
/packages/apps/Settings/tests/robotests/src/com/android/settings/
DMainClearTest.java107 private AccountManager mAccountManager; field in MainClearTest
514 when(mMockActivity.getSystemService(Context.ACCOUNT_SERVICE)).thenReturn(mAccountManager); in testGetAccountConfirmationIntent_no_relevant_accounts()
515 when(mAccountManager.getAccountsByType(TEST_ACCOUNT_TYPE)).thenReturn(accounts); in testGetAccountConfirmationIntent_no_relevant_accounts()
528 when(mMockActivity.getSystemService(Context.ACCOUNT_SERVICE)).thenReturn(mAccountManager); in testGetAccountConfirmationIntent_unresolved()
529 when(mAccountManager.getAccountsByType(TEST_ACCOUNT_TYPE)).thenReturn(accounts); in testGetAccountConfirmationIntent_unresolved()
547 when(mMockActivity.getSystemService(Context.ACCOUNT_SERVICE)).thenReturn(mAccountManager); in testTryShowAccountConfirmation_ok()
548 when(mAccountManager.getAccountsByType(TEST_ACCOUNT_TYPE)).thenReturn(accounts); in testTryShowAccountConfirmation_ok()
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/contacts/
DContactsStoragePreferenceControllerTest.java90 private AccountManager mAccountManager; field in ContactsStoragePreferenceControllerTest
99 when(mContext.getSystemService(eq(Context.ACCOUNT_SERVICE))).thenReturn(mAccountManager); in setUp()
100 when(mAccountManager.getAccountsAsUser(anyInt())).thenReturn(new Account[]{}); in setUp()
/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/deviceless/src/com/android/car/settings/accounts/
DAccountTypesHelperTest.java54 private AccountManager mAccountManager = AccountManager.get(application); field in AccountTypesHelperTest
174 return Shadow.extract(mAccountManager); in getShadowAccountManager()