/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/ |
D | InitialUserSetterTest.java | 80 private static final int USER_ID = 10; field in InitialUserSetterTest 135 assertThrows(IllegalArgumentException.class, () -> builder.setSwitchUserId(USER_ID)); in testInitialUserInfoBuilder_invalidSetSwitchUserId() 155 UserInfo user = expectUserExists(USER_ID); in testSwitchUser_ok_nonGuest() 156 expectSwitchUser(USER_ID); in testSwitchUser_ok_nonGuest() 159 .setSwitchUserId(USER_ID) in testSwitchUser_ok_nonGuest() 162 verifyUserSwitched(USER_ID); in testSwitchUser_ok_nonGuest() 187 expectGuestExists(USER_ID, ephemeral); // ephemeral doesn't matter in testSwitchUser_ok_guestReplaced() 189 expectGuestReplaced(USER_ID, newGuest); in testSwitchUser_ok_guestReplaced() 193 .setSwitchUserId(USER_ID) in testSwitchUser_ok_guestReplaced() 200 verifyUserDeleted(USER_ID); in testSwitchUser_ok_guestReplaced() [all …]
|
D | CarUserNoticeServiceTest.java | 68 private static final int USER_ID = 101; field in CarUserNoticeServiceTest 119 mockGetCurrentUser(USER_ID); in setUpMocks() 241 CarUserManager.USER_LIFECYCLE_EVENT_TYPE_SWITCHING, USER_ID)); in sendUserSwitchEvent()
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/accounts/ |
D | AccountSyncDetailsPreferenceControllerTest.java | 72 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 …]
|
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/users/ |
D | RestrictedProfilePinStorageTest.java | 51 private static final int USER_ID = 0; field in RestrictedProfilePinStorageTest 74 mPinStorage = new RestrictedProfilePinStorage(mLockPatternUtils, USER_ID, mConnection); in setUp() 96 LockscreenCredential.createPinOrNone(anyString()), eq(USER_ID)); in testSetPinWhenNoPinIsSet_success() 111 LockscreenCredential.createPinOrNone(anyString()), eq(USER_ID)); in testSetPinWhenWrongPinIsInput_fail() 127 eq(LockscreenCredential.createPinOrNone(mOriginalPin)), eq(USER_ID)); in testSetPinWhenCorrectPinIsInput_success() 140 eq(LockscreenCredential.createPinOrNone(mOriginalPin)), eq(USER_ID)); in testDeletePin_success() 153 LockscreenCredential.createPinOrNone(anyString()), eq(USER_ID)); in testDeletePin_fail() 163 verify(mLockPatternUtils, never()).isSecure(eq(USER_ID)); in testIsPinCorrect() 175 verify(mLockPatternUtils).isSecure(eq(USER_ID)); in testIsPinCorrect_legacy() 187 verify(mLockPatternUtils, never()).isSecure(eq(USER_ID)); in testIsPinSet() [all …]
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/ |
D | GlobalSearchLoaderTest.java | 72 TestProvidersAccess.USER_ID); in setUp() 112 TestProvidersAccess.DOWNLOADS.userId = TestProvidersAccess.OtherUser.USER_ID; in testCrossProfileRoot_notInTextSearch_beIgnored() 114 TestProvidersAccess.DOWNLOADS.userId = TestProvidersAccess.USER_ID; in testCrossProfileRoot_notInTextSearch_beIgnored() 120 TestProvidersAccess.DOWNLOADS.userId = TestProvidersAccess.OtherUser.USER_ID; in testCrossProfileRoot_inTextSearch_beIncluded() 122 TestProvidersAccess.DOWNLOADS.userId = TestProvidersAccess.USER_ID; in testCrossProfileRoot_inTextSearch_beIncluded() 179 TestProvidersAccess.DOWNLOADS.userId = TestProvidersAccess.USER_ID; in testSearchResult_includeDirectory_excludedOtherUsers() 180 TestProvidersAccess.PICKLES.userId = TestProvidersAccess.OtherUser.USER_ID; in testSearchResult_includeDirectory_excludedOtherUsers() 203 TestProvidersAccess.DOWNLOADS.userId = TestProvidersAccess.USER_ID; in testSearchResult_includeDirectory_excludedOtherUsers() 204 TestProvidersAccess.PICKLES.userId = TestProvidersAccess.USER_ID; in testSearchResult_includeDirectory_excludedOtherUsers() 284 TestProvidersAccess.PICKLES.userId = TestProvidersAccess.OtherUser.USER_ID; in testSearchResult_includeCurrentUserRootOnly() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/bugreporthandler/ |
D | BugReportHandlerPickerTest.java | 61 private static final int USER_ID = 0; field in BugReportHandlerPickerTest 137 createApplicationInfo(PACKAGE_NAME), USER_ID))); in testClickingItemSuccess() local 139 eq(USER_ID))).thenReturn(true); in testClickingItemSuccess() 143 BugReportHandlerPicker.getKey(PACKAGE_NAME, USER_ID)); in testClickingItemSuccess() 147 eq(PACKAGE_NAME), eq(USER_ID)); in testClickingItemSuccess() 149 BugReportHandlerPicker.getKey(PACKAGE_NAME, USER_ID)); in testClickingItemSuccess() 156 createApplicationInfo(PACKAGE_NAME), USER_ID))); in testClickingItemFail() local 158 eq(USER_ID))).thenReturn(false); in testClickingItemFail() 162 BugReportHandlerPicker.getKey(PACKAGE_NAME, USER_ID)); in testClickingItemFail() 166 eq(PACKAGE_NAME), eq(USER_ID)); in testClickingItemFail()
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/applications/managedomainurls/ |
D | DomainUrlsUtilsTest.java | 48 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()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/sidebar/ |
D | RootItemListBuilderTest.java | 92 Lists.newArrayList(UserId.DEFAULT_USER, TestProvidersAccess.OtherUser.USER_ID)); in testGetList_twoUsers_allMultiProfileRootsMatchOther_defaultUser() 117 mBuilder = new RootItemListBuilder(TestProvidersAccess.OtherUser.USER_ID, in testGetList_twoUsers_allMultiProfileRootsMatchOther_otherUser() 118 Lists.newArrayList(UserId.DEFAULT_USER, TestProvidersAccess.OtherUser.USER_ID)); in testGetList_twoUsers_allMultiProfileRootsMatchOther_otherUser() 142 Lists.newArrayList(UserId.DEFAULT_USER, TestProvidersAccess.OtherUser.USER_ID)); in testGetList_twoUsers_defaultUserHasAllMatchingRoots() 163 mBuilder = new RootItemListBuilder(TestProvidersAccess.OtherUser.USER_ID, in testGetList_twoUsers_secondUserFillsUpNonMatchingRoots() 164 Lists.newArrayList(UserId.DEFAULT_USER, TestProvidersAccess.OtherUser.USER_ID)); in testGetList_twoUsers_secondUserFillsUpNonMatchingRoots() 177 DOWNLOADS_DEFAULT_USER, TestProvidersAccess.OtherUser.USER_ID), in testGetList_twoUsers_secondUserFillsUpNonMatchingRoots() 179 RootItem.createStubItem(HOME_DEFAULT_USER, TestProvidersAccess.OtherUser.USER_ID), in testGetList_twoUsers_secondUserFillsUpNonMatchingRoots()
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/ |
D | InstallPackageTaskTest.java | 54 private final static int USER_ID = 0; field in InstallPackageTaskTest 55 private final static UserHandle USER_HANDLE = new UserHandle(USER_ID); 86 sInstrumentation.runOnMainSync(() -> task.run(USER_ID)); in run_success() 104 task.run(USER_ID); in run_fileIsNull_success() 118 sInstrumentation.runOnMainSync(() -> task.run(USER_ID)); in run_fileDoesNotExist_fail() 139 sInstrumentation.runOnMainSync(() -> task.run(USER_ID)); in run_packageAlreadyInstalled_success() 161 sInstrumentation.runOnMainSync(() -> task.run(USER_ID)); in run_invalidApkFile_error()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/ |
D | UtilsTest.java | 79 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() 289 ShadowBinder.setCallingUid(USER_ID); in isSettingsIntelligence_IsSI_returnTrue() 290 when(mPackageManager.getPackagesForUid(USER_ID)).thenReturn(new String[]{siPackageName}); in isSettingsIntelligence_IsSI_returnTrue() 297 ShadowBinder.setCallingUid(USER_ID); in isSettingsIntelligence_IsNotSI_returnFalse() 298 when(mPackageManager.getPackagesForUid(USER_ID)).thenReturn(new String[]{PACKAGE_NAME}); in isSettingsIntelligence_IsNotSI_returnFalse()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/enterprise/ |
D | EnterpriseSetDefaultAppsListPreferenceControllerTest.java | 64 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()
|
D | ActionDisabledByAdminDialogHelperTest.java | 70 private static final int USER_ID = 123; field in ActionDisabledByAdminDialogHelperTest 72 new EnforcedAdmin(ADMIN_COMPONENT, UserHandle.of(USER_ID)); 207 userManagerShadow.getSameProfileGroupIds().put(USER_ID, 0); in testMaybeSetLearnMoreButton()
|
D | ApplicationListFragmentTest.java | 52 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/ |
D | DownloadPackageTaskRoboTest.java | 45 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/modules/Permission/PermissionController/tests/mocking/src/com/android/permissioncontroller/hibernation/ |
D | HibernationControllerTest.kt | 60 const val USER_ID = 0 constant 109 val map = mapOf(UserHandle.of(USER_ID) to userPackages) in testHibernateApps_hibernatesAppsForUser() 115 assertTrue(hibernatedApps.contains(pkg.packageName to UserHandle.of(USER_ID))) in testHibernateApps_hibernatesAppsForUser() 124 val map = mapOf(UserHandle.of(USER_ID) to userPackages) in testHibernateApps_globallyUnusedAppIsGloballyHibernated() 139 val map = mapOf(UserHandle.of(USER_ID) to userPackages) in testHibernateApps_globallyUsedAppIsNotGloballyHibernated()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/ |
D | AppInfoWithHeaderTest.java | 150 final int USER_ID = 1002; in extraUserHandleInIntent_retrieveAppEntryWithMyUserId() local 153 mAppInfoWithHeader.mIntent.putExtra(Intent.EXTRA_USER_HANDLE, new UserHandle(USER_ID)); in extraUserHandleInIntent_retrieveAppEntryWithMyUserId() 160 when(mAppInfoWithHeader.mState.getEntry(packageName, USER_ID)).thenReturn(entry); in extraUserHandleInIntent_retrieveAppEntryWithMyUserId() 164 PackageManager.GET_PERMISSIONS, USER_ID)).thenReturn( in extraUserHandleInIntent_retrieveAppEntryWithMyUserId() 169 assertThat(mAppInfoWithHeader.mUserId).isEqualTo(USER_ID); in extraUserHandleInIntent_retrieveAppEntryWithMyUserId()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/accounts/ |
D | AccountDetailsWithSyncStatusPreferenceControllerTest.java | 63 private static final int USER_ID = 3; field in AccountDetailsWithSyncStatusPreferenceControllerTest 69 private final UserHandle mUserHandle = new UserHandle(USER_ID); 163 when(AccountSyncHelper.syncIsAllowed(eq(mAccount), anyString(), eq(USER_ID))).thenReturn( in onButtonClicked_doesNotHaveActiveSyncs_shouldSyncSyncableAdapters() 179 when(AccountSyncHelper.syncIsAllowed(mAccount, AUTHORITY, USER_ID)).thenReturn(true); in onButtonClicked_doesNotHaveActiveSyncs_syncNotAllowed_shouldNotSyncAdapter() 180 when(AccountSyncHelper.syncIsAllowed(mAccount, AUTHORITY_2, USER_ID)).thenReturn(false); in onButtonClicked_doesNotHaveActiveSyncs_syncNotAllowed_shouldNotSyncAdapter()
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/storage/ |
D | AppsStorageStatsManagerTest.java | 46 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/DocumentsUI/tests/common/com/android/documentsui/testing/ |
D | TestProvidersAccess.java | 40 public static final UserId USER_ID = UserId.of(USER_HANDLE); field in TestProvidersAccess 57 UserId userId = TestProvidersAccess.USER_ID; 173 TestProvidersAccess.USER_ID.getIdentifier() + 1); 174 public static final UserId USER_ID = UserId.of(OtherUser.USER_HANDLE); field in TestProvidersAccess.OtherUser 183 UserId userId = OtherUser.USER_ID;
|
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/ |
D | PickActivityTest.java | 75 doc.userId = TestProvidersAccess.USER_ID; in testOnDocumentPicked() 94 doc.userId = TestProvidersAccess.OtherUser.USER_ID; in testOnDocumentPicked_otherUser() 112 doc.userId = TestProvidersAccess.OtherUser.USER_ID; in testOnDocumentPicked_otherUserDoesNotReturn()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/base/ |
D | DocumentInfoTest.java | 167 otherUserDoc.userId = TestProvidersAccess.OtherUser.USER_ID; in testGetTreeDocumentUri_otherUser_shouldHaveDifferentUri() 179 otherUserDoc.userId = TestProvidersAccess.OtherUser.USER_ID; in testGetTreeDocumentUri_otherUser_sameHostAndPath() 194 otherUserDoc.userId = TestProvidersAccess.OtherUser.USER_ID; in testGetTreeDocumentUri_otherUser_userInfo()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/ |
D | RestrictedAppDetailsTest.java | 71 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/DocumentsUI/tests/unit/com/android/documentsui/dirlist/ |
D | AppsRowManagerTest.java | 88 when(mActivity.getSelectedUser()).thenReturn(TestProvidersAccess.USER_ID); in setUp() 91 Lists.newArrayList(UserId.DEFAULT_USER, TestProvidersAccess.OtherUser.USER_ID); in setUp() 177 when(mActivity.getSelectedUser()).thenReturn(TestProvidersAccess.OtherUser.USER_ID); in testUpdateView_showSelectedUserItems_otherUser() 282 when(mActivity.getSelectedUser()).thenReturn(TestProvidersAccess.OtherUser.USER_ID); in testUpdateView_noItemsOnSelectedUser_hideRow()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/picker/ |
D | ActionHandlerTest.java | 528 mHandler.openRoot(TestResolveInfo.create(), TestProvidersAccess.USER_ID); in testOpenAppRoot() 536 mHandler.openRoot(info, TestProvidersAccess.OtherUser.USER_ID); in testOpenAppRoot_otherUser() 562 mHandler.openRoot(info, TestProvidersAccess.USER_ID); in testOpenAppRoot_removeFlagsAddForwardResult() 582 mHandler.openRoot(TestResolveInfo.create(), TestProvidersAccess.USER_ID); in testOpenAppRootWithQueryContent_matchedContent() 592 mHandler.openRoot(TestResolveInfo.create(), TestProvidersAccess.OtherUser.USER_ID); in testOpenAppRoot_doesNotHappen_differentUser() 614 "image/png", /* flags= */ 0, TestProvidersAccess.OtherUser.USER_ID); in testPreviewItem_onOtherUser()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/cluster/ |
D | ClusterHomeServiceUnitTest.java | 72 private static final int USER_ID = 111; field in ClusterHomeServiceUnitTest 287 intent, activityOptions.toBundle(), USER_ID); in startFixedActivityModeAsUserInvokesFixedActivityService() 294 eq(CLUSTER_DISPLAY_ID), eq(USER_ID)); in startFixedActivityModeAsUserInvokesFixedActivityService()
|