Home
last modified time | relevance | path

Searched refs:UserUtils (Results 1 – 25 of 47) sorted by relevance

12

/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/util/
DUserUtilsTest.java50 assertEquals(-1, UserUtils.getCorpUserId(c)); in testGetCorpUser()
56 assertEquals(MockUserManager.CORP_USER.id, UserUtils.getCorpUserId(c)); in testGetCorpUser()
59 assertEquals(-1, UserUtils.getCorpUserId(c)); in testGetCorpUser()
66 assertEquals(MockUserManager.CORP_USER.id, UserUtils.getCorpUserId(c)); in testGetCorpUser()
69 assertEquals(-1, UserUtils.getCorpUserId(c)); in testGetCorpUser()
72 assertEquals(-1, UserUtils.getCorpUserId(c)); in testGetCorpUser()
78 assertEquals(-1, UserUtils.getCorpUserId(c)); in testGetCorpUser()
81 assertEquals(-1, UserUtils.getCorpUserId(c)); in testGetCorpUser()
88 assertEquals(MockUserManager.CORP_USER.id, UserUtils.getCorpUserId(c)); in testGetCorpUser()
91 assertEquals(-1, UserUtils.getCorpUserId(c)); in testGetCorpUser()
[all …]
/packages/modules/Permission/service/java/com/android/role/
DRoleService.java71 import com.android.permission.util.UserUtils;
324 if (!UserUtils.isUserExistent(userId, getContext())) { in maybeGrantDefaultRolesInternal()
467 UserUtils.enforceCrossUserPermission(userId, false, "isRoleAvailableAsUser", in isRoleAvailableAsUser()
469 if (!UserUtils.isUserExistent(userId, getContext())) { in isRoleAvailableAsUser()
484 UserUtils.enforceCrossUserPermission(userId, false, "isRoleHeldAsUser", getContext()); in isRoleHeldAsUser()
485 if (!UserUtils.isUserExistent(userId, getContext())) { in isRoleHeldAsUser()
503 UserUtils.enforceCrossUserPermission(userId, false, "getRoleHoldersAsUser", in getRoleHoldersAsUser()
505 if (!UserUtils.isUserExistent(userId, getContext())) { in getRoleHoldersAsUser()
526 UserUtils.enforceCrossUserPermission(userId, false, "addRoleHolderAsUser", in addRoleHolderAsUser()
528 if (!UserUtils.isUserExistent(userId, getContext())) { in addRoleHolderAsUser()
[all …]
/packages/modules/Permission/service/java/com/android/safetycenter/
DUserProfileGroup.java33 import com.android.permission.util.UserUtils;
94 List<UserHandle> userHandles = UserUtils.getUserHandles(context); in getAllUserProfileGroups()
157 if (UserUtils.isManagedProfile(userProfileId, context)) { in fromUser()
159 if (UserUtils.isProfileRunning(userProfileId, context)) { in fromUser()
163 } else if (UserUtils.isPrivateProfile(userProfileId, context)) { in fromUser()
165 privateProfileRunning = UserUtils.isProfileRunning(userProfileId, context); in fromUser()
190 return UserUtils.isManagedProfile(userId, context) in isSupported()
191 || UserUtils.isPrivateProfile(userId, context); in isSupported()
354 if (UserUtils.isManagedProfile(userId, context)) { in getProfileTypeOfUser()
357 if (UserUtils.isPrivateProfile(userId, context)) { in getProfileTypeOfUser()
/packages/modules/Permission/PermissionController/role-controller/java/com/android/role/controller/behavior/
DSmsRoleBehavior.java36 import com.android.role.controller.util.UserUtils;
62 if (UserUtils.isCloneProfile(user, context) in isAvailableAsUser()
63 || UserUtils.isPrivateProfile(user, context)) { in isAvailableAsUser()
73 if (UserUtils.isManagedProfile(user, context)) { in isAvailableAsUser()
82 if (UserUtils.isProfile(user, context)) { in isAvailableAsUser()
DHomeRoleBehavior.java38 import com.android.role.controller.util.UserUtils;
73 return !UserUtils.isProfile(user, context); in isAvailableAsUser()
83 Context userContext = UserUtils.getUserContext(context, user); in getFallbackHolderAsUser()
118 Context userContext = UserUtils.getUserContext(context, user); in isSettingsApplicationAsUser()
/packages/modules/Permission/PermissionController/role-controller/java/com/android/role/controller/behavior/v31/
DCompanionDeviceWatchRoleBehavior.java27 import com.android.role.controller.util.UserUtils;
37 if (!UserUtils.isManagedProfile(user, context)) { in grantAsUser()
45 if (!UserUtils.isManagedProfile(user, context)) { in revokeAsUser()
DSystemShellRoleBehavior.java29 import com.android.role.controller.util.UserUtils;
39 Context userContext = UserUtils.getUserContext(context, user); in isPackageQualifiedAsUser()
/packages/modules/Permission/PermissionController/role-controller/java/com/android/role/controller/behavior/v33/
DCompanionDeviceAppStreamingRoleBehavior.java27 import com.android.role.controller.util.UserUtils;
37 if (!UserUtils.isManagedProfile(user, context)) { in grantAsUser()
45 if (!UserUtils.isManagedProfile(user, context)) { in revokeAsUser()
DCompanionDeviceComputerRoleBehavior.java27 import com.android.role.controller.util.UserUtils;
37 if (!UserUtils.isManagedProfile(user, context)) { in grantAsUser()
45 if (!UserUtils.isManagedProfile(user, context)) { in revokeAsUser()
/packages/modules/Permission/PermissionController/role-controller/java/com/android/role/controller/behavior/v34/
DCompanionDeviceGlassesRoleBehavior.java27 import com.android.role.controller.util.UserUtils;
37 if (!UserUtils.isManagedProfile(user, context)) { in grantAsUser()
45 if (!UserUtils.isManagedProfile(user, context)) { in revokeAsUser()
DNotesRoleBehavior.java30 import com.android.role.controller.util.UserUtils;
50 if (UserUtils.isCloneProfile(user, context)) { in isAvailableAsUser()
54 if (UserUtils.isManagedProfile(user, context)) { in isAvailableAsUser()
/packages/modules/Permission/PermissionController/role-controller/java/com/android/role/controller/behavior/v35/
DRetailDemoRoleBehavior.java31 import com.android.role.controller.util.UserUtils;
46 Context userContext = UserUtils.getUserContext(context, user); in isPackageQualifiedAsUser()
60 Context userContext = UserUtils.getUserContext(context, user); in isAvailableAsUser()
DWalletRoleBehavior.java44 import com.android.role.controller.util.UserUtils;
66 && !UserUtils.isProfile(user, context); in isAvailableAsUser()
73 Context userContext = UserUtils.getUserContext(context, user); in getDefaultHoldersAsUser()
141 Context userContext = UserUtils.getUserContext(context, user); in getQualifyingApduServicesAsUser()
/packages/providers/ContactsProvider/src/com/android/providers/contacts/enterprise/
DEnterprisePolicyGuard.java33 import com.android.providers.contacts.util.UserUtils;
69 final UserHandle currentHandle = new UserHandle(UserUtils.getCurrentUserHandle(mContext)); in isCrossProfileAllowed()
84 final boolean isManagedProfileEnabled = !UserUtils.getUserManager(mContext) in isCrossProfileAllowed()
85 .isQuietModeEnabled(new UserHandle(UserUtils.getCorpUserId(mContext))); in isCrossProfileAllowed()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/ui/
DDefaultAppListViewModel.java32 import com.android.permissioncontroller.role.utils.UserUtils;
61 mWorkProfile = UserUtils.getWorkProfile(application); in DefaultAppListViewModel()
65 UserHandle privateProfile = UserUtils.getPrivateProfile(application); in DefaultAppListViewModel()
/packages/modules/Permission/service/java/com/android/ecm/
DEnhancedConfirmationService.java49 import com.android.permission.util.UserUtils;
156 if (!UserUtils.isUserExistent(userId, getContext())) { in isRestricted()
175 if (!UserUtils.isUserExistent(userId, getContext())) { in clearRestriction()
198 if (!UserUtils.isUserExistent(userId, getContext())) { in isClearRestrictionAllowed()
214 if (!UserUtils.isUserExistent(userId, getContext())) { in setClearRestrictionAllowed()
231 UserUtils.enforceCrossUserPermission(userId, false, methodName, mContext); in enforcePermissions()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/ui/behavior/
DHomeRoleUiBehavior.java38 import com.android.permissioncontroller.role.utils.UserUtils;
62 PackageManager userPackageManager = UserUtils.getUserContext(context, user) in preparePreferenceAsUser()
95 boolean hasWorkProfile = UserUtils.getWorkProfile(context) != null; in isMissingWorkProfileSupport()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/ui/behavior/v35/
DWalletRoleUiBehavior.java43 import com.android.role.controller.util.UserUtils;
63 Context userContext = UserUtils.getUserContext(context, user); in preparePreferenceAsUser()
74 Context userContext = UserUtils.getUserContext(context, user); in prepareApplicationPreferenceAsUser()
146 Context userContext = UserUtils.getUserContext(context, user); in getNonPaymentServiceBannerAndLabelIfExists()
/packages/modules/Permission/service/java/com/android/safetycenter/data/
DDefaultActionOverrideFix.java31 import com.android.permission.util.UserUtils;
118 UserUtils.isManagedProfile(userId, mContext) in getDefaultIntentForSource()
119 && !UserUtils.isProfileRunning(userId, mContext); in getDefaultIntentForSource()
/packages/modules/Permission/PermissionController/role-controller/java/com/android/role/controller/util/
DRoleManagerCompat.java57 Context userContext = UserUtils.getUserContext(context, user); in isRoleFallbackEnabledAsUser()
72 Context userContext = UserUtils.getUserContext(context, user); in setRoleFallbackEnabledAsUser()
DPackageUtils.java48 Context userContext = UserUtils.getUserContext(context, user); in getPackageInfoAsUser()
86 Context userContext = UserUtils.getUserContext(context, user); in getApplicationInfoAsUser()
/packages/modules/Permission/PermissionController/role-controller/java/com/android/role/controller/model/
DRequiredBroadcastReceiver.java29 import com.android.role.controller.util.UserUtils;
48 Context userContext = UserUtils.getUserContext(context, user); in queryIntentComponentsAsUser()
DRequiredService.java29 import com.android.role.controller.util.UserUtils;
48 Context userContext = UserUtils.getUserContext(context, user); in queryIntentComponentsAsUser()
DRequiredContentProvider.java29 import com.android.role.controller.util.UserUtils;
48 Context userContext = UserUtils.getUserContext(context, user); in queryIntentComponentsAsUser()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/ui/specialappaccess/
DSpecialAppAccessListViewModel.java32 import com.android.permissioncontroller.role.utils.UserUtils;
49 UserHandle workProfile = UserUtils.getWorkProfile(application); in SpecialAppAccessListViewModel()

12