Home
last modified time | relevance | path

Searched refs:mCarUserManager (Results 1 – 18 of 18) sorted by relevance

/packages/services/Car/tests/CarSecurityPermissionTest/src/com/android/car/user/
DCarUserManagerPermissionTest.java59 private CarUserManager mCarUserManager; field in CarUserManagerPermissionTest
68 mCarUserManager = (CarUserManager) car.getCarManager(CAR_USER_SERVICE); in setUp()
74 Exception e = expectThrows(SecurityException.class, () -> mCarUserManager.switchUser(100)); in testSwitchUserPermission()
82 () -> mCarUserManager.updatePreCreatedUsers()); in testUpdatePreCreatedUserPermission()
90 () -> mCarUserManager.createUser(null, UserManager.USER_TYPE_FULL_SECONDARY, 0)); in testCreateUserPermission()
98 () -> invokeMethodWithShellPermissions(mCarUserManager, in testCannotCreateAdminUserWithoutManageUsersPermission()
107 () -> invokeMethodWithShellPermissions(mCarUserManager, in testCannotCreateAdminUserWithTypeWithoutManageUsersPermission()
117 () -> mCarUserManager.removeUser(100)); in testRemoveUserPermission()
127 () -> mCarUserManager.addListener(Runnable::run, listener)); in testAddListenerPermission()
135 invokeMethodWithShellPermissionsNoReturn(mCarUserManager, in testRemoveListenerPermission()
[all …]
/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/
DCarUserManagerTest.java112 mCarUserManager.addListener(Runnable::run, listener1); in testGuestUserResumeToNewGuestUser()
115 mCarUserManager.removeListener(listener1); in testGuestUserResumeToNewGuestUser()
124 mCarUserManager.addListener(Runnable::run, listener2); in testGuestUserResumeToNewGuestUser()
140 mCarUserManager.removeListener(listener2); in testGuestUserResumeToNewGuestUser()
160 mCarUserManager.addListener(Runnable::run, listener); in testSecuredGuestUserResumeToSameUser()
165 mCarUserManager.removeListener(listener); in testSecuredGuestUserResumeToSameUser()
191 mCarUserManager.addListener(Runnable::run, listener); in testPersistentUserResumeToUser()
202 mCarUserManager.removeListener(listener); in testPersistentUserResumeToUser()
DCarMultiUserTestBase.java71 protected CarUserManager mCarUserManager; field in CarMultiUserTestBase
92 mCarUserManager = getCarService(Car.CAR_USER_SERVICE); in setMultiUserFixtures()
219 ? mCarUserManager.createGuest(name) in createUser()
220 : mCarUserManager.createUser(name, /* flags= */ 0)) in createUser()
279 mCarUserManager.addListener(Runnable::run, listener); in switchUser()
283 AsyncFuture<UserSwitchResult> future = mCarUserManager.switchUser(userId); in switchUser()
294 mCarUserManager.removeListener(listener); in switchUser()
303 UserRemovalResult result = mCarUserManager.removeUser(userId); in removeUser()
DCarUserManagerLifeCycleTest.java110 mCarUserManager.addListener(mExecutor, startListener); in testLifecycleListener()
138 mCarUserManager.removeListener(startListener); in testLifecycleListener()
149 mCarUserManager.addListener(mExecutor, stopListener); in testLifecycleListener()
179 mCarUserManager.removeListener(stopListener); in testLifecycleListener()
/packages/apps/Car/SystemUI/src/com/android/systemui/car/statusbar/
DUserNameViewController.java49 private CarUserManager mCarUserManager; field in UserNameViewController
108 if (mCarUserManager != null) { in removeAll()
109 mCarUserManager.removeListener(mUserLifecycleListener); in removeAll()
118 mCarUserManager = (CarUserManager) car.getCarManager(Car.CAR_USER_SERVICE); in registerForUserChangeEvents()
119 if (mCarUserManager != null && !mUserLifecycleListenerRegistered) { in registerForUserChangeEvents()
120 mCarUserManager.addListener(Runnable::run, mUserLifecycleListener); in registerForUserChangeEvents()
/packages/services/Car/tests/UserSwitchMonitorApp/src/com/google/android/car/userswitchmonitor/
DUserSwitchMonitorService.java59 private CarUserManager mCarUserManager; field in UserSwitchMonitorService
66 mCarUserManager = (CarUserManager) mCar.getCarManager(Car.CAR_USER_SERVICE); in onCreate()
67 mCarUserManager.addListener((r)-> r.run(), mListener); in onCreate()
96 if (mCarUserManager != null) { in onDestroy()
97 mCarUserManager.removeListener(mListener); in onDestroy()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/profiles/
DAddNewProfileTaskTest.java50 private CarUserManager mCarUserManager; field in AddNewProfileTaskTest
63 mTask = new AddNewProfileTask(mContext, mCarUserManager, mAddNewProfileListener); in createAsyncTask()
76 verify(mCarUserManager).createUser(newUserName, /* flags= */ 0); in testTaskCallsCreateNewUser()
89 verify(mCarUserManager).switchUser(newUser.id); in testSwitchToNewUserIfUserCreated()
124 when(mCarUserManager.createUser(anyString(), anyInt())) in mockCreateUser()
/packages/apps/Car/SystemUI/src/com/android/systemui/car/systembar/
DPrivacyChipViewController.java69 private CarUserManager mCarUserManager; field in PrivacyChipViewController
224 if (mCarUserManager != null) { in removeAll()
225 mCarUserManager.removeListener(mUserLifecycleListener); in removeAll()
257 mCarUserManager = (CarUserManager) car.getCarManager(Car.CAR_USER_SERVICE); in registerForUserChangeEvents()
258 if (mCarUserManager != null && !mUserLifecycleListenerRegistered) { in registerForUserChangeEvents()
259 mCarUserManager.addListener(Runnable::run, mUserLifecycleListener); in registerForUserChangeEvents()
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/users/
DUserFragment.java75 private CarUserManager mCarUserManager; field in UserFragment
106 mCarUserManager = (CarUserManager) car.getCarManager(Car.CAR_USER_SERVICE); in onViewCreated()
159 future = mCarUserManager.createGuest(name); in createUser()
173 future = mCarUserManager.createUser(name, UserManager.USER_TYPE_FULL_SECONDARY, flags); in createUser()
200 UserRemovalResult result = mCarUserManager.removeUser(userId); in removeUser()
214 AsyncFuture<UserSwitchResult> future = mCarUserManager.switchUser(userId); in switchUser()
281 UserIdentificationAssociationResponse result = mCarUserManager in isAssociatedKeyFob()
295 AsyncFuture<UserIdentificationAssociationResponse> future = mCarUserManager in associateKeyFob()
/packages/apps/Car/Settings/src/com/android/car/settings/profiles/
DAddNewProfileTask.java38 private final CarUserManager mCarUserManager; field in AddNewProfileTask
44 mCarUserManager = carUserManager; in AddNewProfileTask()
50 AsyncFuture<UserCreationResult> future = mCarUserManager.createUser(profileNames[0], in doInBackground()
81 mCarUserManager.switchUser(user.id); in onPostExecute()
DAddProfileHandler.java52 private CarUserManager mCarUserManager; field in AddProfileHandler
63 mCarUserManager = (CarUserManager) mCar.getCarManager(Car.CAR_USER_SERVICE); in AddProfileHandler()
67 mCarUserManager, /* addNewProfileListener= */ this); in AddProfileHandler()
153 mCarUserManager = carUserManager; in setCarUserManager()
DProfileHelper.java61 private final CarUserManager mCarUserManager; field in ProfileHelper
120 mCarUserManager = carUserManager; in ProfileHelper()
198 UserRemovalResult result = mCarUserManager.removeUser(userId); in removeProfile()
211 UserSwitchResult result = getResult("switch", mCarUserManager.switchUser(userId)); in switchProfile()
299 mCarUserManager.createUser(userName, UserInfo.FLAG_ADMIN)); in createNewAdminProfile()
318 mCarUserManager.createGuest(mDefaultGuestName)); in createNewOrFindExistingGuest()
DProfileGridRecyclerView.java82 private CarUserManager mCarUserManager; field in ProfileGridRecyclerView
98 mCarUserManager = (CarUserManager) mCar.getCarManager(Car.CAR_USER_SERVICE); in ProfileGridRecyclerView()
275 mCarUserManager, /* addNewProfileListener= */this);
395 mCarUserManager.switchUser(userInfo.id).whenCompleteAsync((r, e) -> { in handleProfileSwitch()
405 mCarUserManager.switchUser(guest.id).whenCompleteAsync((r, e) -> { in handleGuestSessionClicked()
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/statusbar/
DUserNameViewControllerTest.java67 private CarUserManager mCarUserManager; field in UserNameViewControllerTest
81 when(mCar.getCarManager(Car.CAR_USER_SERVICE)).thenReturn(mCarUserManager); in setUp()
107 verifyZeroInteractions(mCarUserManager); in addUserNameViewToController_withNoTextView_doesNotUpdate()
115 verifyZeroInteractions(mCarUserManager); in removeAll_withNoRegisteredListener_doesNotUnregister()
126 verify(mCarUserManager).addListener(any(), userLifecycleListenerArgumentCaptor.capture()); in userLifecycleListener_onUserSwitchLifecycleEvent_updatesUserNameView()
/packages/apps/Car/SystemUI/src/com/android/systemui/car/userswitcher/
DFullScreenUserSwitcherViewController.java48 private CarUserManager mCarUserManager; field in FullScreenUserSwitcherViewController
63 mCarUserManager = (CarUserManager) car.getCarManager(Car.CAR_USER_SERVICE); in FullScreenUserSwitcherViewController()
138 if (mUserGridView != null && mCarUserManager != null) { in registerCarUserManagerIfPossible()
139 mUserGridView.setCarUserManager(mCarUserManager); in registerCarUserManagerIfPossible()
DUserGridRecyclerView.java86 private CarUserManager mCarUserManager; field in UserGridRecyclerView
201 mCarUserManager = carUserManager; in setCarUserManager()
462 AsyncFuture<UserCreationResult> future = mCarUserManager.createGuest(mGuestName); in createNewOrFindExistingGuest()
518 mCarUserManager.switchUser(userId); in switchUser()
544 AsyncFuture<UserCreationResult> future = mCarUserManager.createUser(userNames[0], in doInBackground()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/profiles/
DAddProfileHandlerTest.java76 private CarUserManager mCarUserManager; field in AddProfileHandlerTest
89 mAddProfileHandler.setCarUserManager(mCarUserManager); in setUp()
114 when(mCarUserManager.createUser(anyString(), anyInt())) in newProfileConfirmed_invokesCreateNewUser()
121 verify(mCarUserManager).createUser( in newProfileConfirmed_invokesCreateNewUser()
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/systembar/
DPrivacyChipViewControllerTest.java105 private CarUserManager mCarUserManager; field in PrivacyChipViewControllerTest
121 when(mCar.getCarManager(Car.CAR_USER_SERVICE)).thenReturn(mCarUserManager); in setUp()
293 verify(mCarUserManager).addListener(any(), mUserLifecycleListenerArgumentCaptor.capture()); in onEvent_setMicrophoneEnabledCalled()