Home
last modified time | relevance | path

Searched refs:ProfileHelper (Results 1 – 25 of 49) 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/accounts/
DAccountGroupPreferenceController.java31 import com.android.car.settings.profiles.ProfileHelper;
59 ProfileHelper profileHelper = getProfileHelper(); in getDefaultAvailabilityStatus()
74 ProfileHelper getProfileHelper() { in getProfileHelper()
75 return ProfileHelper.getInstance(getContext()); in getProfileHelper()
DAccountDetailsPreferenceController.java44 import com.android.car.settings.profiles.ProfileHelper;
148 ProfileHelper profileHelper = getProfileHelper(); in getSecondaryActionAvailabilityStatus()
187 ProfileHelper getProfileHelper() { in getProfileHelper()
188 return ProfileHelper.getInstance(getContext()); in getProfileHelper()
DAccountListPreferenceController.java41 import com.android.car.settings.profiles.ProfileHelper;
83 mUserInfo = ProfileHelper.getInstance(context).getCurrentProcessUserInfo(); in AccountListPreferenceController()
111 ProfileHelper profileHelper = getProfileHelper(); in getDefaultAvailabilityStatus()
308 ProfileHelper getProfileHelper() { in getProfileHelper()
309 return ProfileHelper.getInstance(getContext()); in getProfileHelper()
DAddAccountPreferenceController.java38 import com.android.car.settings.profiles.ProfileHelper;
155 ProfileHelper getProfileHelper() { in getProfileHelper()
156 return ProfileHelper.getInstance(getContext()); in getProfileHelper()
/packages/modules/IntentResolver/tests/unit/src/com/android/intentresolver/
DProfileHelperTest.kt50 helper: ProfileHelper, in assertProfiles()
96 ProfileHelper( in <lambda>()
118 ProfileHelper( in <lambda>()
139 ProfileHelper( in <lambda>()
162 ProfileHelper( in <lambda>()
186 ProfileHelper( in <lambda>()
210 ProfileHelper( in <lambda>()
234 ProfileHelper( in <lambda>()
260 ProfileHelper( in <lambda>()
/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()
DChooseNewAdminPreferenceController.java92 ProfileHelper profileHelper = ProfileHelper.getInstance(context); in removeOldAdmin()
94 if (removeUserResult != ProfileHelper.REMOVE_PROFILE_RESULT_SUCCESS) { in removeOldAdmin()
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()
DProfileDetailsActionButtonsPreferenceController.java60 private final ProfileHelper mProfileHelper;
81 ProfileHelper.getInstance(context), UserManager.get(context), in ProfileDetailsActionButtonsPreferenceController()
82 new RemoveProfileHandler(context, ProfileHelper.getInstance(context), in ProfileDetailsActionButtonsPreferenceController()
89 CarUxRestrictions uxRestrictions, ProfileHelper profileHelper, UserManager userManager, in ProfileDetailsActionButtonsPreferenceController()
DProfileHelper.java63 public class ProfileHelper { class
66 private static ProfileHelper sInstance;
109 public static ProfileHelper getInstance(Context context) { in getInstance()
113 sInstance = new ProfileHelper( in getInstance()
123 ProfileHelper(UserManager userManager, Resources resources, String defaultAdminName, in ProfileHelper() method in ProfileHelper
DRemoveProfileHandler.java52 private final ProfileHelper mProfileHelper;
61 public RemoveProfileHandler(Context context, ProfileHelper profileHelper, in RemoveProfileHandler()
83 if (removeProfileResult == ProfileHelper.REMOVE_PROFILE_RESULT_SUCCESS) { in setUserInfo()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/profiles/
DChooseNewAdminPreferenceControllerTest.java74 private ProfileHelper mProfileHelper;
87 .mockStatic(ProfileHelper.class, withSettings().lenient()) in setUp()
90 when(ProfileHelper.getInstance(any(Context.class))).thenReturn(mProfileHelper); in setUp()
152 .thenReturn(ProfileHelper.REMOVE_PROFILE_RESULT_SUCCESS); in testAssignNewAdminAndRemoveOldAdmin_success_noErrorDialog()
162 .thenReturn(ProfileHelper.REMOVE_PROFILE_RESULT_FAILED); in testAssignNewAdminAndRemoveOldAdmin_failure_errorDialog()
DProfilesListPreferenceControllerTest.java72 private ProfileHelper mProfileHelper;
79 .mockStatic(ProfileHelper.class) in setUp()
97 ExtendedMockito.when(ProfileHelper.getInstance(mContext)).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/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/modules/IntentResolver/java/src/com/android/intentresolver/emptystate/
DNoAppsAvailableEmptyStateProvider.java29 import com.android.intentresolver.ProfileHelper;
42 private final ProfileHelper mProfileHelper;
46 ProfileHelper profileHelper, in NoAppsAvailableEmptyStateProvider()
DWorkProfilePausedEmptyStateProvider.java31 import com.android.intentresolver.ProfileHelper;
43 private final ProfileHelper mProfileHelper;
50 ProfileHelper profileHelper, in WorkProfilePausedEmptyStateProvider()
DNoCrossProfileEmptyStateProvider.java30 import com.android.intentresolver.ProfileHelper;
43 private final ProfileHelper mProfileHelper;
49 ProfileHelper profileHelper, in NoCrossProfileEmptyStateProvider()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/profiles/
DProfileHelperTest.java66 private ProfileHelper mProfileHelper;
79 mProfileHelper = new ProfileHelper(mMockUserManager, mMockResources, in setUp()
286 .isEqualTo(ProfileHelper.REMOVE_PROFILE_RESULT_FAILED); in testRemoveUser_isAdminUser_cannotRemoveSystemUser()
303 .isEqualTo(ProfileHelper.REMOVE_PROFILE_RESULT_SUCCESS); in testRemoveUser_isAdmin_canRemoveOtherUsers()
322 .isEqualTo(ProfileHelper.REMOVE_PROFILE_RESULT_FAILED); in testRemoveUser_isNonAdmin_cannotRemoveOtherUsers()
344 .isEqualTo(ProfileHelper.REMOVE_PROFILE_RESULT_SUCCESS); in testRemoveUser_removesLastAdminUser_createsAndSwitchesToNewAdminUser()
367 .isEqualTo(ProfileHelper.REMOVE_PROFILE_RESULT_FAILED); in testRemoveUser_removesLastAdminUserFailsCreateNewUser_doesNotRemoveOrSwitchUser()
387 assertUserRemoved(ProfileHelper.REMOVE_PROFILE_RESULT_SUCCESS, guestUser, currentUser); in testRemoveUser_removeForegroundUser_callsSwitchToGuest()
404 assertUserRemoved(ProfileHelper.REMOVE_PROFILE_RESULT_SWITCH_FAILED, guestUser, in testRemoveUser_removeForegroundUser_switchFails_returnsSetEphemeralResult()
/packages/apps/Car/Settings/src/com/android/car/settings/storage/
DStorageAsyncLoader.java37 import com.android.car.settings.profiles.ProfileHelper;
55 private final ProfileHelper mProfileHelper;
58 this(context, source, context.getPackageManager(), ProfileHelper.getInstance(context)); in StorageAsyncLoader()
63 PackageManager packageManager, ProfileHelper profileHelper) { in StorageAsyncLoader()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/accounts/
DChooseAccountPreferenceControllerTest.java50 import com.android.car.settings.profiles.ProfileHelper;
87 private ProfileHelper mMockProfileHelper;
202 .mockStatic(ProfileHelper.class, withSettings().lenient()) in initMocks()
206 when(ProfileHelper.getInstance(mContext)).thenReturn(mMockProfileHelper); in initMocks()
DAccountDetailsPreferenceControllerTest.java44 import com.android.car.settings.profiles.ProfileHelper;
73 private ProfileHelper mMockProfileHelper;
187 ProfileHelper getProfileHelper() { in getProfileHelper()

12