Home
last modified time | relevance | path

Searched refs:mCarUserManagerHelper (Results 1 – 25 of 117) sorted by relevance

12345

/packages/services/Car/tests/carservice_unit_test/src/android/car/userlib/
DCarUserManagerHelperTest.java86 private CarUserManagerHelper mCarUserManagerHelper; field in CarUserManagerHelperTest
102 mCarUserManagerHelper = new CarUserManagerHelper(mContext, mTestableFrameworkWrapper); in setUpMocksAndVariables()
103 mCarUserManagerHelper.setDefaultAdminName(DEFAULT_ADMIN_NAME); in setUpMocksAndVariables()
123 assertThat(mCarUserManagerHelper.isHeadlessSystemUser()).isTrue(); in checkHeadlessSystemUserFlag()
131 assertThat(mCarUserManagerHelper.isSystemUser(testInfo)).isTrue(); in checkIsSystemUser()
134 assertThat(mCarUserManagerHelper.isSystemUser(testInfo)).isFalse(); in checkIsSystemUser()
146 assertThat(mCarUserManagerHelper.getAllUsers()) in testHeadlessUser0GetAllUsers_NotReturnSystemUser()
159 assertThat(mCarUserManagerHelper.getAllSwitchableUsers()).containsExactly(user1, user2); in testGetAllSwitchableUsers()
176 assertThat(mCarUserManagerHelper.getAllPersistentUsers()).containsExactly(user1, user2); in testGetAllPersistentUsers()
190 assertThat(mCarUserManagerHelper.getAllAdminUsers()).containsExactly(user1, user4); in testGetAllAdminUsers()
[all …]
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/
DCarUserServiceTest.java78 private CarUserManagerHelper mCarUserManagerHelper; field in CarUserServiceTest
103 mCarUserService = new CarUserService(mMockContext, mCarUserManagerHelper, in setUpMocks()
106 doReturn(new ArrayList<>()).when(mCarUserManagerHelper).getAllUsers(); in setUpMocks()
145 doReturn(systemUser).when(mCarUserManagerHelper).getSystemUserInfo(); in testDisableModifyAccountsForHeadlessSystemUserOnFirstRun()
146 doReturn(true).when(mCarUserManagerHelper).isHeadlessSystemUser(); in testDisableModifyAccountsForHeadlessSystemUserOnFirstRun()
150 verify(mCarUserManagerHelper) in testDisableModifyAccountsForHeadlessSystemUserOnFirstRun()
163 doReturn(systemUser).when(mCarUserManagerHelper).getSystemUserInfo(); in testDisableModifyAccountsForRegularSystemUserOnFirstRun()
164 doReturn(false).when(mCarUserManagerHelper).isHeadlessSystemUser(); in testDisableModifyAccountsForRegularSystemUserOnFirstRun()
168 verify(mCarUserManagerHelper, never()) in testDisableModifyAccountsForRegularSystemUserOnFirstRun()
181 doReturn(systemUser).when(mCarUserManagerHelper).getSystemUserInfo(); in testDoesNotSetSystemUserRestrictions_IfRestrictionsAlreadySet()
[all …]
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/users/
DUserDetailsBaseFragmentTest.java72 private CarUserManagerHelper mCarUserManagerHelper; field in UserDetailsBaseFragmentTest
83 ShadowCarUserManagerHelper.setMockInstance(mCarUserManagerHelper); in setUpTestActivity()
95 when(mCarUserManagerHelper.canCurrentProcessRemoveUsers()).thenReturn(true); in testRemoveUserButtonVisible_whenAllowedToRemoveUsers()
96 when(mCarUserManagerHelper.canUserBeRemoved(any())).thenReturn(true); in testRemoveUserButtonVisible_whenAllowedToRemoveUsers()
97 when(mCarUserManagerHelper.isCurrentProcessDemoUser()).thenReturn(false); in testRemoveUserButtonVisible_whenAllowedToRemoveUsers()
105 when(mCarUserManagerHelper.canCurrentProcessRemoveUsers()).thenReturn(false); in testRemoveUserButtonHidden_whenNotAllowedToRemoveUSers()
106 when(mCarUserManagerHelper.canUserBeRemoved(any())).thenReturn(true); in testRemoveUserButtonHidden_whenNotAllowedToRemoveUSers()
107 when(mCarUserManagerHelper.isCurrentProcessDemoUser()).thenReturn(false); in testRemoveUserButtonHidden_whenNotAllowedToRemoveUSers()
115 when(mCarUserManagerHelper.canCurrentProcessRemoveUsers()).thenReturn(true); in testRemoveUserButtonHidden_whenUserCannotBeRemoved()
116 when(mCarUserManagerHelper.canUserBeRemoved(any())).thenReturn(false); in testRemoveUserButtonHidden_whenUserCannotBeRemoved()
[all …]
DUsersListFragmentTest.java67 private CarUserManagerHelper mCarUserManagerHelper; field in UsersListFragmentTest
74 ShadowCarUserManagerHelper.setMockInstance(mCarUserManagerHelper); in setUp()
88 when(mCarUserManagerHelper.isCurrentProcessDemoUser()).thenReturn(true); in onCreate_userInDemoMode_showsExitRetailModeButton()
99 when(mCarUserManagerHelper.canCurrentProcessAddUsers()).thenReturn(true); in onCreate_userCanAddNewUser_showsAddUserButton()
110 when(mCarUserManagerHelper.isCurrentProcessDemoUser()).thenReturn(false); in onCreate_userRestrictedFromAddingNewUserAndNotInDemo_doesNotShowActionButton()
111 when(mCarUserManagerHelper.canCurrentProcessAddUsers()).thenReturn(false); in onCreate_userRestrictedFromAddingNewUserAndNotInDemo_doesNotShowActionButton()
124 verify(mCarUserManagerHelper) in testOnCreateNewUserConfirmedInvokesCreateNewNonAdminUser()
131 when(mCarUserManagerHelper.isCurrentProcessDemoUser()).thenReturn(true); in testCallOnClick_demoUser_exitRetailMode()
141 when(mCarUserManagerHelper.canCurrentProcessAddUsers()).thenReturn(true); in testCallOnClick_userLimitReached_showErrorDialog()
142 when(mCarUserManagerHelper.getMaxSupportedRealUsers()).thenReturn(5); in testCallOnClick_userLimitReached_showErrorDialog()
[all …]
DUsersBasePreferenceControllerTest.java81 private CarUserManagerHelper mCarUserManagerHelper; field in UsersBasePreferenceControllerTest
87 ShadowCarUserManagerHelper.setMockInstance(mCarUserManagerHelper); in setUp()
92 when(mCarUserManagerHelper.getCurrentProcessUserInfo()).thenReturn(TEST_CURRENT_USER); in setUp()
93 when(mCarUserManagerHelper.isCurrentProcessUser(TEST_CURRENT_USER)).thenReturn(true); in setUp()
94 when(mCarUserManagerHelper.getAllSwitchableUsers()).thenReturn( in setUp()
107 verify(mCarUserManagerHelper).registerOnUsersUpdateListener( in onCreate_registersOnUsersUpdateListener()
125 verify(mCarUserManagerHelper).unregisterOnUsersUpdateListener( in onDestroy_unregistersOnUsersUpdateListener()
141 when(mCarUserManagerHelper.getAllSwitchableUsers()).thenReturn( in refreshUi_userChange_updatesGroup()
179 verify(mCarUserManagerHelper).registerOnUsersUpdateListener(listenerCaptor.capture()); in onUsersUpdated_updatesGroup()
189 when(mCarUserManagerHelper.getAllSwitchableUsers()).thenReturn( in onUsersUpdated_updatesGroup()
DPermissionsPreferenceControllerTest.java61 private CarUserManagerHelper mCarUserManagerHelper; field in PermissionsPreferenceControllerTest
73 mCarUserManagerHelper = new CarUserManagerHelper(context); in setUp()
100 mCarUserManagerHelper.setUserRestriction(TEST_USER, TEST_RESTRICTION, true); in testRefreshUi_setToFalse()
110 mCarUserManagerHelper.setUserRestriction(TEST_USER, TEST_RESTRICTION, false); in testRefreshUi_setToTrue()
119 mCarUserManagerHelper.setUserRestriction(TEST_USER, TEST_RESTRICTION, true); in testOnPreferenceChange_changeToFalse()
121 assertThat(mCarUserManagerHelper.hasUserRestriction(TEST_RESTRICTION, TEST_USER)).isFalse(); in testOnPreferenceChange_changeToFalse()
128 mCarUserManagerHelper.setUserRestriction(TEST_USER, TEST_RESTRICTION, false); in testOnPreferenceChange_changeToTrue()
130 assertThat(mCarUserManagerHelper.hasUserRestriction(TEST_RESTRICTION, TEST_USER)).isTrue(); in testOnPreferenceChange_changeToTrue()
DAddNewUserTaskTest.java37 private CarUserManagerHelper mCarUserManagerHelper; field in AddNewUserTaskTest
46 mTask = new AddNewUserTask(mCarUserManagerHelper, mAddNewUserListener); in createAsyncTask()
55 verify(mCarUserManagerHelper).createNewNonAdminUser(newUserName); in testTaskCallsCreateNewNonAdminUser()
62 when(mCarUserManagerHelper.createNewNonAdminUser(newUserName)).thenReturn(newUser); in testSwitchToNewUserIfUserCreated()
67 verify(mCarUserManagerHelper).switchToUser(newUser); in testSwitchToNewUserIfUserCreated()
74 when(mCarUserManagerHelper.createNewNonAdminUser(newUserName)).thenReturn(newUser); in testOnUserAddedSuccessCalledIfUserCreated()
85 when(mCarUserManagerHelper.createNewNonAdminUser(newUserName)).thenReturn(null); in testOnUserAddedFailureCalledIfNullReturned()
DUsersEntryPreferenceControllerTest.java52 private CarUserManagerHelper mCarUserManagerHelper; field in UsersEntryPreferenceControllerTest
59 ShadowCarUserManagerHelper.setMockInstance(mCarUserManagerHelper); in setUp()
75 when(mCarUserManagerHelper.isCurrentProcessAdminUser()).thenReturn(true); in preferenceClicked_adminUser_handled()
83 when(mCarUserManagerHelper.isCurrentProcessAdminUser()).thenReturn(true); in preferenceClicked_adminUser_launchesUsersListFragment()
93 when(mCarUserManagerHelper.isCurrentProcessAdminUser()).thenReturn(false); in preferenceClicked_nonAdminUser_handled()
102 when(mCarUserManagerHelper.getCurrentProcessUserId()).thenReturn(userId); in preferenceClicked_nonAdminUser_launchesUserDetailsFragment()
103 when(mCarUserManagerHelper.isCurrentProcessAdminUser()).thenReturn(false); in preferenceClicked_nonAdminUser_launchesUserDetailsFragment()
DUsersListPreferenceControllerTest.java62 private CarUserManagerHelper mCarUserManagerHelper; field in UsersListPreferenceControllerTest
68 ShadowCarUserManagerHelper.setMockInstance(mCarUserManagerHelper); in setUp()
73 when(mCarUserManagerHelper.getCurrentProcessUserInfo()).thenReturn(TEST_CURRENT_USER); in setUp()
74 when(mCarUserManagerHelper.isCurrentProcessUser(TEST_CURRENT_USER)).thenReturn(true); in setUp()
75 when(mCarUserManagerHelper.isCurrentProcessAdminUser()).thenReturn(true); in setUp()
76 when(mCarUserManagerHelper.getAllSwitchableUsers()).thenReturn( in setUp()
DEditUserNameEntryPreferenceControllerTest.java63 private CarUserManagerHelper mCarUserManagerHelper; field in EditUserNameEntryPreferenceControllerTest
68 ShadowCarUserManagerHelper.setMockInstance(mCarUserManagerHelper); in setUp()
87 when(mCarUserManagerHelper.isCurrentProcessUser(userInfo)).thenReturn(true); in testOnButtonClick_isCurrentUser_launchesEditUsernameFragment()
98 when(mCarUserManagerHelper.isCurrentProcessUser(userInfo)).thenReturn(false); in testOnButtonClick_isNotCurrentUser_doesNothing()
109 when(mCarUserManagerHelper.isCurrentProcessUser(userInfo)).thenReturn(false); in testRefreshUi_elementHasTitle()
139 when(mCarUserManagerHelper.isCurrentProcessUser(userInfo)).thenReturn(false); in testRefreshUi_isAdmin_notCurrentUser()
151 when(mCarUserManagerHelper.isCurrentProcessUser(userInfo)).thenReturn(true); in testRefreshUi_isAdmin_currentUser()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/development/
DDevelopmentSettingsUtilTest.java46 private CarUserManagerHelper mCarUserManagerHelper; field in DevelopmentSettingsUtilTest
51 ShadowCarUserManagerHelper.setMockInstance(mCarUserManagerHelper); in setUp()
53 when(mCarUserManagerHelper.isCurrentProcessAdminUser()).thenReturn(true); in setUp()
54 when(mCarUserManagerHelper.isCurrentProcessDemoUser()).thenReturn(false); in setUp()
69 mCarUserManagerHelper)).isFalse(); in isEnabled_settingsOff_isAdmin_notDemo_shouldReturnFalse()
78 mCarUserManagerHelper)).isTrue(); in isEnabled_settingsOn_isAdmin_notDemo_shouldReturnTrue()
85 when(mCarUserManagerHelper.isCurrentProcessAdminUser()).thenReturn(false); in isEnabled_settingsOn_notAdmin_notDemo_shouldReturnFalse()
86 when(mCarUserManagerHelper.isCurrentProcessDemoUser()).thenReturn(false); in isEnabled_settingsOn_notAdmin_notDemo_shouldReturnFalse()
89 mCarUserManagerHelper)).isFalse(); in isEnabled_settingsOn_notAdmin_notDemo_shouldReturnFalse()
96 when(mCarUserManagerHelper.isCurrentProcessAdminUser()).thenReturn(false); in isEnabled_settingsOn_notAdmin_isDemo_shouldReturnTrue()
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/users/
DUserGridRecyclerView.java55 private CarUserManagerHelper mCarUserManagerHelper; field in UserGridRecyclerView
64 mCarUserManagerHelper = new CarUserManagerHelper(mContext); in UserGridRecyclerView()
77 mCarUserManagerHelper.registerOnUsersUpdateListener(this); in onFinishInflate()
86 mCarUserManagerHelper.unregisterOnUsersUpdateListener(this); in onDetachedFromWindow()
96 List<UserRecord> userRecords = createUserRecords(mCarUserManagerHelper in buildAdapter()
106 if (!mCarUserManagerHelper.canForegroundUserSwitchUsers()) { in createUserRecords()
114 mCarUserManagerHelper.getCurrentForegroundUserId() == userInfo.id; in createUserRecords()
127 if (!mCarUserManagerHelper.isForegroundUserGuest()) { in createUserRecords()
132 if (mCarUserManagerHelper.canForegroundUserAddUsers()) { in createUserRecords()
140 return new UserRecord(mCarUserManagerHelper.getCurrentForegroundUserInfo(), in createForegroundUserRecord()
[all …]
DUsersListFragment.java49 private CarUserManagerHelper mCarUserManagerHelper; field in UsersListFragment
60 mAddNewUserTask = new AddNewUserTask(mCarUserManagerHelper, /* addNewUserListener= */
77 .setTitle(mCarUserManagerHelper.isCurrentProcessDemoUser() in onCreate()
79 .setVisible(mCarUserManagerHelper.isCurrentProcessDemoUser() in onCreate()
80 || mCarUserManagerHelper.canCurrentProcessAddUsers()) in onCreate()
94 mCarUserManagerHelper = new CarUserManagerHelper(getContext()); in onAttach()
161 if (mCarUserManagerHelper.isCurrentProcessDemoUser()) { in handleAddUserClicked()
170 if (mCarUserManagerHelper.isUserLimitReached()) { in handleAddUserClicked()
172 mCarUserManagerHelper.getMaxSupportedRealUsers()); in handleAddUserClicked()
178 if (mCarUserManagerHelper.canCurrentProcessAddUsers()) { in handleAddUserClicked()
DUserDetailsBaseFragment.java37 private CarUserManagerHelper mCarUserManagerHelper; field in UserDetailsBaseFragment
46 if (mCarUserManagerHelper.removeUser(
74 mCarUserManagerHelper = new CarUserManagerHelper(getContext()); in onAttach()
89 boolean isVisible = mCarUserManagerHelper.canCurrentProcessRemoveUsers() in onCreate()
90 && mCarUserManagerHelper.canUserBeRemoved(mUserInfo) in onCreate()
91 && !mCarUserManagerHelper.isCurrentProcessDemoUser(); in onCreate()
108 return mCarUserManagerHelper; in getCarUserManagerHelper()
125 boolean isLastUser = mCarUserManagerHelper.getAllPersistentUsers().size() == 1; in showConfirmRemoveUserDialog()
127 && mCarUserManagerHelper.getAllAdminUsers().size() == 1; in showConfirmRemoveUserDialog()
DUsersPreferenceProvider.java50 private final CarUserManagerHelper mCarUserManagerHelper; field in UsersPreferenceProvider
58 mCarUserManagerHelper = carUserManagerHelper; in UsersPreferenceProvider()
87 UserInfo currUserInfo = mCarUserManagerHelper.getCurrentProcessUserInfo(); in createUserList()
95 List<UserInfo> infos = mCarUserManagerHelper.getAllSwitchableUsers(); in createUserList()
113 new UserIconProvider(mCarUserManagerHelper).getUserIcon(userInfo, mContext)); in createUserPreference()
115 UserUtils.getUserDisplayName(mContext, mCarUserManagerHelper, userInfo)); in createUserPreference()
139 new UserIconProvider(mCarUserManagerHelper).getDefaultGuestIcon(mContext)); in createGuestUserPreference()
145 return mCarUserManagerHelper.isCurrentProcessUser(userInfo); in isCurrentUser()
DUserIconProvider.java36 private final CarUserManagerHelper mCarUserManagerHelper; field in UserIconProvider
39 mCarUserManagerHelper = userManagerHelper; in UserIconProvider()
50 Bitmap icon = mCarUserManagerHelper.getUserIcon(userInfo); in getUserIcon()
56 BitmapDrawable scaledIcon = (BitmapDrawable) mCarUserManagerHelper.scaleUserIcon(icon, res in getUserIcon()
72 return UserIconProvider.scaleUserIcon(mCarUserManagerHelper.getGuestDefaultIcon(), in getDefaultGuestIcon()
73 mCarUserManagerHelper, context); in getDefaultGuestIcon()
DUsersBasePreferenceController.java43 private CarUserManagerHelper mCarUserManagerHelper; field in UsersBasePreferenceController
49 mCarUserManagerHelper = new CarUserManagerHelper(context); in UsersBasePreferenceController()
51 mPreferenceProvider = new UsersPreferenceProvider(context, mCarUserManagerHelper, in UsersBasePreferenceController()
67 mCarUserManagerHelper.registerOnUsersUpdateListener(mOnUsersUpdateListener); in onCreateInternal()
74 mCarUserManagerHelper.unregisterOnUsersUpdateListener(mOnUsersUpdateListener); in onDestroyInternal()
92 return mCarUserManagerHelper; in getCarUserManagerHelper()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/system/
DMasterClearEntryPreferenceControllerTest.java55 private CarUserManagerHelper mCarUserManagerHelper; field in MasterClearEntryPreferenceControllerTest
60 ShadowCarUserManagerHelper.setMockInstance(mCarUserManagerHelper); in setUp()
77 when(mCarUserManagerHelper.isCurrentProcessAdminUser()).thenReturn(false); in getAvailabilityStatus_nonAdminUser_disabledForUser()
84 when(mCarUserManagerHelper.isCurrentProcessAdminUser()).thenReturn(true); in getAvailabilityStatus_adminUser_available()
91 when(mCarUserManagerHelper.isCurrentProcessAdminUser()).thenReturn(true); in getAvailabilityStatus_adminUser_restricted_disabledForUser()
92 when(mCarUserManagerHelper.isCurrentProcessUserHasRestriction( in getAvailabilityStatus_adminUser_restricted_disabledForUser()
100 when(mCarUserManagerHelper.isCurrentProcessAdminUser()).thenReturn(false); in getAvailabilityStatus_demoMode_demoUser_available()
101 when(mCarUserManagerHelper.isCurrentProcessDemoUser()).thenReturn(true); in getAvailabilityStatus_demoMode_demoUser_available()
110 when(mCarUserManagerHelper.isCurrentProcessAdminUser()).thenReturn(false); in getAvailabilityStatus_demoMode_demoUser_restricted_disabledForUser()
111 when(mCarUserManagerHelper.isCurrentProcessDemoUser()).thenReturn(true); in getAvailabilityStatus_demoMode_demoUser_restricted_disabledForUser()
[all …]
DBuildNumberPreferenceControllerTest.java60 private CarUserManagerHelper mCarUserManagerHelper; field in BuildNumberPreferenceControllerTest
65 ShadowCarUserManagerHelper.setMockInstance(mCarUserManagerHelper); in setUp()
73 when(mCarUserManagerHelper.isCurrentProcessAdminUser()).thenReturn(true); in setUp()
74 when(mCarUserManagerHelper.isCurrentProcessDemoUser()).thenReturn(false); in setUp()
77 when(mCarUserManagerHelper.getCurrentProcessUserInfo()).thenReturn(new UserInfo()); in setUp()
78 when(mCarUserManagerHelper.hasUserRestriction(eq(UserManager.DISALLOW_DEBUGGING_FEATURES), in setUp()
105 when(mCarUserManagerHelper.isCurrentProcessAdminUser()).thenReturn(false); in testHandlePreferenceClicked_nonAdmin_returnFalse()
106 when(mCarUserManagerHelper.isCurrentProcessDemoUser()).thenReturn(false); in testHandlePreferenceClicked_nonAdmin_returnFalse()
113 when(mCarUserManagerHelper.isCurrentProcessAdminUser()).thenReturn(false); in testHandlePreferenceClicked_demoUser_returnsTrue()
114 when(mCarUserManagerHelper.isCurrentProcessDemoUser()).thenReturn(true); in testHandlePreferenceClicked_demoUser_returnsTrue()
[all …]
DResetNetworkEntryPreferenceControllerTest.java52 private CarUserManagerHelper mCarUserManagerHelper; field in ResetNetworkEntryPreferenceControllerTest
58 ShadowCarUserManagerHelper.setMockInstance(mCarUserManagerHelper); in setUp()
73 when(mCarUserManagerHelper.isCurrentProcessAdminUser()).thenReturn(false); in getAvailabilityStatus_nonAdminUser_disabledForUser()
80 when(mCarUserManagerHelper.isCurrentProcessAdminUser()).thenReturn(true); in getAvailabilityStatus_adminUser_available()
87 when(mCarUserManagerHelper.isCurrentProcessAdminUser()).thenReturn(true); in getAvailabilityStatus_adminUser_restricted_disabledForUser()
88 when(mCarUserManagerHelper.isCurrentProcessUserHasRestriction( in getAvailabilityStatus_adminUser_restricted_disabledForUser()
/packages/services/Car/service/src/com/android/car/user/
DCarUserService.java56 private final CarUserManagerHelper mCarUserManagerHelper; field in CarUserService
98 mCarUserManagerHelper = carUserManagerHelper; in CarUserService()
154 if (mCarUserManagerHelper.isHeadlessSystemUser()) { in updateDefaultUserRestriction()
157 mCarUserManagerHelper.initDefaultGuestRestrictions(); in updateDefaultUserRestriction()
173 && mCarUserManagerHelper.isPersistentUser(currentUser)) { in onReceive()
174 mCarUserManagerHelper.setLastActiveUser(currentUser); in onReceive()
212 if (mCarUserManagerHelper.isPersistentUser(userHandle)) { in setUserLockStatus()
214 if (userHandle == mCarUserManagerHelper.getCurrentForegroundUserId()) { in setUserLockStatus()
251 if (user == mCarUserManagerHelper.getCurrentForegroundUserId()) { in startAllBackgroundUsers()
294 if (userId == mCarUserManagerHelper.getCurrentForegroundUserId()) { in stopBackgroundUser()
[all …]
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/display/
DBrightnessLevelPreferenceControllerTest.java56 private CarUserManagerHelper mCarUserManagerHelper; field in BrightnessLevelPreferenceControllerTest
69 ShadowCarUserManagerHelper.setMockInstance(mCarUserManagerHelper); in setUp()
70 when(mCarUserManagerHelper.getCurrentProcessUserId()).thenReturn(CURRENT_USER); in setUp()
95 mCarUserManagerHelper.getCurrentProcessUserId()); in testRefreshUi_minValue()
105 mCarUserManagerHelper.getCurrentProcessUserId()); in testRefreshUi_maxValue()
115 mCarUserManagerHelper.getCurrentProcessUserId()); in testRefreshUi_midValue()
128 mCarUserManagerHelper.getCurrentProcessUserId()); in testHandlePreferenceChanged_minValue()
137 mCarUserManagerHelper.getCurrentProcessUserId()); in testHandlePreferenceChanged_maxValue()
146 mCarUserManagerHelper.getCurrentProcessUserId()); in testHandlePreferenceChanged_midValue()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/security/
DTrustedDeviceListPreferenceControllerTest.java72 private CarUserManagerHelper mCarUserManagerHelper; field in TrustedDeviceListPreferenceControllerTest
89 mCarUserManagerHelper = new CarUserManagerHelper(mContext); in setUp()
108 mCarUserManagerHelper.getCurrentProcessUserId())).thenReturn(mUpdatedDevices); in onDeviceRemoved_refreshUi()
120 mCarUserManagerHelper.getCurrentProcessUserId())).thenReturn(mUpdatedDevices); in onDeviceRemoved_refreshUi()
129 mCarUserManagerHelper.getCurrentProcessUserId())).thenReturn(mDevices); in onDeviceAdded_refreshUi()
139 mCarUserManagerHelper.getCurrentProcessUserId())).thenReturn(mUpdatedDevices); in onDeviceAdded_refreshUi()
152 mCarUserManagerHelper.getCurrentProcessUserId())).thenReturn( in refreshUi_noDevices_hasPassword_hidesGroup()
165 mCarUserManagerHelper.getCurrentProcessUserId())).thenReturn(mUpdatedDevices); in refreshUi_devices_hasPassword_showsGroup()
189 mCarUserManagerHelper.getCurrentProcessUserId())).thenReturn(mDevices); in onPreferenceClicked_hasPassword_showDialog()
204 mCarUserManagerHelper.getCurrentProcessUserId()); in onRemoveDeviceDialogConfirmed_remoeEscrwoToken()
DAddTrustedDevicePreferenceControllerTest.java69 private CarUserManagerHelper mCarUserManagerHelper; field in AddTrustedDevicePreferenceControllerTest
77 ShadowCarUserManagerHelper.setMockInstance(mCarUserManagerHelper); in setUp()
97 when(mCarUserManagerHelper.isCurrentProcessUserHasRestriction( in refreshUi_hasPassword_preferenceEnabled()
108 when(mCarUserManagerHelper.isCurrentProcessUserHasRestriction( in refreshUi_noPassword_preferenceDisabled()
119 when(mCarUserManagerHelper.isCurrentProcessUserHasRestriction( in refreshUi_bluetoothAdapterEnabled_setsEmptySummary()
161 when(mCarUserManagerHelper.isCurrentProcessUserHasRestriction( in getAvailabilityStatus_disallowBluetoothUserRestriction_disabledForUser()
171 when(mCarUserManagerHelper.isCurrentProcessUserHasRestriction( in getAvailabilityStatus_disallowConfigBluetoothUserRestriction_disabledForUser()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/network/
DMobileNetworkEntryPreferenceControllerTest.java86 private CarUserManagerHelper mCarUserManagerHelper; field in MobileNetworkEntryPreferenceControllerTest
93 ShadowCarUserManagerHelper.setMockInstance(mCarUserManagerHelper); in setUp()
106 when(mCarUserManagerHelper.getCurrentProcessUserInfo()).thenReturn(TEST_ADMIN_USER); in setUp()
107 when(mCarUserManagerHelper.isCurrentProcessUserHasRestriction( in setUp()
130 when(mCarUserManagerHelper.getCurrentProcessUserInfo()).thenReturn(TEST_NON_ADMIN_USER); in getAvailabilityStatus_notAdmin_disabledForUser()
139 when(mCarUserManagerHelper.getCurrentProcessUserInfo()).thenReturn(TEST_ADMIN_USER); in getAvailabilityStatus_hasRestriction_disabledForUser()
140 when(mCarUserManagerHelper.isCurrentProcessUserHasRestriction( in getAvailabilityStatus_hasRestriction_disabledForUser()
150 when(mCarUserManagerHelper.getCurrentProcessUserInfo()).thenReturn(TEST_ADMIN_USER); in getAvailabilityStatus_hasMobileNetwork_isAdmin_noRestriction_available()
151 when(mCarUserManagerHelper.isCurrentProcessUserHasRestriction( in getAvailabilityStatus_hasMobileNetwork_isAdmin_noRestriction_available()

12345