Home
last modified time | relevance | path

Searched refs:addUser (Results 1 – 25 of 38) sorted by relevance

12

/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/
DUserLifecycleEventFilterTest.java65 assertThrows(NullPointerException.class, () -> builder.addUser(null)); in testAddUser_nullUser_throws()
72 assertThrows(IllegalArgumentException.class, ()-> builder.addUser(UserHandle.ALL)); in testAddUser_specialUserHandle_throws()
74 ()-> builder.addUser(UserHandle.CURRENT_OR_SELF)); in testAddUser_specialUserHandle_throws()
76 ()-> builder.addUser(UserHandle.of(UserHandle.USER_NULL))); in testAddUser_specialUserHandle_throws()
99 .addUser(USER111).addUser(USER111).addUser(USER113).addUser(USER111).build(); in testBuild_duplicateUserIdsIgnored()
107 .addUser(UserHandle.CURRENT).build(); in testBuild_currentUser_notEvaluatedAtFilterCreation()
118 .addUser(USER111).build(); in testApply_nullEvent_throws()
145 .addUser(USER111).build(); in testApply_userIdMatches_returnsTrue()
153 .addUser(USER112).build(); in testApply_previousUserIdMatches_returnsTrue()
162 .addUser(USER112).addUser(USER113).build(); in testApply_userIdsDoNotMatch_returnsFalse()
[all …]
DAppLifecycleListenerTest.java49 new UserLifecycleEventFilter.Builder().addUser(USER111).build();
DCarUserServiceTest.java366 .addUser(UserHandle.of(mAdminUserId)).build(), mockListener2); in testOnUserLifecycleEvent_notifyListener_nonNullFilter()
369 .addUser(UserHandle.of(mRegularUserId)).build(), mockListener3); in testOnUserLifecycleEvent_notifyListener_nonNullFilter()
600 .addUser(UserHandle.of(mRegularUserId)).build(), in testOnUserLifecycleEvent_notifyReceiver_nonNullFilter()
622 new UserLifecycleEventFilter.Builder().addUser(UserHandle.of(mRegularUserId)) in testOnUserLifecycleEvent_notifyReceiver_singleReceiverWithMultipleFilters()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/security/
DSecurityEntryPreferenceControllerTest.java59 getShadowUserManager().addUser(UserHandle.myUserId(), "name", UserInfo.FLAG_GUEST); in getAvailabilityStatus_guestUser_disabledForUser()
67 getShadowUserManager().addUser(UserHandle.myUserId(), "name", UserInfo.FLAG_GUEST); in getAvailabilityStatus_guestUser_disabledForUser_zoneWrite()
75 getShadowUserManager().addUser(UserHandle.myUserId(), "name", UserInfo.FLAG_GUEST); in getAvailabilityStatus_guestUser_disabledForUser_zoneRead()
83 getShadowUserManager().addUser(UserHandle.myUserId(), "name", UserInfo.FLAG_GUEST); in getAvailabilityStatus_guestUser_disabledForUser_zoneHidden()
90 getShadowUserManager().addUser(UserHandle.myUserId(), "name", /* flags= */ 0); in getAvailabilityStatus_nonGuestUser_available()
98 getShadowUserManager().addUser(UserHandle.myUserId(), "name", /* flags= */ 0); in getAvailabilityStatus_nonGuestUser_available_zoneWrite()
106 getShadowUserManager().addUser(UserHandle.myUserId(), "name", /* flags= */ 0); in getAvailabilityStatus_nonGuestUser_available_zoneRead()
114 getShadowUserManager().addUser(UserHandle.myUserId(), "name", /* flags= */ 0); in getAvailabilityStatus_nonGuestUser_available_zoneHidden()
/packages/modules/IntentResolver/tests/unit/src/com/android/intentresolver/data/repository/
DFakeUserRepositoryTest.kt43 fun addUser() = runTest { in <lambda>() method
49 repo.addUser(personalUser, true) in <lambda>()
52 repo.addUser(workUser, false) in <lambda>()
105 repo.addUser(workUser, true) in <lambda>()
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/specialaccess/interactacrossprofiles/
DInteractAcrossProfilesSettingsTest.java103 mShadowUserManager.addUser( in collectConfigurableApps_fromPersonal_returnsCombinedPackages()
128 mShadowUserManager.addUser( in collectConfigurableApps_fromWork_returnsCombinedPackages()
154 mShadowUserManager.addUser( in collectConfigurableApps_onlyOneProfile_returnsEmpty()
169 mShadowUserManager.addUser( in getNumberOfEnabledApps_returnsNumberOfEnabledApps()
DInteractAcrossProfilesDetailsTest.java79 mShadowUserManager.addUser( in getPreferenceSummary_appOpAllowed_returnsAllowed()
102 mShadowUserManager.addUser( in getPreferenceSummary_appOpNotAllowed_returnsNotAllowed()
125 mShadowUserManager.addUser( in getPreferenceSummary_noWorkProfile_returnsNotAllowed()
DInteractAcrossProfilesControllerTest.java51 shadowOf(mUserManager).addUser( in getAvailabilityStatus_multipleProfiles_returnsAvailable()
65 shadowOf(mUserManager).addUser( in getAvailabilityStatus_oneProfile_returnsDisabled()
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/
DSilentStatusBarPreferenceControllerTest.java78 um.addUser(UserHandle.myUserId(), "Another User", UserInfo.FLAG_FULL); in isAvailable_extraUser_available()
86 um.addUser(UserHandle.myUserId(), "Guest", UserInfo.FLAG_GUEST); in isAvailable_guestUser_disabled()
/packages/modules/IntentResolver/tests/unit/src/com/android/intentresolver/domain/interactor/
DUserInteractorTest.kt95 fakeUserRepo.addUser(cloneUser, available = true) in <lambda>()
151 userRepo.addUser(workUser, false) in <lambda>()
/packages/apps/Settings/src/com/android/settings/users/
DUserSettings.java1495 private void updateAddUserCommon(Context context, RestrictedPreference addUser,
1500 addUser.setVisible(true);
1501 addUser.setSelectable(true);
1506 addUser.setEnabled(canAddMoreUsers && !mAddingUser && canSwitchUserNow());
1509 addUser.setSummary(getString(R.string.user_add_max_count));
1511 addUser.setSummary(null);
1513 if (addUser.isEnabled()) {
1514 addUser.setDisabledByAdmin(
1518 addUser.setVisible(false);
/packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/
DDashboardFeatureProviderImplTest.java713 ShadowUserManager.getShadow().addUser(10, "Someone", 0); in openTileIntent_profileSelectionDialog_shouldShow()
729 ShadowUserManager.getShadow().addUser(10, "Someone", 0); in openTileIntent_profileSelectionDialog_explicitMetadataShouldShow()
746 ShadowUserManager.getShadow().addUser(10, "Someone", 0); in openTileIntent_profileSelectionDialog_shouldNotShow()
764 ShadowUserManager.getShadow().addUser(userId, "Someone", 0); in openTileIntent_profileSelectionDialog_validUserHandleShouldNotShow()
785 ShadowUserManager.getShadow().addUser(10, "Someone", 0); in openTileIntent_profileSelectionDialog_invalidUserHandleShouldShow()
804 ShadowUserManager.getShadow().addUser(userId, "Someone", 0); in openTileIntent_profileSelectionDialog_unresolvableWorkProfileIntentShouldNotShow()
/packages/modules/IntentResolver/tests/shared/src/com/android/intentresolver/data/repository/
DFakeUserRepository.kt33 fun addUser(user: User, available: Boolean) { in <lambda>() method
/packages/apps/Settings/tests/robotests/testutils/com/android/settings/testutils/shadow/
DShadowUserManager.java95 @Override public UserHandle addUser(int id, String name, int flags) { in addUser() method in ShadowUserManager
96 UserHandle userHandle = super.addUser(id, name, flags); in addUser()
/packages/apps/Settings/tests/robotests/src/com/android/settings/system/
DFactoryResetDemoUserPreferenceControllerTest.java87 mShadowUserManager.addUser(UserHandle.myUserId(), "test", UserInfo.FLAG_DEMO); in isAvailable_demoUser()
/packages/apps/ManagedProvisioning/tests/robotests/src/com/android/managedprovisioning/task/interactacrossprofiles/
DCrossProfileAppsSnapshotTest.java61 shadowOf(mUserManager).addUser(TEST_USER_ID, "Username", /* flags= */ 0); in setUp()
/packages/apps/Settings/tests/robotests/src/com/android/settings/users/
DMultiUserSwitchBarControllerTest.java88 mUserManager.addUser(10, "Test", UserInfo.FLAG_ADMIN); in onStart_userIsNotMain_shouldNotBeEnabled()
/packages/modules/DeviceLock/tests/unittests/src/com/android/server/devicelock/
DDeviceLockServiceImplTest.java162 mSystemUser = mShadowUserManager.addUser(USER_SYSTEM, SYSTEM_USER_NAME, /* flags= */ 0); in setup()
163 mSecondaryUser = mShadowUserManager.addUser(USER_SECONDARY, SECONDARY_USER_NAME, in setup()
/packages/apps/ManagedProvisioning/tests/robotests/src/com/android/managedprovisioning/task/
DUpdateInteractAcrossProfilesAppOpTaskTest.java88 shadowOf(mUserManager).addUser(TEST_USER_ID, "Username", /* flags= */ 0); in setUp()
/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/
DCarUserManagerLifecycleEventFilterTest.java83 .addUser(UserHandle.CURRENT)
DCarUserManagerTest.java155 .addUser(UserHandle.of(newUserId)).build(); in testLifecycleMultipleListeners()
/packages/services/Car/car-lib/src/android/car/user/
DUserLifecycleEventFilter.java174 public Builder addUser(@NonNull UserHandle userHandle) { in addUser() method in UserLifecycleEventFilter.Builder
/packages/apps/Car/Cluster/ClusterHomeSample/src/com/android/car/cluster/home/
DClusterHomeApplication.java212 .addUser(UserHandle.CURRENT) in initClusterHome()
/packages/modules/IntentResolver/tests/activity/src/com/android/intentresolver/
DResolverActivityTest.java1089 mFakeUserRepo.addUser( in markOtherProfileAvailability()
1093 mFakeUserRepo.addUser( in markOtherProfileAvailability()
/packages/apps/Settings/tests/robotests/src/com/android/settings/biometrics/face/
DFaceEnrollIntroductionTest.java633 mUserManager.addUser(10, "", 0); in testFaceEnrollIntroduction_maxFacesNotEnrolled_addUserProfile()

12