/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/ |
D | CarUserManagerUnitTest.java | 258 UserInfo newUser = result.getUser(); in testCreateUser_withType_success() local 259 assertThat(newUser).isNotNull(); in testCreateUser_withType_success() 260 assertThat(newUser.id).isEqualTo(108); in testCreateUser_withType_success() 261 assertThat(newUser.name).isEqualTo("dude"); in testCreateUser_withType_success() 262 assertThat(newUser.userType).isEqualTo("sweet"); in testCreateUser_withType_success() 263 assertThat(newUser.flags).isEqualTo(42); in testCreateUser_withType_success() 294 UserInfo newUser = result.getUser(); in testCreateUser_success() local 295 assertThat(newUser).isNotNull(); in testCreateUser_success() 296 assertThat(newUser.id).isEqualTo(108); in testCreateUser_success() 297 assertThat(newUser.name).isEqualTo("dude"); in testCreateUser_success() [all …]
|
D | CarUserServiceTest.java | 1329 UserInfo newUser = result.getUser(); in testCreateUser_success() local 1330 assertThat(newUser).isNotNull(); in testCreateUser_success() 1331 assertThat(newUser.id).isEqualTo(userId); in testCreateUser_success() 1332 assertThat(newUser.name).isEqualTo("dude"); in testCreateUser_success() 1333 assertThat(newUser.userType).isEqualTo(UserManager.USER_TYPE_FULL_GUEST); in testCreateUser_success() 1334 assertThat(newUser.flags).isEqualTo(UserInfo.FLAG_EPHEMERAL); in testCreateUser_success() 1364 UserInfo newUser = result.getUser(); in testCreateUser_success_nullName() local 1365 assertThat(newUser).isNotNull(); in testCreateUser_success_nullName() 1366 assertThat(newUser.id).isEqualTo(userId); in testCreateUser_success_nullName() 1367 assertThat(newUser.name).isNull(); in testCreateUser_success_nullName() [all …]
|
D | ExperimentalCarUserManagerUnitTest.java | 191 UserTestingHelper.newUser(userId), null)); in expectCreateDriverSucceed() 201 UserInfo userInfo = UserTestingHelper.newUser(100); in expectCreatePassengerSucceed()
|
/packages/services/Car/tests/carservice_unit_test/src/android/car/userlib/ |
D | CarUserManagerHelperTest.java | 22 import static android.car.test.util.UserTestingHelper.newUser; 109 UserInfo newUser = new UserInfo(); in testCreateNewNonAdminUser() local 110 newUser.name = TEST_USER_NAME; in testCreateNewNonAdminUser() 111 doReturn(newUser).when(mUserManager).createUser(TEST_USER_NAME, NO_FLAGS); in testCreateNewNonAdminUser() 112 assertThat(mCarUserManagerHelper.createNewNonAdminUser(TEST_USER_NAME)).isEqualTo(newUser); in testCreateNewNonAdminUser() 145 UserInfo testInfo = newUser(userId); in testGrantAdminPermissions() 162 UserInfo newNonAdmin = newUser(userId); in testDefaultNonAdminRestrictions() 176 UserInfo testInfo = newUser(testUserId); in testGrantingAdminPermissionsRemovesNonAdminRestrictions() 302 UserInfo systemUser = newUser(UserHandle.USER_SYSTEM); in testHasInitialUser_hasOnlyWorkProfile() 304 UserInfo workProfile = newUser(10); in testHasInitialUser_hasOnlyWorkProfile()
|
D | InitialUserSetterTest.java | 342 UserInfo newUser = expectCreateFullUser(USER_ID, "TheDude", NO_FLAGS); in testCreateUser_ok_noflags() local 353 assertInitialUserSet(newUser); in testCreateUser_ok_noflags() 358 UserInfo newUser = expectCreateFullUser(USER_ID, "TheDude", UserInfo.FLAG_ADMIN); in testCreateUser_ok_admin() local 369 assertInitialUserSet(newUser); in testCreateUser_ok_admin() 374 UserInfo newUser = expectCreateFullUser(USER_ID, "TheDude", UserInfo.FLAG_ADMIN); in testCreateUser_ok_admin_setLocale() local 386 assertInitialUserSet(newUser); in testCreateUser_ok_admin_setLocale() 491 UserInfo newUser = expectCreateFullUser(USER_ID, OWNER_NAME, UserInfo.FLAG_ADMIN); in testDefaultBehavior_firstBoot_ok() local 499 assertInitialUserSet(newUser); in testDefaultBehavior_firstBoot_ok() 505 UserInfo newUser = expectCreateFullUser(USER_ID, OWNER_NAME, UserInfo.FLAG_ADMIN); in testDefaultBehavior_firstBoot_ok_setLocale() local 515 assertInitialUserSet(newUser); in testDefaultBehavior_firstBoot_ok_setLocale()
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/users/ |
D | AddNewUserTaskTest.java | 63 UserInfo newUser = new UserInfo(10, newUserName, /* flags= */ 0); in testSwitchToNewUserIfUserCreated() local 64 when(mCarUserManagerHelper.createNewNonAdminUser(newUserName)).thenReturn(newUser); in testSwitchToNewUserIfUserCreated() 69 verify(mCarUserManager).switchUser(newUser.id); in testSwitchToNewUserIfUserCreated() 75 UserInfo newUser = new UserInfo(10, newUserName, /* flags= */ 0); in testOnUserAddedSuccessCalledIfUserCreated() local 76 when(mCarUserManagerHelper.createNewNonAdminUser(newUserName)).thenReturn(newUser); in testOnUserAddedSuccessCalledIfUserCreated()
|
/packages/services/Car/service/src/com/android/car/user/ |
D | CarUserService.java | 1005 UserInfo newUser; in createUser() local 1007 newUser = mUserManager.createUser(name, userType, flags); in createUser() 1008 if (newUser == null) { in createUser() 1015 Log.d(TAG, "Created user: " + newUser.toFullString()); in createUser() 1017 EventLog.writeEvent(EventLogTags.CAR_USER_SVC_CREATE_USER_USER_CREATED, newUser.id, in createUser() 1018 UserHelper.safeName(newUser.name), newUser.userType, newUser.flags); in createUser() 1027 sendUserCreationResult(receiver, UserCreationResult.STATUS_SUCCESSFUL, newUser, null); in createUser() 1036 request.newUserInfo.userId = newUser.id; in createUser() 1037 request.newUserInfo.flags = UserHalHelper.convertFlags(newUser); in createUser() 1056 removeUser(newUser, "HAL call failed with " in createUser() [all …]
|
/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/ |
D | CarUserManagerTest.java | 328 UserInfo newUser = isGuest ? sUserManager.createGuest(sContext, name) in createNewUser() local 330 sCreatedUsers.add(newUser.id); in createNewUser() 331 Log.i(TAG, "Created new user: " + newUser.toFullString()); in createNewUser() 332 return newUser; in createNewUser()
|
/packages/services/Car/service/src/com/android/car/ |
D | CarShellCommand.java | 1092 android.content.pm.UserInfo newUser = um.createUser(name, userType, flags); 1093 if (newUser == null) { 1097 writer.printf("New user: %s\n", newUser.toFullString()); 1098 Log.i(TAG, "Created new user: " + newUser.toFullString()); 1100 request.newUserInfo.userId = newUser.id; 1101 request.newUserInfo.flags = UserHalHelper.convertFlags(newUser); 1127 writer.printf("Removing user %d due to HAL failure\n", newUser.id); 1128 boolean removed = um.removeUser(newUser.id);
|
D | CarPowerManagementService.java | 464 UserInfo newUser = mInitialUserSetter.replaceGuestIfNeeded(currentUser); in switchToNewGuestIfNecessary() local 465 if (newUser == currentUser) return; // Not a guest in switchToNewGuestIfNecessary() 468 if (newUser == null) { in switchToNewGuestIfNecessary() 473 switchUser(newUser.id, replaceGuest); in switchToNewGuestIfNecessary()
|
/packages/services/Car/car-test-lib/src/android/car/test/util/ |
D | UserTestingHelper.java | 42 public static UserInfo newUser(@UserIdInt int userId) { in newUser() method in UserTestingHelper 52 .mapToObj(id -> newUser(id)) in newUsers()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/users/ |
D | AppRestrictionsFragment.java | 239 public static void prepareArgs(@NonNull Bundle bundle, int userId, boolean newUser) { in prepareArgs() argument 241 bundle.putBoolean(EXTRA_NEW_USER, newUser); in prepareArgs() 244 public static AppRestrictionsFragment newInstance(int userId, boolean newUser) { in newInstance() argument 246 prepareArgs(args, userId, newUser); in newInstance()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/hal/ |
D | UserHalServiceTest.java | 459 UserInfo newUser = actualResponse.userToSwitchOrCreate; in testGetUserInfo_successCreateUser() local 460 assertThat(newUser).isNotNull(); in testGetUserInfo_successCreateUser() 461 assertThat(newUser.userId).isEqualTo(UserHandle.USER_NULL); in testGetUserInfo_successCreateUser() 462 assertThat(newUser.flags).isEqualTo(newUserFlags); in testGetUserInfo_successCreateUser()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/users/ |
D | UserSettings.java | 482 private void onManageUserClicked(int userId, boolean newUser) { in onManageUserClicked() argument 499 extras.putBoolean(RestrictedProfileSettings.EXTRA_NEW_USER, newUser); in onManageUserClicked()
|
/packages/apps/Settings/src/com/android/settings/users/ |
D | UserSettings.java | 479 private void openUserDetails(UserInfo userInfo, boolean newUser) { in openUserDetails() argument 482 extras.putBoolean(AppRestrictionsFragment.EXTRA_NEW_USER, newUser); in openUserDetails()
|