Home
last modified time | relevance | path

Searched refs:ProfileHelper (Results 1 – 25 of 38) sorted by relevance

12

/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/testutils/
DShadowUserHelper.java23 import com.android.car.settings.profiles.ProfileHelper;
35 @Implements(ProfileHelper.class)
37 private static ProfileHelper sInstance;
39 public static void setInstance(ProfileHelper profileHelper) { in setInstance()
80 @ProfileHelper.RemoveProfileResult
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/applications/
DApplicationsUtilsTest.java28 import com.android.car.settings.profiles.ProfileHelper;
84 ProfileHelper profileHelper = mock(ProfileHelper.class); in isProfileOrDeviceOwner_profileOwner_returnsTrue()
100 mock(ProfileHelper.class))).isTrue(); in isProfileOrDeviceOwner_deviceOwner_returnsTrue()
106 mock(DevicePolicyManager.class), mock(ProfileHelper.class))).isFalse(); in isProfileOrDeviceOwner_returnsFalse()
/packages/apps/Car/Settings/src/com/android/car/settings/profiles/
DProfileDetailsDeletePreferenceController.java38 private ProfileHelper mProfileHelper;
45 ProfileHelper.getInstance(context), in ProfileDetailsDeletePreferenceController()
46 new RemoveProfileHandler(context, ProfileHelper.getInstance(context), in ProfileDetailsDeletePreferenceController()
53 CarUxRestrictions uxRestrictions, ProfileHelper profileHelper, in ProfileDetailsDeletePreferenceController()
DProfileDetailsHeaderPreferenceController.java33 private ProfileHelper mProfileHelper;
38 mProfileHelper = ProfileHelper.getInstance(getContext()); in ProfileDetailsHeaderPreferenceController()
56 void setProfileHelper(ProfileHelper profileHelper) { in setProfileHelper()
DProfileHelper.java55 public class ProfileHelper { class
58 private static ProfileHelper sInstance;
101 public static ProfileHelper getInstance(Context context) { in getInstance()
105 sInstance = new ProfileHelper(UserManager.get(appContext), resources, in getInstance()
114 ProfileHelper(UserManager userManager, Resources resources, String defaultAdminName, in ProfileHelper() method in ProfileHelper
DChooseNewAdminPreferenceController.java91 ProfileHelper profileHelper = ProfileHelper.getInstance(context); in removeOldAdmin()
93 if (removeUserResult != ProfileHelper.REMOVE_PROFILE_RESULT_SUCCESS) { in removeOldAdmin()
DProfileDetailsActionButtonsPreferenceController.java56 private final ProfileHelper mProfileHelper;
77 ProfileHelper.getInstance(context), UserManager.get(context), in ProfileDetailsActionButtonsPreferenceController()
78 new RemoveProfileHandler(context, ProfileHelper.getInstance(context), in ProfileDetailsActionButtonsPreferenceController()
85 CarUxRestrictions uxRestrictions, ProfileHelper profileHelper, UserManager userManager, in ProfileDetailsActionButtonsPreferenceController()
DRemoveProfileHandler.java39 private final ProfileHelper mProfileHelper;
48 public RemoveProfileHandler(Context context, ProfileHelper profileHelper, in RemoveProfileHandler()
70 if (removeProfileResult == ProfileHelper.REMOVE_PROFILE_RESULT_SUCCESS) { in setUserInfo()
DProfilesPreferenceProvider.java83 UserInfo currUserInfo = ProfileHelper.getInstance(mContext).getCurrentProcessUserInfo(); in createProfileList()
92 List<UserInfo> infos = ProfileHelper.getInstance(mContext).getAllLivingProfiles( in createProfileList()
140 return ProfileHelper.getInstance(mContext).isCurrentProcessUser(userInfo); in isCurrentProfile()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/profiles/
DChooseNewAdminPreferenceControllerTest.java73 private ProfileHelper mProfileHelper;
86 .mockStatic(ProfileHelper.class, withSettings().lenient()) in setUp()
89 when(ProfileHelper.getInstance(any(Context.class))).thenReturn(mProfileHelper); in setUp()
151 .thenReturn(ProfileHelper.REMOVE_PROFILE_RESULT_SUCCESS); in testAssignNewAdminAndRemoveOldAdmin_success_noErrorDialog()
161 .thenReturn(ProfileHelper.REMOVE_PROFILE_RESULT_FAILED); in testAssignNewAdminAndRemoveOldAdmin_failure_errorDialog()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/profiles/
DProfileHelperTest.java67 private ProfileHelper mProfileHelper;
80 mProfileHelper = new ProfileHelper(mMockUserManager, mMockResources, in setUp()
287 .isEqualTo(ProfileHelper.REMOVE_PROFILE_RESULT_FAILED); in testRemoveUser_isAdminUser_cannotRemoveSystemUser()
304 .isEqualTo(ProfileHelper.REMOVE_PROFILE_RESULT_SUCCESS); in testRemoveUser_isAdmin_canRemoveOtherUsers()
323 .isEqualTo(ProfileHelper.REMOVE_PROFILE_RESULT_FAILED); in testRemoveUser_isNonAdmin_cannotRemoveOtherUsers()
345 .isEqualTo(ProfileHelper.REMOVE_PROFILE_RESULT_SUCCESS); in testRemoveUser_removesLastAdminUser_createsAndSwitchesToNewAdminUser()
368 .isEqualTo(ProfileHelper.REMOVE_PROFILE_RESULT_FAILED); in testRemoveUser_removesLastAdminUserFailsCreateNewUser_doesNotRemoveOrSwitchUser()
388 assertUserRemoved(ProfileHelper.REMOVE_PROFILE_RESULT_SUCCESS, guestUser, currentUser); in testRemoveUser_removeForegroundUser_callsSwitchToGuest()
405 assertUserRemoved(ProfileHelper.REMOVE_PROFILE_RESULT_SWITCH_FAILED, guestUser, in testRemoveUser_removeForegroundUser_switchFails_returnsSetEphemeralResult()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/system/
DFactoryResetOtherProfilesPresentPreferenceControllerTest.java36 import com.android.car.settings.profiles.ProfileHelper;
63 private ProfileHelper mProfileHelper;
73 ProfileHelper.class, withSettings().lenient()).startMocking(); in setUp()
74 when(ProfileHelper.getInstance(any())).thenReturn(mProfileHelper); in setUp()
/packages/apps/Car/Settings/src/com/android/car/settings/system/
DFactoryResetOtherProfilesPresentPreferenceController.java26 import com.android.car.settings.profiles.ProfileHelper;
48 ProfileHelper profileHelper = ProfileHelper.getInstance(getContext()); in updateState()
/packages/apps/Car/Settings/src/com/android/car/settings/accounts/
DAccountGroupPreferenceController.java27 import com.android.car.settings.profiles.ProfileHelper;
54 ProfileHelper getProfileHelper() { in getProfileHelper()
55 return ProfileHelper.getInstance(getContext()); in getProfileHelper()
DAddAccountPreferenceController.java27 import com.android.car.settings.profiles.ProfileHelper;
97 ProfileHelper getProfileHelper() { in getProfileHelper()
98 return ProfileHelper.getInstance(getContext()); in getProfileHelper()
DAccountDetailsPreferenceController.java37 import com.android.car.settings.profiles.ProfileHelper;
154 ProfileHelper getProfileHelper() { in getProfileHelper()
155 return ProfileHelper.getInstance(getContext()); in getProfileHelper()
DAccountListPreferenceController.java37 import com.android.car.settings.profiles.ProfileHelper;
76 mUserInfo = ProfileHelper.getInstance(context).getCurrentProcessUserInfo(); in AccountListPreferenceController()
97 boolean canModifyAccounts = ProfileHelper.getInstance(getContext()) in getAvailabilityStatus()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/accounts/
DAccountDetailsPreferenceControllerTest.java38 import com.android.car.settings.profiles.ProfileHelper;
64 private ProfileHelper mMockProfileHelper;
122 ProfileHelper getProfileHelper() { in getProfileHelper()
DChooseAccountPreferenceControllerTest.java50 import com.android.car.settings.profiles.ProfileHelper;
88 private ProfileHelper mMockProfileHelper;
206 .mockStatic(ProfileHelper.class, withSettings().lenient()) in initMocks()
210 when(ProfileHelper.getInstance(mContext)).thenReturn(mMockProfileHelper); in initMocks()
DAccountGroupPreferenceControllerTest.java41 import com.android.car.settings.profiles.ProfileHelper;
63 private ProfileHelper mMockProfileHelper;
139 ProfileHelper getProfileHelper() { in getProfileHelper()
DAddAccountPreferenceControllerTest.java42 import com.android.car.settings.profiles.ProfileHelper;
66 private ProfileHelper mMockProfileHelper;
157 ProfileHelper getProfileHelper() { in getProfileHelper()
DAccountListPreferenceControllerTest.java45 import com.android.car.settings.profiles.ProfileHelper;
88 private ProfileHelper mMockProfileHelper;
282 .mockStatic(ProfileHelper.class, withSettings().lenient()) in initMocks()
286 when(ProfileHelper.getInstance(mContext)).thenReturn(mMockProfileHelper); in initMocks()
/packages/apps/Car/Settings/src/com/android/car/settings/storage/
DStorageAsyncLoader.java35 import com.android.car.settings.profiles.ProfileHelper;
53 private final ProfileHelper mProfileHelper;
59 mProfileHelper = ProfileHelper.getInstance(context); in StorageAsyncLoader()
/packages/apps/Car/Settings/src/com/android/car/settings/applications/
DApplicationsUtils.java30 import com.android.car.settings.profiles.ProfileHelper;
70 ProfileHelper profileHelper) { in isProfileOrDeviceOwner()
/packages/apps/Car/Settings/src/com/android/car/settings/privacy/
DDeleteUserPreferenceController.java30 import com.android.car.settings.profiles.ProfileHelper;
46 new RemoveProfileHandler(context, ProfileHelper.getInstance(context), in DeleteUserPreferenceController()

12