Home
last modified time | relevance | path

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

/packages/services/Car/car_product/car_ui_portrait/apps/CarUiPortraitLauncher/src/com/android/car/portraitlauncher/common/
DUserEventReceiver.java40 private CarUserManager mCarUserManager; field in UserEventReceiver
68 mCarUserManager = mCar.getCarManager(CarUserManager.class); in register()
75 mCarUserManager.addListener(context.getMainExecutor(), filter, mUserListener); in register()
80 if (mCar == null || mCarUserManager == null) { in unregister()
83 mCarUserManager.removeListener(mUserListener); in unregister()
85 mCarUserManager = null; in unregister()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/profiles/
DAddNewProfileTaskTest.java66 private CarUserManager mCarUserManager; field in AddNewProfileTaskTest
78 mTask = new AddNewProfileTask(mContext, mCarUserManager, mAddNewProfileListener); in setUp()
92 verify(mCarUserManager).createUser(newUserName, /* flags= */ 0); in createNewUser_success()
106 verify(mCarUserManager).switchUser(newUser.id); in userCreated_switchToNewUser()
121 verify(mCarUserManager).switchUser(mNewUserId); in userCreated_successCalled()
156 verify(mCarUserManager).stopUser(any(), any(), captor.capture()); in userCreatedOnPassenger_success_stopsAndStartsUser()
162 verify(mCarUserManager).startUser(any(), any(), any()); in userCreatedOnPassenger_success_stopsAndStartsUser()
184 verify(mCarUserManager).stopUser(any(), any(), captor.capture()); in userCreatedOnPassenger_failure_doesNotStartUser()
190 verify(mCarUserManager, never()).startUser(any(), any(), any()); in userCreatedOnPassenger_failure_doesNotStartUser()
196 when(mCarUserManager.createUser(anyString(), anyInt())) in mockCreateUser()
DAddProfileHandlerTest.java86 private CarUserManager mCarUserManager; field in AddProfileHandlerTest
100 mAddProfileHandler.setCarUserManager(mCarUserManager); in setUp()
127 when(mCarUserManager.createUser(anyString(), anyInt())) in newProfileConfirmed_invokesCreateNewUser()
134 verify(mCarUserManager).createUser( in newProfileConfirmed_invokesCreateNewUser()
/packages/apps/Car/Settings/src/com/android/car/settings/profiles/
DAddNewProfileTask.java43 private final CarUserManager mCarUserManager; field in AddNewProfileTask
50 mCarUserManager = carUserManager; in AddNewProfileTask()
57 AsyncFuture<UserCreationResult> future = mCarUserManager.createUser(profileNames[0], in doInBackground()
92 mCarUserManager.switchUser(user.id); in onPostExecute()
96 mCarUserManager.stopUser( in onPostExecute()
118 mCarUserManager.startUser( in startUser()
DAddProfileHandler.java66 private CarUserManager mCarUserManager; field in AddProfileHandler
73 mCarUserManager = mCar.getCarManager(CarUserManager.class);
76 mCarUserManager = null;
90 mCarUserManager, /* addNewProfileListener= */ this); in AddProfileHandler()
224 mCarUserManager = carUserManager; in setCarUserManager()
DProfileHelper.java69 private final CarUserManager mCarUserManager; field in ProfileHelper
129 mCarUserManager = carUserManager; in ProfileHelper()
207 UserRemovalResult result = mCarUserManager.removeUser(userId); in removeProfile()
226 UserSwitchResult result = getResult("switch", mCarUserManager.switchUser(userId)); in switchProfile()
240 UserSwitchResult result = getResult("logout", mCarUserManager.logoutUser()); in logoutProfile()
331 mCarUserManager.createUser(userName, UserInfo.FLAG_ADMIN)); in createNewAdminProfile()
350 mCarUserManager.createGuest(mDefaultGuestName)); in createNewOrFindExistingGuest()
DProfileGridRecyclerView.java82 private CarUserManager mCarUserManager; field in ProfileGridRecyclerView
98 mCarUserManager = (CarUserManager) mCar.getCarManager(Car.CAR_USER_SERVICE); in ProfileGridRecyclerView()
276 mCarUserManager, /* addNewProfileListener= */this);
399 mCarUserManager.switchUser(userInfo.id).whenCompleteAsync((r, e) -> { in handleProfileSwitch()
409 mCarUserManager.switchUser(guest.id).whenCompleteAsync((r, e) -> { in handleGuestSessionClicked()
/packages/apps/Car/SystemUI/src/com/android/systemui/car/systembar/
DDockViewControllerWrapper.java64 private CarUserManager mCarUserManager; field in DockViewControllerWrapper
95 mCarUserManager = car.getCarManager(CarUserManager.class);
96 if (mCarUserManager != null) {
97 mCarUserManager.addListener(mContext.getMainExecutor(),
134 if (mCarUserManager != null) { in onViewDetached()
135 mCarUserManager.removeListener(mUserLifecycleListener); in onViewDetached()
136 mCarUserManager = null; in onViewDetached()
/packages/apps/Car/SystemUI/src/com/android/systemui/car/userpicker/
DCarServiceMediator.java75 private CarUserManager mCarUserManager; field in CarServiceMediator
103 mCarUserManager = car.getCarManager(CarUserManager.class); in onConnect()
106 if (mCarUserManager != null) { in onConnect()
108 mCarUserManager.addListener(mUserLifecycleListeners.get(listener).first, in onConnect()
126 if (mCarUserManager != null) { in registerUserChangeEventsListener()
128 mCarUserManager.addListener(receiver, filter, listener); in registerUserChangeEventsListener()
135 mCarUserManager.removeListener(listener); in onDestroy()
143 return mCarUserManager; in getCarUserManager()
/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/
DCarUserManagerTest.java130 CarUserManager mgr1 = mCarUserManager; in testLifecycleMultipleListeners()
238 mCarUserManager.addListener(Runnable::run, listener1); in testGuestUserResumeToNewGuestUser()
243 mCarUserManager.removeListener(listener1); in testGuestUserResumeToNewGuestUser()
253 mCarUserManager.addListener(Runnable::run, listener2); in testGuestUserResumeToNewGuestUser()
271 mCarUserManager.removeListener(listener2); in testGuestUserResumeToNewGuestUser()
298 mCarUserManager.addListener(Runnable::run, listener); in testSecuredGuestUserResumeToSameUser()
305 mCarUserManager.removeListener(listener); in testSecuredGuestUserResumeToSameUser()
338 mCarUserManager.addListener(Runnable::run, listener); in testPersistentUserResumeToUser()
350 mCarUserManager.removeListener(listener); in testPersistentUserResumeToUser()
366 mCarUserManager.switchUser( in testSwitchUserUxRestrictionFailure()
DCarMultiUserTestBase.java82 protected CarUserManager mCarUserManager; field in CarMultiUserTestBase
109 mCarUserManager = getCarService(Car.CAR_USER_SERVICE); in setMultiUserFixtures()
258 mCarUserManager.createUser(userCreationRequestBuilder.setName(name).build(), Runnable::run, in createUser()
318 mCarUserManager.addListener(Runnable::run, listener); in switchUser()
322 mCarUserManager.switchUser(new UserSwitchRequest.Builder( in switchUser()
334 mCarUserManager.removeListener(listener); in switchUser()
343 mCarUserManager.removeUser(new UserRemovalRequest.Builder( in removeUser()
358 mCarUserManager.startUser(request, Runnable::run, in startUserInBackgroundOnSecondaryDisplay()
369 mCarUserManager.stopUser(request, Runnable::run, in forceStopUser()
DCarUserManagerUserVisibilityEventTest.java88 mCarUserManager.addListener(directExecutor, startListener); in testUserVisibilityEvents()
103 mCarUserManager.removeListener(startListener); in testUserVisibilityEvents()
115 mCarUserManager.addListener(directExecutor, stopListener); in testUserVisibilityEvents()
142 mCarUserManager.removeListener(stopListener); in testUserVisibilityEvents()
DCarUserManagerLifeCycleTest.java90 mCarUserManager.addListener(mExecutor, startListener); in testLifecycleListener()
118 mCarUserManager.removeListener(startListener); in testLifecycleListener()
129 mCarUserManager.addListener(mExecutor, stopListener); in testLifecycleListener()
159 mCarUserManager.removeListener(stopListener); in testLifecycleListener()
DCarUserManagerLifecycleEventFilterTest.java147 mCarUserManager.addListener(listener.executor, listener.listener); in testUserLifecycleEventFilter()
149 mCarUserManager.addListener(listener.executor, listener.filter, listener.listener); in testUserLifecycleEventFilter()
178 mCarUserManager.removeListener(listener.listener); in testUserLifecycleEventFilter()
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/qc/
DProfileSwitcherTest.java101 private CarUserManager mCarUserManager; field in ProfileSwitcherTest
133 when(mCarUserManager.switchUser(anyInt())).thenReturn(switchResultFuture); in setUp()
136 mDevicePolicyManager, mCarUserManager, mUserIconProvider, new Handler()); in setUp()
340 verify(mCarUserManager).switchUser(requestCaptor.capture(), any(), any()); in onUserPressed_triggersSwitch()
353 when(mCarUserManager.createGuest(any())).thenReturn(createResultFuture); in onGuestPressed_createsAndSwitches()
366 verify(mCarUserManager).createGuest(any()); in onGuestPressed_createsAndSwitches()
371 verify(mCarUserManager).switchUser(requestCaptor.capture(), any(), any()); in onGuestPressed_createsAndSwitches()
394 verify(mCarUserManager, never()).switchUser(secondaryUserId); in onUserPressed_alreadyStartedUser_doesNothing()
395 verify(mCarUserManager, never()).stopUser(any(), any(), any()); in onUserPressed_alreadyStartedUser_doesNothing()
396 verify(mCarUserManager, never()).startUser(any(), any(), any()); in onUserPressed_alreadyStartedUser_doesNothing()
[all …]
/packages/apps/Car/SystemUI/src/com/android/systemui/car/qc/
DProfileSwitcher.java93 mCarUserManager = car.getCarManager(CarUserManager.class);
105 private CarUserManager mCarUserManager; field in ProfileSwitcher
130 mCarUserManager = carUserManager; in ProfileSwitcher()
137 if (mCarUserManager == null) { in getQCItem()
312 mCarUserManager.switchUser( in switchForegroundUser()
330 mCarUserManager.stopUser(new UserStopRequest.Builder( in switchSecondaryUser()
347 mCarUserManager.startUser( in switchSecondaryUser()
367 AsyncFuture<UserSwitchResult> userSwitchResultFuture = mCarUserManager.logoutUser(); in logoutUser()
390 AsyncFuture<UserCreationResult> future = mCarUserManager.createGuest( in createNewOrFindExistingGuest()
493 AsyncFuture<UserCreationResult> future = mCarUserManager.createUser(userNames[0], in doInBackground()
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/users/
DUserFragment.java78 private CarUserManager mCarUserManager; field in UserFragment
109 mCarUserManager = (CarUserManager) car.getCarManager(Car.CAR_USER_SERVICE); in onViewCreated()
165 result = getResult(mCarUserManager.createGuest(name)); in createUser()
179 result = getResult(mCarUserManager.createUser(name, flags)); in createUser()
205 UserRemovalResult result = mCarUserManager.removeUser(userId); in removeUser()
221 mCarUserManager.switchUser(new UserSwitchRequest.Builder(UserHandle.of(userId)).build(), in switchUser()
297 UserIdentificationAssociationResponse result = mCarUserManager in isAssociatedKeyFob()
313 AsyncFuture<UserIdentificationAssociationResponse> future = mCarUserManager in associateKeyFob()
DSimpleUserPickerFragment.java91 private CarUserManager mCarUserManager; field in SimpleUserPickerFragment
118 mCarUserManager = car.getCarManager(CarUserManager.class); in onViewCreated()
153 mCarUserManager.addListener(getContext().getMainExecutor(), filter, (event) -> in onViewCreated()
306 mCarUserManager.stopUser(request, Runnable::run, in stopUser()
333 mCarUserManager.startUser(request, Runnable::run, in startUserVisibleOnDisplay()
356 AsyncFuture<UserCreationResult> future = mCarUserManager.createUser(name, /* flags= */ 0); in createUser()
/packages/apps/Car/SystemUI/src/com/android/systemui/car/userswitcher/
DFullScreenUserSwitcherViewController.java57 private CarUserManager mCarUserManager; field in FullScreenUserSwitcherViewController
78 mCarUserManager = (CarUserManager) car.getCarManager(Car.CAR_USER_SERVICE); in FullScreenUserSwitcherViewController()
182 if (mUserGridView != null && mCarUserManager != null) { in registerCarUserManagerIfPossible()
183 mUserGridView.setCarUserManager(mCarUserManager); in registerCarUserManagerIfPossible()
DUserGridRecyclerView.java94 private CarUserManager mCarUserManager; field in UserGridRecyclerView
215 mCarUserManager = carUserManager; in setCarUserManager()
477 AsyncFuture<UserCreationResult> future = mCarUserManager.createGuest(mGuestName); in createNewOrFindExistingGuest()
533 mCarUserManager.switchUser(userId); in switchUser()
560 AsyncFuture<UserCreationResult> future = mCarUserManager.createUser(userNames[0], in doInBackground()
/packages/services/Car/car_product/car_ui_portrait/apps/CarUiPortraitLauncher/tests/src/com/android/car/portraitlauncher/common/test/
DUserEventReceiverTest.java61 private CarUserManager mCarUserManager; field in UserEventReceiverTest
70 doReturn(mCarUserManager).when(mCar).getCarManager(CarUserManager.class); in setUp()
98 verify(mCarUserManager).removeListener(listener); in onUnregister_removesListeners()
157 verify(mCarUserManager).addListener(any(), any(), captor.capture()); in verifyAndGetUserListener()
/packages/services/Car/tests/UserSwitchMonitorApp/src/com/google/android/car/userswitchmonitor/
DUserSwitchMonitorService.java70 private CarUserManager mCarUserManager; field in UserSwitchMonitorService
85 mCarUserManager = (CarUserManager) car.getCarManager(Car.CAR_USER_SERVICE); in onCarReady()
98 mCarUserManager.addListener((r)-> r.run(), mListener); in registerListener()
192 if (mCarUserManager == null) { in unregisterListener()
197 mCarUserManager.removeListener(mListener); in unregisterListener()
/packages/apps/Car/Cluster/ClusterHomeSample/src/com/android/car/cluster/home/
DClusterHomeApplication.java87 private CarUserManager mCarUserManager; field in ClusterHomeApplication
179 mCarUserManager = (CarUserManager) car.getCarManager(Car.CAR_USER_SERVICE); in onCreate()
215 mCarUserManager.addListener(getMainExecutor(), filter, mUserLifecycleListener); in initClusterHome()
241 mCarUserManager.removeListener(mUserLifecycleListener); in onTerminate()