Home
last modified time | relevance | path

Searched refs:driverId (Results 1 – 4 of 4) sorted by relevance

/packages/services/Car/car-lib/src/android/car/user/
DExperimentalCarUserManager.java105 public int createPassenger(@NonNull String name, @UserIdInt int driverId) { in createPassenger() argument
107 UserInfo ui = mService.createPassenger(name, driverId); in createPassenger()
124 public AndroidFuture<UserSwitchResult> switchDriver(@UserIdInt int driverId) { in switchDriver() argument
130 Log.w(TAG, "switchDriver(" + driverId + ") failed: " + err); in switchDriver()
135 mService.switchDriver(driverId, future); in switchDriver()
173 public List<Integer> getPassengers(@UserIdInt int driverId) { in getPassengers() argument
175 return getUserIdsFromUserInfos(mService.getPassengers(driverId)); in getPassengers()
/packages/services/Car/car-lib/src/android/car/
DICarUserService.aidl30 UserInfo createPassenger(@nullable String name, int driverId); in createPassenger() argument
31 void switchDriver(int driverId, in AndroidFuture<UserSwitchResult> receiver); in switchDriver() argument
38 List<UserInfo> getPassengers(int driverId); in getPassengers() argument
/packages/services/Car/service/src/com/android/car/user/
DCarUserService.java289 int driverId = allDrivers.get(i).id; in dump() local
290 writer.print(indent + "#" + i + ": id=" + driverId); in dump()
291 List<UserInfo> passengers = getPassengers(driverId); in dump()
432 public UserInfo createPassenger(@NonNull String name, @UserIdInt int driverId) { in createPassenger() argument
435 UserInfo driver = mUserManager.getUserInfo(driverId); in createPassenger()
446 UserManager.USER_TYPE_PROFILE_MANAGED, /* flags */ 0, driverId); in createPassenger()
449 Log.w(TAG_USER, "can't create a profile for user" + driverId); in createPassenger()
462 public void switchDriver(@UserIdInt int driverId, AndroidFuture<UserSwitchResult> receiver) { in switchDriver() argument
464 if (UserHelper.isHeadlessSystemUser(driverId)) { in switchDriver()
476 switchUser(driverId, mHalTimeoutMs, receiver); in switchDriver()
[all …]
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/
DCarUserServiceTest.java530 int driverId = 90; in testCreatePassenger() local
535 eq(UserManager.USER_TYPE_PROFILE_MANAGED), eq(0), eq(driverId)); in testCreatePassenger()
536 UserInfo driverInfo = new UserInfo(driverId, "driver", NO_USER_INFO_FLAGS); in testCreatePassenger()
537 doReturn(driverInfo).when(mMockedUserManager).getUserInfo(driverId); in testCreatePassenger()
538 assertEquals(userInfo, mCarUserService.createPassenger(userName, driverId)); in testCreatePassenger()
543 int driverId = 90; in testCreatePassenger_IfMaximumProfileAlreadyCreated() local
547 UserInfo driverInfo = new UserInfo(driverId, "driver", NO_USER_INFO_FLAGS); in testCreatePassenger_IfMaximumProfileAlreadyCreated()
548 doReturn(driverInfo).when(mMockedUserManager).getUserInfo(driverId); in testCreatePassenger_IfMaximumProfileAlreadyCreated()
549 assertEquals(null, mCarUserService.createPassenger(userName, driverId)); in testCreatePassenger_IfMaximumProfileAlreadyCreated()
554 int driverId = 90; in testCreatePassenger_IfDriverIsGuest() local
[all …]