Home
last modified time | relevance | path

Searched refs:mProfileHelper (Results 1 – 14 of 14) sorted by relevance

/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/profiles/
DProfileHelperTest.java67 private ProfileHelper mProfileHelper; field in ProfileHelperTest
80 mProfileHelper = new ProfileHelper(mMockUserManager, mMockResources, in setUp()
100 assertThat(mProfileHelper.canCurrentProcessModifyAccounts()).isTrue(); in canCurrentProcessModifyAccounts_baseline_returnsTrue()
107 assertThat(mProfileHelper.canCurrentProcessModifyAccounts()).isFalse(); in canCurrentProcessModifyAccounts_hasDisallowModifyAccounts_returnsFalse()
113 assertThat(mProfileHelper.canCurrentProcessModifyAccounts()).isFalse(); in canCurrentProcessModifyAccounts_isDemoUser_returnsFalse()
119 assertThat(mProfileHelper.canCurrentProcessModifyAccounts()).isFalse(); in canCurrentProcessModifyAccounts_isGuestUser_returnsFalse()
137 assertThat(mProfileHelper.getAllProfiles()).containsExactly(fgUser, user2, user3, user4); in testGetAllsers()
157 assertThat(mProfileHelper.getAllProfiles()) in testGetAllUsers_notHeadless()
175 assertThat(mProfileHelper.getAllSwitchableProfiles()).containsExactly(user1, user2); in testGetAllSwitchableUsers()
194 assertThat(mProfileHelper.getAllSwitchableProfiles()).containsExactly(systemUser, user1, in testGetAllSwitchableUsers_notHeadless()
[all …]
DProfilesBasePreferenceControllerTest.java86 private ProfileHelper mProfileHelper; field in ProfilesBasePreferenceControllerTest
92 ShadowUserHelper.setInstance(mProfileHelper); in setUp()
97 when(mProfileHelper.getCurrentProcessUserInfo()).thenReturn(TEST_CURRENT_USER); in setUp()
98 when(mProfileHelper.isCurrentProcessUser(TEST_CURRENT_USER)).thenReturn(true); in setUp()
99 when(mProfileHelper.getAllSwitchableProfiles()).thenReturn( in setUp()
101 when(mProfileHelper.getAllLivingProfiles(any())).thenReturn( in setUp()
147 when(mProfileHelper.getAllSwitchableProfiles()).thenReturn( in refreshUi_userChange_updatesGroup()
149 when(mProfileHelper.getAllLivingProfiles(any())).thenReturn( in refreshUi_userChange_updatesGroup()
194 when(mProfileHelper.getAllSwitchableProfiles()).thenReturn( in onUsersUpdated_updatesGroup()
196 when(mProfileHelper.getAllLivingProfiles(any())).thenReturn( in onUsersUpdated_updatesGroup()
DProfilesListPreferenceControllerTest.java65 private ProfileHelper mProfileHelper; field in ProfilesListPreferenceControllerTest
71 ShadowUserHelper.setInstance(mProfileHelper); in setUp()
79 when(mProfileHelper.getCurrentProcessUserInfo()).thenReturn(TEST_CURRENT_USER); in setUp()
80 when(mProfileHelper.isCurrentProcessUser(TEST_CURRENT_USER)).thenReturn(true); in setUp()
81 when(mProfileHelper.getAllSwitchableProfiles()).thenReturn( in setUp()
83 when(mProfileHelper.getAllLivingProfiles(any())).thenReturn( in setUp()
DProfilesPreferenceProviderTest.java74 private ProfileHelper mProfileHelper; field in ProfilesPreferenceProviderTest
79 ShadowUserHelper.setInstance(mProfileHelper); in setUp()
86 when(mProfileHelper.getCurrentProcessUserInfo()).thenReturn(TEST_CURRENT_USER); in setUp()
87 when(mProfileHelper.isCurrentProcessUser(TEST_CURRENT_USER)).thenReturn(true); in setUp()
88 when(mProfileHelper.getAllSwitchableProfiles()).thenReturn(users); in setUp()
89 when(mProfileHelper.getAllLivingProfiles(any())).thenReturn( in setUp()
/packages/apps/Car/Settings/src/com/android/car/settings/profiles/
DProfileDetailsActionButtonsPreferenceController.java56 private final ProfileHelper mProfileHelper; field in ProfileDetailsActionButtonsPreferenceController
88 mProfileHelper = profileHelper; in ProfileDetailsActionButtonsPreferenceController()
130 && mProfileHelper.isCurrentProcessUser(getUserInfo()) in onStartInternal()
134 || mUserManager.isAdminUser() && mProfileHelper.isCurrentProcessUser(getUserInfo()) in onStartInternal()
149 .setVisible(mProfileHelper.isCurrentProcessUser(getUserInfo())) in onStartInternal()
184 && !mProfileHelper.isCurrentProcessUser(getUserInfo())) in onStartInternal()
220 UserInfo currUserInfo = mProfileHelper.getCurrentProcessUserInfo(); in areThereOtherProfiles()
221 return !mProfileHelper.getAllLivingProfiles( in areThereOtherProfiles()
DRemoveProfileHandler.java39 private final ProfileHelper mProfileHelper; field in RemoveProfileHandler
51 mProfileHelper = profileHelper; in RemoveProfileHandler()
69 int removeProfileResult = mProfileHelper.removeProfile(mContext, mUserInfo); in setUserInfo()
75 ErrorDialog.newInstance(mProfileHelper.getErrorMessageForProfileResult( in setUserInfo()
113 boolean isLastProfile = mProfileHelper.getAllPersistentProfiles().size() == 1; in showConfirmRemoveProfileDialog()
115 && mProfileHelper.getAllAdminProfiles().size() == 1; in showConfirmRemoveProfileDialog()
DProfileDetailsHeaderPreferenceController.java33 private ProfileHelper mProfileHelper; field in ProfileDetailsHeaderPreferenceController
38 mProfileHelper = ProfileHelper.getInstance(getContext()); in ProfileDetailsHeaderPreferenceController()
57 mProfileHelper = profileHelper; in setProfileHelper()
65 return mProfileHelper.isCurrentProcessUser(getUserInfo()) in getSummary()
DProfileDetailsDeletePreferenceController.java38 private ProfileHelper mProfileHelper; field in ProfileDetailsDeletePreferenceController
56 mProfileHelper = profileHelper; in ProfileDetailsDeletePreferenceController()
80 && mProfileHelper.isCurrentProcessUser(getUserInfo())); in updateState()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/profiles/
DChooseNewAdminPreferenceControllerTest.java73 private ProfileHelper mProfileHelper; field in ChooseNewAdminPreferenceControllerTest
89 when(ProfileHelper.getInstance(any(Context.class))).thenReturn(mProfileHelper); in setUp()
145 verify(mProfileHelper).removeProfile(any(), eq(TEST_ADMIN_USER)); in testAssignNewAdminAndRemoveOldAdmin_removeUserCalled()
150 when(mProfileHelper.removeProfile(any(), eq(TEST_ADMIN_USER))) in testAssignNewAdminAndRemoveOldAdmin_success_noErrorDialog()
160 when(mProfileHelper.removeProfile(any(), eq(TEST_ADMIN_USER))) in testAssignNewAdminAndRemoveOldAdmin_failure_errorDialog()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/system/
DFactoryResetOtherProfilesPresentPreferenceControllerTest.java63 private ProfileHelper mProfileHelper; field in FactoryResetOtherProfilesPresentPreferenceControllerTest
74 when(ProfileHelper.getInstance(any())).thenReturn(mProfileHelper); in setUp()
91 when(mProfileHelper.getAllSwitchableProfiles()).thenReturn(Collections.emptyList()); in onCreate_noSwitchableUsers_hidesPreference()
100 when(mProfileHelper.getAllSwitchableProfiles()).thenReturn( in onCreate_switchableUsers_showsPreference()
/packages/apps/Car/Settings/src/com/android/car/settings/storage/
DStorageAsyncLoader.java53 private final ProfileHelper mProfileHelper; field in StorageAsyncLoader
59 mProfileHelper = ProfileHelper.getInstance(context); in StorageAsyncLoader()
66 List<UserInfo> infos = mProfileHelper.getAllProfiles(); in loadInBackground()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/storage/
DStorageAsyncLoaderTest.java70 private ProfileHelper mProfileHelper; field in StorageAsyncLoaderTest
87 ShadowUserHelper.setInstance(mProfileHelper); in setUp()
88 when(mProfileHelper.getAllProfiles()).thenReturn(mUsers); in setUp()
/packages/apps/Car/Settings/src/com/android/car/settings/applications/
DApplicationActionButtonsPreferenceController.java107 private ProfileHelper mProfileHelper; field in ApplicationActionButtonsPreferenceController
232 mProfileHelper = ProfileHelper.getInstance(context); in ApplicationActionButtonsPreferenceController()
417 if (isProfileOrDeviceOwner(mPackageName, mDpm, mProfileHelper)) { in shouldDisableUninstallButton()
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DContactsProvider2.java1401 private ProfileDatabaseHelper mProfileHelper; field in ContactsProvider2
1553 mProfileHelper = mProfileProvider.getDatabaseHelper(); in initialize()
1614 mProfileAggregator = new ProfileAggregator(this, mProfileHelper, in initForDefaultLocale()
1620 new PhotoStore(new File(getContext().getFilesDir(), "profile"), mProfileHelper); in initForDefaultLocale()
1626 initDataRowHandlers(mProfileDataRowHandlers, mProfileHelper, mProfileAggregator, in initForDefaultLocale()
1821 if (!needsToUpdateLocaleData(prefs, currentLocales, mContactsHelper, mProfileHelper)) { in updateLocaleInBackground()
1828 mProfileHelper.setLocale(currentLocales); in updateLocaleInBackground()
1869 SQLiteDatabase profileDb = mProfileHelper.getWritableDatabase(); in changeLocaleInBackground()
1902 long profileNum = DatabaseUtils.queryNumEntries(mProfileHelper.getReadableDatabase(), in updateProviderStatus()
2062 mProfileHelper.wipeData(); in wipeData()
[all …]