Home
last modified time | relevance | path

Searched refs:createUser (Results 1 – 25 of 51) sorted by relevance

123

/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/
DCarDevicePolicyManagerTest.java68 UserInfo user = createUser(); in testRemoveUser()
92 UserInfo user = createUser(); in testRemoveUser_currentUserSetEphemeral()
126 CreateUserResult result = mCarDpm.createUser(name, type); in testCreateUser()
151 CreateUserResult result = mCarDpm.createUser(name, type); in testCreateAdminUser()
177 CreateUserResult result = mCarDpm.createUser(name, type); in testCreateGuestUser()
202 UserInfo user = createUser(); in testStartUserInBackground()
215 UserInfo user = createUser(); in testStopUser()
DCarMultiUserTestBase.java222 protected UserInfo createUser() throws Exception { in createUser() method in CarMultiUserTestBase
223 return createUser("NonGuest"); in createUser()
227 protected UserInfo createUser(String name) throws Exception { in createUser() method in CarMultiUserTestBase
228 return createUser(name, /* isGuest= */ false); in createUser()
238 return createUser(name, /* isGuest= */ true); in createGuest()
242 private UserInfo createUser(@Nullable String name, boolean isGuest) throws Exception { in createUser() method in CarMultiUserTestBase
258 mCarUserManager.createUser(userCreationRequestBuilder.setName(name).build(), Runnable::run, in createUser()
DCarUserManagerTest.java94 UserInfo newUser = createUser("DaNewUserInTheBlock"); in testCreateUser()
127 int newUserId = createUser("Test").id; in testLifecycleMultipleListeners()
331 int newUserId = createUser().id; in testPersistentUserResumeToUser()
365 int newUserId = createUser().id; in testSwitchUserUxRestrictionFailure()
/packages/services/Car/tests/carservice_unit_test/src/android/car/admin/
DCarDevicePolicyManagerUnitTest.java106 CreateUserResult result = mMgr.createUser("TheDude", 100); in testCreateUser_success()
115 doThrow(new RemoteException("D'OH!")).when(mService).createUser(eq("TheDude"), eq(100), in testCreateUser_remoteException()
119 CreateUserResult result = mMgr.createUser("TheDude", 100); in testCreateUser_remoteException()
128 doThrow(new SecurityException("D'OH!")).when(mService).createUser(eq("TheDude"), eq(100), in testCreateUser_securityException()
131 assertThrows(SecurityException.class, () -> mMgr.createUser("TheDude", 100)); in testCreateUser_securityException()
206 }).when(mService).createUser(eq(name), eq(user.id), notNull()); in mockCreateUser()
/packages/services/Car/tests/CarLibUnitTest/src/android/car/user/
DCarUserManagerUnitTest.java486 mMgr.createUser(new UserCreationRequest.Builder().setName("dude").build(), Runnable::run, in testCreateUser_success()
504 AsyncFuture<UserCreationResult> future = mMgr.createUser("dude", 42); in testCreateUserId_success()
524 mMgr.createUser(new UserCreationRequest.Builder().setName("dude").build(), Runnable::run, in testCreateUser_remoteException()
539 AsyncFuture<UserCreationResult> future = mMgr.createUser("dude", 42); in testCreateUserId_remoteException()
551 doThrow(new RuntimeException("D'OH!")).when(mService).createUser(notNull(), anyInt(), in testCreateUser_runtimeException()
556 mMgr.createUser(new UserCreationRequest.Builder().setName("dude").build(), Runnable::run, in testCreateUser_runtimeException()
568 doThrow(new RuntimeException("D'OH!")).when(mService).createUser(notNull(), anyInt(), in testCreateUserId_runtimeException()
571 AsyncFuture<UserCreationResult> future = mMgr.createUser("dude", 42); in testCreateUserId_runtimeException()
835 }).when(mService).createUser(notNull(), anyInt(), notNull()); in expectServiceCreateUserSucceeds()
839 doThrow(new RemoteException("D'OH!")).when(mService).createUser(notNull(), anyInt(), in expectServiceCreateUserFails()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/
DCarUserServiceTest.java1900 () -> mCarUserService.createUser("dude", null, 108, ASYNC_CALL_TIMEOUT_MS, in testCreateUser_nullType()
1908 .createUser("dude", "TypeONegative", 108, ASYNC_CALL_TIMEOUT_MS, null, in testCreateUser_nullReceiver()
1918 createUser("dude", "TypeONegative", 108, ASYNC_CALL_TIMEOUT_MS, mUserCreationResultCallback, in testCreateUser_umCreateReturnsNull()
1938 createUser("dude", "TypeONegative", 108, ASYNC_CALL_TIMEOUT_MS, mUserCreationResultCallback, in testCreateUser_umCreateThrowsException()
1960 createUser("dude", "TypeONegative", 108, ASYNC_CALL_TIMEOUT_MS, mUserCreationResultCallback, in testCreateUser_internalHalFailure()
1980 createUser("dude", "TypeONegative", 108, ASYNC_CALL_TIMEOUT_MS, mUserCreationResultCallback, in testCreateUser_halFailure()
2001 createUser("dude", "TypeONegative", 108, ASYNC_CALL_TIMEOUT_MS, mUserCreationResultCallback, in testCreateUser_halTimeout()
2023 createUser("dude", "TypeONegative", 108, ASYNC_CALL_TIMEOUT_MS, mUserCreationResultCallback, in testCreateUser_halServiceThrowsRuntimeException()
2044 createUser("dude", UserManager.USER_TYPE_FULL_SECONDARY, UserManagerHelper.FLAG_EPHEMERAL, in testCreateUser_halNotSupported_success()
2065 createUser("dude", UserManager.USER_TYPE_FULL_SECONDARY, /* flags= */ 0, in testCreateUser_disallowAddUser()
[all …]
DBaseCarUserServiceTestCase.java438 mCarUserService.createUser("name", type, flags, ASYNC_CALL_TIMEOUT_MS, resultCallbackImpl, in createUserWithRestrictionsInvalidTypes()
452 mCarUserService.createUser("name", userType, flags, ASYNC_CALL_TIMEOUT_MS, in createUserWithRestrictionsInvalidTypes()
476 protected void createUser(@Nullable String name, @NonNull String userType, int flags, in createUser() method in BaseCarUserServiceTestCase
479 mCarUserService.createUser(name, userType, flags, timeoutMs, callback, in createUser()
751 }).when(mUserHal).createUser(captor.capture(), eq(ASYNC_CALL_TIMEOUT_MS), notNull()); in mockHalCreateUser()
756 doThrow(exception).when(mUserHal).createUser(any(), eq(ASYNC_CALL_TIMEOUT_MS), notNull()); in mockHalCreateUserThrowsRuntimeException()
1061 verify(mUserHal, never()).createUser(any(), anyInt(), any()); in assertNoHalUserCreation()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/admin/
DCarDevicePolicyServiceTest.java143 mService.createUser("name", type, mUserCreationResultCallbackImpl); in invalidCreateUserTypeTest()
167 mService.createUser("name", carDpmUserType, mUserCreationResultCallbackImpl); in createUserOkTest()
188 verify(mCarUserService).createUser(argument.capture(), /* timeoutMs= */ in createUserOkTest()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/hal/
DUserHalServiceTest.java1148 () -> myHalService.createUser(UserHalHelper.emptyCreateUserRequest(), in testCreateUser_noHalSupported()
1155 .createUser(null, HAL_TIMEOUT_MS, noOpCallback())); in testCreateUser_noRequest()
1161 .createUser(UserHalHelper.emptyCreateUserRequest(), 0, noOpCallback())); in testCreateUser_invalidTimeout()
1163 .createUser(UserHalHelper.emptyCreateUserRequest(), -1, noOpCallback())); in testCreateUser_invalidTimeout()
1173 .createUser(request, HAL_TIMEOUT_MS, null)); in testCreateUser_noCallback()
1193 mUserHalService.createUser(newValidCreateUserRequest(), HAL_TIMEOUT_FOR_NEGATIVE_TESTS_MS, in testCreateUser_halSetTimedOut()
1209 mUserHalService.createUser(newValidCreateUserRequest(), HAL_TIMEOUT_FOR_NEGATIVE_TESTS_MS, in testCreateUser_halDidNotReply()
1226 mUserHalService.createUser(newValidCreateUserRequest(), HAL_TIMEOUT_FOR_NEGATIVE_TESTS_MS, in testCreateUser_halReplyWithWrongRequestId()
1247 mUserHalService.createUser(request, HAL_TIMEOUT_MS, callback); in testCreateUser_success()
1285 mUserHalService.createUser(request, HAL_TIMEOUT_MS, callback); in testCreateUser_failure()
[all …]
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/profiles/
DProfileHelperTest.java346 verify(mMockCarUserManager).createUser(DEFAULT_ADMIN_NAME, UserInfo.FLAG_ADMIN); in testRemoveUser_removesLastAdminUser_createsAndSwitchesToNewAdminUser()
368 verify(mMockCarUserManager).createUser(DEFAULT_ADMIN_NAME, UserInfo.FLAG_ADMIN); in testRemoveUser_removesLastAdminUserFailsCreateNewUser_doesNotRemoveOrSwitchUser()
523 when(mMockCarUserManager.createUser(any(), anyInt())).thenReturn(asyncFuture); in mockCreateUserFail()
530 when(mMockCarUserManager.createUser(name, flag)) in mockCreateUser()
/packages/services/Car/libs/car-test-lib/src/android/car/test/mocks/
DAndroidMockitoHelper.java190 when(um.createUser(isNewUserRequest(name, userType, flags))).thenReturn(response); in mockUmCreateUser()
199 when(um.createUser(isNewUserRequest(name, userType, flags))).thenReturn(response); in mockUmCreateUser()
208 when(um.createUser(isNewUserRequest(name, userType, flags))).thenThrow(e); in mockUmCreateUser()
218 when(um.createUser( in mockUmCreateGuest()
/packages/modules/AdServices/sdksandbox/tests/hostsidetests/src/com/android/tests/sdksandbox/host/
DSdkSandboxShellHostTest.java129 int otherUserId = getDevice().createUser("TestUser_" + System.currentTimeMillis()); in testStartSdkSandboxFailsForIncorrectUser()
178 int otherUserId = getDevice().createUser("TestUser_" + System.currentTimeMillis()); in testStopSdkSandboxFailsForIncorrectUser()
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/users/
DUserFragment.java129 mCreateUserButton.setOnClickListener((v) -> createUser()); in onViewCreated()
153 private void createUser() { in createUser() method in UserFragment
179 result = getResult(mCarUserManager.createUser(name, flags)); in createUser()
DProfileUserFragment.java115 createUser(/* restricted= */ true); in onViewCreated()
119 createUser(/* restricted= */ false); in onViewCreated()
185 private void createUser(boolean restricted) { in createUser() method in ProfileUserFragment
DSimpleUserPickerFragment.java183 mCreateUserButton.setOnClickListener(v -> createUser()); in onViewCreated()
349 private void createUser() { in createUser() method in SimpleUserPickerFragment
356 AsyncFuture<UserCreationResult> future = mCarUserManager.createUser(name, /* flags= */ 0); in createUser()
/packages/services/Car/car-lib/src/android/car/admin/
DICarDevicePolicyService.aidl30 void createUser(String name, int flags, in ResultCallbackImpl<UserCreationResult> callback); in createUser() method
DCarDevicePolicyManager.java197 public CreateUserResult createUser(@Nullable String name, @UserType int type) { in createUser() method in CarDevicePolicyManager
209 mService.createUser(name, type, resultCallbackImpl); in createUser()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/profiles/
DAddNewProfileTaskTest.java92 verify(mCarUserManager).createUser(newUserName, /* flags= */ 0); in createNewUser_success()
196 when(mCarUserManager.createUser(anyString(), anyInt())) in mockCreateUser()
DAddProfileHandlerTest.java127 when(mCarUserManager.createUser(anyString(), anyInt())) in newProfileConfirmed_invokesCreateNewUser()
134 verify(mCarUserManager).createUser( in newProfileConfirmed_invokesCreateNewUser()
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/admin/
DDevicePolicyFragment.java145 mCreateUserButton.setOnClickListener((v) -> createUser()); in onViewCreated()
227 private void createUser() { in createUser() method in DevicePolicyFragment
242 CreateUserResult result = mCarDevicePolicyManager.createUser(name, type); in createUser()
/packages/services/Car/service/src/com/android/car/admin/
DCarDevicePolicyService.java153 public void createUser(@Nullable String name, @CarDevicePolicyManager.UserType int type, in createUser() method in CarDevicePolicyService
181 mCarUserService.createUser(userCreationRequestBuilder.build(), HAL_TIMEOUT_MS, in createUser()
/packages/modules/AdServices/sdksandbox/tests/testutils/src/android/app/sdksandbox/hosttestutils/
DSecondaryUserUtils.java50 mSecondaryUserId = mTest.getDevice().createUser(name); in createAndStartSecondaryUser()
/packages/services/Car/car-lib/src/android/car/
DICarUserService.aidl41 void createUser(in UserCreationRequest userCreationRequest, int timeoutMs, in createUser() method
/packages/services/Car/car-lib/src/android/car/user/
DCarUserManager.java648 createUser(userCreationRequestBuilder.setGuest().build(), Runnable::run, future::complete); in createGuest()
661 public AsyncFuture<UserCreationResult> createUser(@Nullable String name, in createUser() method in CarUserManager
677 createUser(userCreationRequestBuilder.build(), Runnable::run, future::complete); in createUser()
692 public void createUser(@NonNull UserCreationRequest userCreationRequest, in createUser() method in CarUserManager
724 mService.createUser(userCreationRequest, HAL_TIMEOUT_MS, resultCallbackImpl); in createUser()
/packages/apps/Car/Settings/src/com/android/car/settings/profiles/
DAddNewProfileTask.java57 AsyncFuture<UserCreationResult> future = mCarUserManager.createUser(profileNames[0], in doInBackground()

123