Home
last modified time | relevance | path

Searched refs:mUserHelper (Results 1 – 13 of 13) sorted by relevance

/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/users/
DUserHelperTest.java69 private UserHelper mUserHelper; field in UserHelperTest
82 mUserHelper = new UserHelper(mMockUserManager, mMockResources, in setUp()
102 assertThat(mUserHelper.canCurrentProcessModifyAccounts()).isTrue(); in canCurrentProcessModifyAccounts_baseline_returnsTrue()
109 assertThat(mUserHelper.canCurrentProcessModifyAccounts()).isFalse(); in canCurrentProcessModifyAccounts_hasDisallowModifyAccounts_returnsFalse()
115 assertThat(mUserHelper.canCurrentProcessModifyAccounts()).isFalse(); in canCurrentProcessModifyAccounts_isDemoUser_returnsFalse()
121 assertThat(mUserHelper.canCurrentProcessModifyAccounts()).isFalse(); in canCurrentProcessModifyAccounts_isGuestUser_returnsFalse()
139 assertThat(mUserHelper.getAllUsers()).containsExactly(fgUser, user2, user3, user4); in testGetAllsers()
159 assertThat(mUserHelper.getAllUsers()) in testGetAllUsers_notHeadless()
177 assertThat(mUserHelper.getAllSwitchableUsers()).containsExactly(user1, user2); in testGetAllSwitchableUsers()
196 assertThat(mUserHelper.getAllSwitchableUsers()).containsExactly(systemUser, user1, user2); in testGetAllSwitchableUsers_notHeadless()
[all …]
DUsersBasePreferenceControllerTest.java85 private UserHelper mUserHelper; field in UsersBasePreferenceControllerTest
91 ShadowUserHelper.setInstance(mUserHelper); in setUp()
96 when(mUserHelper.getCurrentProcessUserInfo()).thenReturn(TEST_CURRENT_USER); in setUp()
97 when(mUserHelper.isCurrentProcessUser(TEST_CURRENT_USER)).thenReturn(true); in setUp()
98 when(mUserHelper.getAllSwitchableUsers()).thenReturn( in setUp()
100 when(mUserHelper.getAllLivingUsers(any())).thenReturn( in setUp()
146 when(mUserHelper.getAllSwitchableUsers()).thenReturn( in refreshUi_userChange_updatesGroup()
148 when(mUserHelper.getAllLivingUsers(any())).thenReturn( in refreshUi_userChange_updatesGroup()
193 when(mUserHelper.getAllSwitchableUsers()).thenReturn( in onUsersUpdated_updatesGroup()
195 when(mUserHelper.getAllLivingUsers(any())).thenReturn( in onUsersUpdated_updatesGroup()
DEditUserNameEntryPreferenceControllerTest.java62 private UserHelper mUserHelper; field in EditUserNameEntryPreferenceControllerTest
67 ShadowUserHelper.setInstance(mUserHelper); in setUp()
86 when(mUserHelper.isCurrentProcessUser(userInfo)).thenReturn(true); in testOnButtonClick_isCurrentUser_launchesEditUsernameFragment()
97 when(mUserHelper.isCurrentProcessUser(userInfo)).thenReturn(false); in testOnButtonClick_isNotCurrentUser_doesNothing()
108 when(mUserHelper.isCurrentProcessUser(userInfo)).thenReturn(false); in testRefreshUi_elementHasTitle()
138 when(mUserHelper.isCurrentProcessUser(userInfo)).thenReturn(false); in testRefreshUi_isAdmin_notCurrentUser()
150 when(mUserHelper.isCurrentProcessUser(userInfo)).thenReturn(true); in testRefreshUi_isAdmin_currentUser()
DUsersListPreferenceControllerTest.java65 private UserHelper mUserHelper; field in UsersListPreferenceControllerTest
71 ShadowUserHelper.setInstance(mUserHelper); in setUp()
79 when(mUserHelper.getCurrentProcessUserInfo()).thenReturn(TEST_CURRENT_USER); in setUp()
80 when(mUserHelper.isCurrentProcessUser(TEST_CURRENT_USER)).thenReturn(true); in setUp()
81 when(mUserHelper.getAllSwitchableUsers()).thenReturn( in setUp()
83 when(mUserHelper.getAllLivingUsers(any())).thenReturn( in setUp()
DUsersPreferenceProviderTest.java74 private UserHelper mUserHelper; field in UsersPreferenceProviderTest
79 ShadowUserHelper.setInstance(mUserHelper); in setUp()
86 when(mUserHelper.getCurrentProcessUserInfo()).thenReturn(TEST_CURRENT_USER); in setUp()
87 when(mUserHelper.isCurrentProcessUser(TEST_CURRENT_USER)).thenReturn(true); in setUp()
88 when(mUserHelper.getAllSwitchableUsers()).thenReturn(users); in setUp()
89 when(mUserHelper.getAllLivingUsers(any())).thenReturn( in setUp()
DChooseNewAdminPreferenceControllerTest.java70 private UserHelper mUserHelper; field in ChooseNewAdminPreferenceControllerTest
77 ShadowUserHelper.setInstance(mUserHelper); in setUp()
129 verify(mUserHelper).removeUser(any(Context.class), eq(TEST_ADMIN_USER)); in testAssignNewAdminAndRemoveOldAdmin_removeUserCalled()
134 when(mUserHelper.removeUser(any(Context.class), eq(TEST_ADMIN_USER))).thenReturn(true); in testAssignNewAdminAndRemoveOldAdmin_success_noErrorDialog()
144 when(mUserHelper.removeUser(any(Context.class), eq(TEST_ADMIN_USER))).thenReturn(false); in testAssignNewAdminAndRemoveOldAdmin_failure_errorDialog()
DUsersListFragmentTest.java76 private UserHelper mUserHelper; field in UsersListFragmentTest
82 ShadowUserHelper.setInstance(mUserHelper); in setUp()
165 when(mUserHelper.getCurrentProcessUserInfo()).thenReturn(testUser); in createUsersListFragment()
166 when(mUserHelper.getAllSwitchableUsers()).thenReturn(new ArrayList<>()); in createUsersListFragment()
DUserDetailsBaseFragmentTest.java79 private UserHelper mUserHelper; field in UserDetailsBaseFragmentTest
89 ShadowUserHelper.setInstance(mUserHelper); in setUpTestActivity()
143 when(mUserHelper.getAllPersistentUsers()).thenReturn( in testRemoveUserButtonClick_createsRemovalDialog()
/packages/apps/Car/Settings/src/com/android/car/settings/users/
DEditUserNameEntryPreferenceController.java31 private final UserHelper mUserHelper; field in EditUserNameEntryPreferenceController
36 mUserHelper = UserHelper.getInstance(getContext()); in EditUserNameEntryPreferenceController()
54 if (!mUserHelper.isCurrentProcessUser(getUserInfo())) { in updateState()
65 return mUserHelper.isCurrentProcessUser(getUserInfo()) in getSummary()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/system/
DMasterClearOtherUsersPresentPreferenceControllerTest.java51 private UserHelper mUserHelper; field in MasterClearOtherUsersPresentPreferenceControllerTest
58 ShadowUserHelper.setInstance(mUserHelper); in setUp()
76 when(mUserHelper.getAllSwitchableUsers()).thenReturn(Collections.emptyList()); in refreshUi_noSwitchableUsers_hidesPreference()
85 when(mUserHelper.getAllSwitchableUsers()).thenReturn( in refreshUi_switchableUsers_showsPreference()
/packages/apps/Car/Settings/src/com/android/car/settings/storage/
DStorageAsyncLoader.java53 private final UserHelper mUserHelper; field in StorageAsyncLoader
59 mUserHelper = UserHelper.getInstance(context); in StorageAsyncLoader()
66 List<UserInfo> infos = mUserHelper.getAllUsers(); in loadInBackground()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/storage/
DStorageAsyncLoaderTest.java70 private UserHelper mUserHelper; field in StorageAsyncLoaderTest
87 ShadowUserHelper.setInstance(mUserHelper); in setUp()
88 when(mUserHelper.getAllUsers()).thenReturn(mUsers); in setUp()
/packages/apps/Car/Settings/src/com/android/car/settings/applications/
DApplicationDetailsFragment.java95 private UserHelper mUserHelper; field in ApplicationDetailsFragment
134 mUserHelper = UserHelper.getInstance(context); in onAttach()
295 if (isProfileOrDeviceOwner(mPackageName, mDpm, mUserHelper)) { in shouldDisableUninstallButton()