Home
last modified time | relevance | path

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

/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/system/
DMasterClearAccountsPreferenceControllerTest.java57 private static final int USER_ID = 111; field in MasterClearAccountsPreferenceControllerTest
72 when(mCarUserManagerHelper.getCurrentProcessUserId()).thenReturn(USER_ID); in setUp()
99 getShadowUserManager().addProfile(USER_ID, USER_ID, in refreshUi_accountsPresent_showsGroup()
100 String.valueOf(USER_ID), /* profileFlags= */ 0); in refreshUi_accountsPresent_showsGroup()
101 addAccountAndDescription(USER_ID, "accountName"); in refreshUi_accountsPresent_showsGroup()
111 getShadowUserManager().addProfile(USER_ID, USER_ID, in refreshUi_noAccountsPresent_hidesGroup()
112 String.valueOf(USER_ID), /* profileFlags= */ 0); in refreshUi_noAccountsPresent_hidesGroup()
124 getShadowUserManager().addProfile(USER_ID, profileId1, in refreshUi_multipleProfiles_showsAllAccounts()
130 getShadowUserManager().addProfile(USER_ID, profileId2, in refreshUi_multipleProfiles_showsAllAccounts()
146 getShadowUserManager().addProfile(USER_ID, USER_ID, in refreshUi_missingAccountDescription_skipsAccount()
[all …]
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/vms/
DVmsClientManagerTest.java91 private static final int USER_ID = 10; field in VmsClientManagerTest
209 notifyUserSwitched(USER_ID, false); in setUp()
210 mCallingAppUid = UserHandle.getUid(USER_ID, 0); in setUp()
299 notifyUserUnlocked(USER_ID, true); in testUserUnlocked()
300 notifyUserUnlocked(USER_ID, true); in testUserUnlocked()
308 notifyUserUnlocked(USER_ID, false); in testUserUnlocked_ForegroundUserNotUnlocked()
326 notifyUserUnlocked(USER_ID, true); in testUserUnlocked_ClientNotFound()
335 notifyUserUnlocked(USER_ID, true); in testUserUnlocked_WrongPermission()
346 notifyUserUnlocked(USER_ID, true); in testUserUnlocked_BindFailed()
347 notifyUserUnlocked(USER_ID, true); in testUserUnlocked_BindFailed()
[all …]
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/accounts/
DAccountSyncDetailsPreferenceControllerTest.java72 private static final int USER_ID = 3; field in AccountSyncDetailsPreferenceControllerTest
80 private final UserHandle mUserHandle = new UserHandle(USER_ID);
225 ContentResolver.setMasterSyncAutomaticallyAsUser(/* sync= */ true, USER_ID); in refreshUi_masterSyncOff_syncDisabled_shouldNotBeChecked()
227 USER_ID); in refreshUi_masterSyncOff_syncDisabled_shouldNotBeChecked()
240 ContentResolver.setMasterSyncAutomaticallyAsUser(/* sync= */ false, USER_ID); in refreshUi_masterSyncOn_syncDisabled_shouldBeChecked()
242 USER_ID); in refreshUi_masterSyncOn_syncDisabled_shouldBeChecked()
255 ContentResolver.setMasterSyncAutomaticallyAsUser(/* sync= */ true, USER_ID); in refreshUi_masterSyncOff_syncEnabled_shouldBeChecked()
257 USER_ID); in refreshUi_masterSyncOff_syncEnabled_shouldBeChecked()
432 ContentResolver.setMasterSyncAutomaticallyAsUser(/* sync= */ true, USER_ID); in onSyncPreferenceClicked_preferenceUnchecked_shouldSetSyncAutomaticallyOff()
434 USER_ID); in onSyncPreferenceClicked_preferenceUnchecked_shouldSetSyncAutomaticallyOff()
[all …]
DAccountSyncDetailsFragmentTest.java61 private static final int USER_ID = 3; field in AccountSyncDetailsFragmentTest
67 private final UserHandle mUserHandle = new UserHandle(USER_ID);
117 eq(USER_ID), any(Bundle.class)); in onButtonClicked_doesNotHaveActiveSyncs_shouldSyncSyncableAdapters()
129 ContentResolver.setMasterSyncAutomaticallyAsUser(/* sync= */ true, USER_ID); in onButtonClicked_doesNotHaveActiveSyncs_oneTimeSyncIsOff_shouldNotSyncOffAdapters()
131 USER_ID); in onButtonClicked_doesNotHaveActiveSyncs_oneTimeSyncIsOff_shouldNotSyncOffAdapters()
138 eq(USER_ID), any(Bundle.class)); in onButtonClicked_doesNotHaveActiveSyncs_oneTimeSyncIsOff_shouldNotSyncOffAdapters()
150 ContentResolver.setMasterSyncAutomaticallyAsUser(/* sync= */ false, USER_ID); in onButtonClicked_doesNotHaveActiveSyncs_oneTimeSyncIsOn_shouldSyncOffAdapters()
152 USER_ID); in onButtonClicked_doesNotHaveActiveSyncs_oneTimeSyncIsOn_shouldSyncOffAdapters()
159 eq(USER_ID), any(Bundle.class)); in onButtonClicked_doesNotHaveActiveSyncs_oneTimeSyncIsOn_shouldSyncOffAdapters()
182 eq(USER_ID)); in onButtonClicked_doesHaveActiveSyncs_shouldCancelSyncForSyncableAdapters()
DAccountAutoSyncPreferenceControllerTest.java56 private static final int USER_ID = 0; field in AccountAutoSyncPreferenceControllerTest
57 private static final UserHandle USER_HANDLE = new UserHandle(USER_ID);
72 .thenReturn(new UserInfo(USER_ID, "name", 0)); in setUp()
99 ContentResolver.setMasterSyncAutomaticallyAsUser(true, USER_ID); in refreshUi_masterSyncOn_preferenceShouldBeChecked()
108 ContentResolver.setMasterSyncAutomaticallyAsUser(false, USER_ID); in refreshUi_masterSyncOff_preferenceShouldNotBeChecked()
128 ContentResolver.setMasterSyncAutomaticallyAsUser(false, USER_ID); in onConfirm_shouldTogglePreference()
DAccountListPreferenceControllerTest.java59 private static final int USER_ID = 0; field in AccountListPreferenceControllerTest
77 doReturn(new UserInfo(USER_ID, USER_NAME, 0)).when( in setUp()
167 mController.onAccountsUpdate(new UserHandle(USER_ID)); in onAccountsUpdate_isThisUser_shouldForceUpdate()
DChooseAccountPreferenceControllerTest.java67 private static final int USER_ID = 0; field in ChooseAccountPreferenceControllerTest
83 doReturn(new UserInfo(USER_ID, "name", 0)).when( in setUp()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/applications/managedomainurls/
DDomainUrlsUtilsTest.java48 private static final int USER_ID = 10; field in DomainUrlsUtilsTest
60 PackageManager.INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_NEVER, USER_ID); in getDomainsSummary_domainStatusSetToNever_showNoneText()
62 assertThat(DomainUrlsUtils.getDomainsSummary(mContext, TEST_PACKAGE, USER_ID, in getDomainsSummary_domainStatusSetToNever_showNoneText()
69 PackageManager.INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS_ASK, USER_ID); in getDomainsSummary_domainStatusSet_noDomains_showNoneText()
71 assertThat(DomainUrlsUtils.getDomainsSummary(mContext, TEST_PACKAGE, USER_ID, in getDomainsSummary_domainStatusSet_noDomains_showNoneText()
78 PackageManager.INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS_ASK, USER_ID); in getDomainsSummary_domainStatusSet_oneDomain_showSingleDomain()
82 assertThat(DomainUrlsUtils.getDomainsSummary(mContext, TEST_PACKAGE, USER_ID, in getDomainsSummary_domainStatusSet_oneDomain_showSingleDomain()
90 PackageManager.INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS_ASK, USER_ID); in getDomainsSummary_domainStatusSet_multipleDomain_showMultipleDomains()
95 assertThat(DomainUrlsUtils.getDomainsSummary(mContext, TEST_PACKAGE, USER_ID, in getDomainsSummary_domainStatusSet_multipleDomain_showMultipleDomains()
DClearDefaultsPreferenceControllerTest.java59 private static final int USER_ID = 10; field in ClearDefaultsPreferenceControllerTest
80 when(mCarUserManagerHelper.getCurrentProcessUserId()).thenReturn(USER_ID); in setUp()
121 mContext.getPackageManager().setDefaultBrowserPackageNameAsUser(TEST_PACKAGE_NAME, USER_ID); in refreshUi_isDefaultBrowser_hasSummary()
129 when(mIUsbManager.hasDefaults(TEST_PACKAGE_NAME, USER_ID)).thenReturn(true); in refreshUi_hasUsbDefaults_hasSummary()
159 mContext.getPackageManager().setDefaultBrowserPackageNameAsUser(TEST_PACKAGE_NAME, USER_ID); in performClick_hasUsbManager_isDefaultBrowser_clearsDefaultBrowser()
161 USER_ID)).isNotNull(); in performClick_hasUsbManager_isDefaultBrowser_clearsDefaultBrowser()
166 mContext.getPackageManager().getDefaultBrowserPackageNameAsUser(USER_ID)).isNull(); in performClick_hasUsbManager_isDefaultBrowser_clearsDefaultBrowser()
171 when(mIUsbManager.hasDefaults(TEST_PACKAGE_NAME, USER_ID)).thenReturn(true); in performClick_hasUsbDefaults_clearsUsbDefaults()
175 verify(mIUsbManager).clearDefaults(TEST_PACKAGE_NAME, USER_ID); in performClick_hasUsbDefaults_clearsUsbDefaults()
DAppLinkStatePreferenceControllerTest.java59 private static final int USER_ID = 10; field in AppLinkStatePreferenceControllerTest
77 when(mCarUserManagerHelper.getCurrentProcessUserId()).thenReturn(USER_ID); in setUp()
188 INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS_ASK, USER_ID); in refreshUi_isNotBrowserApp_hasDomainUrls_askState_entrySetToAsk()
212 INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS, USER_ID); in refreshUi_isNotBrowserApp_hasDomainUrls_alwaysState_entrySetToAlways()
236 INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_NEVER, USER_ID); in refreshUi_isNotBrowserApp_hasDomainUrls_neverState_entrySetToNever()
DDomainAppPreferenceControllerTest.java66 private static final int USER_ID = 10; field in DomainAppPreferenceControllerTest
87 when(mCarUserManagerHelper.getCurrentProcessUserId()).thenReturn(USER_ID); in setUp()
90 getShadowUserManager().addProfile(USER_ID, USER_ID, "Test Name", /* profileFlags= */ in setUp()
DDomainUrlsPreferenceControllerTest.java58 private static final int USER_ID = 10; field in DomainUrlsPreferenceControllerTest
77 when(mCarUserManagerHelper.getCurrentProcessUserId()).thenReturn(USER_ID); in setUp()
/packages/apps/Settings/tests/robotests/src/com/android/settings/enterprise/
DEnterpriseSetDefaultAppsListPreferenceControllerTest.java64 private static final int USER_ID = 0; field in EnterpriseSetDefaultAppsListPreferenceControllerTest
107 final UserInfo user = new UserInfo(USER_ID, "main", UserInfo.FLAG_ADMIN); in testMultipleAppsForOneTypeOfDefault()
112 .thenReturn(Collections.singletonList(new UserHandle(USER_ID))); in testMultipleAppsForOneTypeOfDefault()
118 .findPersistentPreferredActivities(eq(USER_ID), in testMultipleAppsForOneTypeOfDefault()
122 .findPersistentPreferredActivities(eq(USER_ID), in testMultipleAppsForOneTypeOfDefault()
143 .thenReturn(Collections.singletonList(new UserHandle(USER_ID))); in isAvailable()
156 .thenReturn(Collections.singletonList(new UserHandle(USER_ID))); in getPreferenceKey()
DApplicationListFragmentTest.java52 private static final int USER_ID = 0; field in ApplicationListFragmentTest
120 final UserInfo user = new UserInfo(USER_ID, "main", UserInfo.FLAG_ADMIN); in buildApplicationList()
/packages/apps/ManagedProvisioning/tests/robotests/src/com/android/managedprovisioning/task/
DDownloadPackageTaskRoboTest.java45 private static final int USER_ID = 0; field in DownloadPackageTaskRoboTest
64 mDownloadPackageTask.run(USER_ID); in run_doesSetManagedProvisioningDpcDownloaded()
83 mDownloadPackageTask.run(USER_ID); in run_alreadyInstalled_doesNotSetManagedProvisioningDpcDownloaded()
102 mDownloadPackageTask.run(USER_ID); in run_installsUpdate_doesSetManagedProvisioningDpcDownloaded()
114 mDownloadPackageTask.run(USER_ID); in run_notConnected_doesNotSetManagedProvisioningDpcDownloaded()
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/
DAppInfoWithHeaderTest.java149 final int USER_ID = 1002; in extraUserHandleInIntent_retrieveAppEntryWithMyUserId() local
152 mAppInfoWithHeader.mIntent.putExtra(Intent.EXTRA_USER_HANDLE, new UserHandle(USER_ID)); in extraUserHandleInIntent_retrieveAppEntryWithMyUserId()
159 when(mAppInfoWithHeader.mState.getEntry(packageName, USER_ID)).thenReturn(entry); in extraUserHandleInIntent_retrieveAppEntryWithMyUserId()
163 PackageManager.GET_PERMISSIONS, USER_ID)).thenReturn( in extraUserHandleInIntent_retrieveAppEntryWithMyUserId()
168 assertThat(mAppInfoWithHeader.mUserId).isEqualTo(USER_ID); in extraUserHandleInIntent_retrieveAppEntryWithMyUserId()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/storage/
DAppsStorageStatsManagerTest.java46 private static final int USER_ID = 10; field in AppsStorageStatsManagerTest
72 mAppsStorageStatsManager.startLoading(mLoaderManager, mApplicationInfo, USER_ID, false, in setUp()
124 mAppsStorageStatsManager.startLoading(mLoaderManager, mApplicationInfo, USER_ID, true, in callback_cachedCleared_listenerOnDataLoadedCalled()
141 mAppsStorageStatsManager.startLoading(mLoaderManager, mApplicationInfo, USER_ID, false, in callback_userDataCleared_listenerOnDataLoadedCalled()
/packages/apps/Settings/tests/robotests/src/com/android/settings/
DUtilsTest.java79 private static final int USER_ID = 1; field in UtilsTest
236 PACKAGE_NAME, PackageManager.GET_META_DATA, USER_ID); in getBadgedIcon_usePackageNameAndUserId()
238 Utils.getBadgedIcon(mIconDrawableFactory, mPackageManager, PACKAGE_NAME, USER_ID); in getBadgedIcon_usePackageNameAndUserId()
241 verify(mPackageManager).getApplicationInfoAsUser(eq(PACKAGE_NAME), anyInt(), eq(USER_ID)); in getBadgedIcon_usePackageNameAndUserId()
242 verify(mIconDrawableFactory).getBadgedIcon(mApplicationInfo, USER_ID); in getBadgedIcon_usePackageNameAndUserId()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DRestrictedAppDetailsTest.java71 private static final int USER_ID = 10; field in RestrictedAppDetailsTest
72 private static final int UID = UserHandle.getUid(USER_ID, 234);
126 .getApplicationInfoAsUser(PACKAGE_NAME, 0, USER_ID); in refreshUi_displayPreference()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/datausage/
DAppDataUsagePreferenceControllerTest.java53 private static final int USER_ID = 10; field in AppDataUsagePreferenceControllerTest
76 when(mCarUserManagerHelper.getCurrentProcessUserId()).thenReturn(USER_ID); in setUp()
/packages/modules/ExtServices/tests/src/android/ext/services/notification/
DAssistantSettingsTest.java59 private static final int USER_ID = 5; field in AssistantSettingsTest
84 handler, mResolver, USER_ID, mOnUpdateRunnable); in setUp()