Home
last modified time | relevance | path

Searched refs:newUser (Results 1 – 25 of 32) sorted by relevance

12

/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/profiles/
DAddNewProfileTaskTest.java84 UserInfo newUser = new UserInfo(mNewUserId, newUserName, /* flags= */ 0); in createNewUser_success() local
86 mockCreateUser(newUser, UserCreationResult.STATUS_SUCCESSFUL); in createNewUser_success()
98 UserInfo newUser = new UserInfo(mNewUserId, newUserName, /* flags= */ 0); in userCreated_switchToNewUser() local
100 mockCreateUser(newUser, UserCreationResult.STATUS_SUCCESSFUL); in userCreated_switchToNewUser()
106 verify(mCarUserManager).switchUser(newUser.id); in userCreated_switchToNewUser()
112 UserInfo newUser = new UserInfo(mNewUserId, newUserName, /* flags= */ 0); in userCreated_successCalled() local
114 mockCreateUser(newUser, UserCreationResult.STATUS_SUCCESSFUL); in userCreated_successCalled()
140 UserInfo newUser = new UserInfo(mNewUserId, newUserName, /* flags= */ 0); in userCreatedOnPassenger_success_stopsAndStartsUser() local
142 mockCreateUser(newUser, UserCreationResult.STATUS_SUCCESSFUL); in userCreatedOnPassenger_success_stopsAndStartsUser()
168 UserInfo newUser = new UserInfo(mNewUserId, newUserName, /* flags= */ 0); in userCreatedOnPassenger_failure_doesNotStartUser() local
[all …]
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/internal/user/
DUserHelperTest.java19 import static android.car.test.util.UserTestingHelper.newUser;
67 UserInfo newNonAdmin = newUser(userId); in testDefaultNonAdminRestrictions()
79 UserInfo newNonAdmin = newUser(userId); in testDefaultNonAdminRestrictions_nullContext_throwsException()
97 UserInfo newNonAdmin = newUser(userId, userName); in testAssignDefaultIcon()
109 UserInfo newNonAdmin = newUser(userId, userName); in testAssignDefaultIcon_nullContext_throwsException()
125 UserInfo testInfo = newUser(userId); in testGrantAdminPermissions_nonAdmin()
136 UserInfo testInfo = newUser(userId); in testGrantAdminPermissions_admin()
148 UserInfo testInfo = newUser(testUserId); in testGrantingAdminPermissionsRemovesNonAdminRestrictions()
/packages/apps/Car/SystemUI/src/com/android/systemui/car/userswitcher/
DUserSwitchTransitionViewMediator.java49 public void onBeforeUserSwitching(int newUser) {
50 mUserSwitchTransitionViewController.handleShow(newUser);
54 public void onUserChanging(int newUser, @NonNull Context userContext) {
55 mUserSwitchTransitionViewController.handleSwitching(newUser);
59 public void onUserChanged(int newUser, @NonNull Context userContext) {
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/
DInitialUserSetterTest.java398 UserHandle newUser = expectRegularUserExists(mMockedUserHandleHelper, USER_ID); in testCreateUser_ok_noflags() local
400 expectCreateFullUser("TheDude", NO_FLAGS, newUser); in testCreateUser_ok_noflags()
411 assertInitialUserSet(newUser); in testCreateUser_ok_noflags()
416 UserHandle newUser = expectAdminUserExists(mMockedUserHandleHelper, USER_ID); in testCreateUser_ok_admin() local
418 expectCreateFullUser("TheDude", UserManagerHelper.FLAG_ADMIN, newUser); in testCreateUser_ok_admin()
429 assertInitialUserSet(newUser); in testCreateUser_ok_admin()
434 UserHandle newUser = expectAdminUserExists(mMockedUserHandleHelper, USER_ID); in testCreateUser_ok_admin_setLocale() local
436 expectCreateFullUser("TheDude", UserManagerHelper.FLAG_ADMIN, newUser); in testCreateUser_ok_admin_setLocale()
448 assertInitialUserSet(newUser); in testCreateUser_ok_admin_setLocale()
599 UserHandle newUser = expectAdminUserExists(mMockedUserHandleHelper, USER_ID); in testDefaultBehavior_firstBoot_ok() local
[all …]
DCarUserServiceTest.java1955 UserHandle newUser = UserHandle.of(42); in testCreateUser_internalHalFailure() local
1956 mockUmCreateUser(mMockedUserManager, "dude", "TypeONegative", 108, newUser); in testCreateUser_internalHalFailure()
1958 mockRemoveUser(newUser); in testCreateUser_internalHalFailure()
1969 verifyUserRemoved(newUser.getIdentifier()); in testCreateUser_internalHalFailure()
1975 UserHandle newUser = UserHandle.of(42); in testCreateUser_halFailure() local
1976 mockUmCreateUser(mMockedUserManager, "dude", "TypeONegative", 108, newUser); in testCreateUser_halFailure()
1978 mockRemoveUser(newUser); in testCreateUser_halFailure()
1990 verifyUserRemoved(newUser.getIdentifier()); in testCreateUser_halFailure()
1996 UserHandle newUser = UserHandle.of(42); in testCreateUser_halTimeout() local
1997 mockUmCreateUser(mMockedUserManager, "dude", "TypeONegative", 108, newUser); in testCreateUser_halTimeout()
[all …]
/packages/apps/Nfc/src/com/android/nfc/cardemulation/
DPreferredServices.java211 UserHandle newUser = null; in loadDefaultsFromSettings() local
224 newUser = uh; in loadDefaultsFromSettings()
236 if (newUser == null) { in loadDefaultsFromSettings()
237 newUser = currentUser; in loadDefaultsFromSettings()
256 || mPaymentDefaults.mUserHandle.getIdentifier() != newUser.getIdentifier())) { in loadDefaultsFromSettings()
259 mPaymentDefaults.mUserHandle = newUser; in loadDefaultsFromSettings()
263 mPaymentDefaults.mUserHandle = newUser; in loadDefaultsFromSettings()
270 mCallback.onPreferredPaymentServiceChanged(newUser.getIdentifier(), newDefault); in loadDefaultsFromSettings()
/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/
DCarUserManagerTest.java94 UserInfo newUser = createUser("DaNewUserInTheBlock"); in testCreateUser() local
95 assertWithMessage("(%s).isGuest()", newUser.toFullString()).that(newUser.isGuest()) in testCreateUser()
98 assertWithMessage("user(%s).name", newUser.toFullString()).that(newUser.name) in testCreateUser()
102 UserInfo loadedUser = getUser(newUser.id); in testCreateUser()
103 assertUserInfo(newUser, loadedUser); in testCreateUser()
/packages/services/Car/tests/CarLibUnitTest/src/android/car/user/
DCarUserManagerUnitTest.java494 UserHandle newUser = result.getUser(); in testCreateUser_success() local
495 assertThat(newUser).isNotNull(); in testCreateUser_success()
496 assertThat(newUser.getIdentifier()).isEqualTo(108); in testCreateUser_success()
512 UserHandle newUser = result.getUser(); in testCreateUserId_success() local
513 assertThat(newUser).isNotNull(); in testCreateUserId_success()
514 assertThat(newUser.getIdentifier()).isEqualTo(108); in testCreateUserId_success()
594 UserHandle newUser = result.getUser(); in testCreateGuest_success() local
595 assertThat(newUser).isNotNull(); in testCreateGuest_success()
596 assertThat(newUser.getIdentifier()).isEqualTo(108); in testCreateGuest_success()
829 UserInfo newUser = new UserTestingHelper.UserInfoBuilder(108) in expectServiceCreateUserSucceeds() local
[all …]
/packages/services/Car/libs/car-test-lib/src/android/car/test/util/
DUserTestingHelper.java99 public static UserInfo newUser(@UserIdInt int userId) { in newUser() method in UserTestingHelper
108 public static UserInfo newUser(@UserIdInt int userId, @NonNull String userName) { in newUser() method in UserTestingHelper
118 .mapToObj(id -> newUser(id)) in newUsers()
/packages/apps/Car/SystemUI/src/com/android/systemui/car/notification/
DNotificationPanelViewMediator.java77 public void onUserChanged(int newUser, Context userContext) {
85 public void onUserChanging(int newUser, @NonNull Context userContext) {
/packages/apps/Car/SystemUI/src/com/android/systemui/car/statusbar/
DUserNameViewController.java79 public void onUserChanged(int newUser, Context userContext) {
80 updateUser(newUser);
/packages/services/Car/service/src/com/android/car/user/
DInitialUserSetter.java400 UserHandle newUser = replaceGuestIfNeeded(currentUser); in replaceUser() local
401 if (newUser == null) { in replaceUser()
408 .setSwitchUserId(newUser.getIdentifier()) in replaceUser()
411 if (newUser.getIdentifier() != currentUser.getIdentifier()) { in replaceUser()
DCarUserService.java1433 UserHandle newUser; in handleCreateUser() local
1448 newUser = newUserResponse.getUser(); in handleCreateUser()
1451 Slogf.d(TAG, "Created user: %s", newUser); in handleCreateUser()
1453 EventLogHelper.writeCarUserServiceCreateUserUserCreated(newUser.getIdentifier(), name, in handleCreateUser()
1465 /* androidFailureStatus= */ null , newUser, /* errorMessage= */ null, in handleCreateUser()
1475 request.newUserInfo.userId = newUser.getIdentifier(); in handleCreateUser()
1476 request.newUserInfo.flags = UserHalHelper.convertFlags(mUserHandleHelper, newUser); in handleCreateUser()
1495 removeCreatedUser(newUser, "HAL call failed with " in handleCreateUser()
1505 user = newUser; in handleCreateUser()
1518 removeCreatedUser(newUser, "HAL returned " in handleCreateUser()
[all …]
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/statusicon/
DStatusIconPanelViewControllerTest.java198 int newUser = 999; in onUserChanged_unregisterRegisterReceiver() local
203 .onUserChanged(newUser, userContext); in onUserChanged_unregisterRegisterReceiver()
/packages/services/Car/car_product/distant_display/apps/CarDistantDisplaySystemUI/src/com/android/systemui/car/distantdisplay/common/
DDistantDisplayController.java116 public void onUserChanged(int newUser, @NonNull Context userContext) {
123 public void onBeforeUserSwitching(int newUser) {
/packages/providers/MediaProvider/tests/src/com/android/providers/media/
DIdleServiceTest.java403 final UserHandle newUser = userManager.createUser(newUserRequest).getUser(); in createNewUser() local
404 if (newUser == null) { in createNewUser()
407 return newUser.getIdentifier(); in createNewUser()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/profiles/
DProfileHelperTest.java408 private void assertUserRemoved(int expectedResult, UserInfo newUser, UserInfo removedUser) { in assertUserRemoved() argument
410 verify(mMockCarUserManager).createGuest(newUser.name); in assertUserRemoved()
411 verify(mMockCarUserManager).switchUser(newUser.id); in assertUserRemoved()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/users/
DAppRestrictionsFragment.java247 public static void prepareArgs(@NonNull Bundle bundle, int userId, boolean newUser, in prepareArgs() argument
250 bundle.putBoolean(EXTRA_NEW_USER, newUser); in prepareArgs()
254 public static AppRestrictionsFragment newInstance(int userId, boolean newUser, in newInstance() argument
257 prepareArgs(args, userId, newUser, exitAfterUpdate); in newInstance()
/packages/apps/Car/SystemUI/src/com/android/systemui/car/hvac/
DHvacPanelOverlayViewMediator.java64 public void onUserChanged(int newUser, Context userContext) {
/packages/apps/Car/SystemUI/src/com/android/systemui/car/statusicon/ui/
DPhoneCallStatusIconController.java61 public void onUserChanged(int newUser, @NonNull Context userContext) {
DLocationStatusIconController.java62 public void onUserChanged(int newUser, @NonNull Context userContext) {
DMediaVolumeStatusIconController.java64 public void onUserChanged(int newUser, Context userContext) {
/packages/apps/Car/SystemUI/src/com/android/systemui/car/systembar/
DPrivacyChipViewController.java72 public void onUserChanged(int newUser, Context userContext) {
/packages/apps/Car/SystemUI/src/com/android/systemui/car/qc/
DSystemUIQCViewController.java60 public void onUserChanged(int newUser, Context userContext) {
/packages/modules/AdServices/sdksandbox/tests/hostsidetests/SdkSandboxStorageHostTest/src/com/android/tests/sdksandbox/host/
DSdkSandboxStorageHostTest.java168 final int newUser = mUserUtils.createAndStartSecondaryUser(); in testSdkDataRootDirectory_IsDestroyedOnUserDeletion() local
172 final String ceSdkSandboxDataRootPath = getSdkDataRootPath(newUser, true); in testSdkDataRootDirectory_IsDestroyedOnUserDeletion()
173 final String deSdkSandboxDataRootPath = getSdkDataRootPath(newUser, false); in testSdkDataRootDirectory_IsDestroyedOnUserDeletion()

12