summaryrefslogtreecommitdiff
path: root/PermissionController/role-controller/java
diff options
context:
space:
mode:
Diffstat (limited to 'PermissionController/role-controller/java')
-rw-r--r--PermissionController/role-controller/java/com/android/role/controller/model/Role.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/PermissionController/role-controller/java/com/android/role/controller/model/Role.java b/PermissionController/role-controller/java/com/android/role/controller/model/Role.java
index e2af00982..02fa0d455 100644
--- a/PermissionController/role-controller/java/com/android/role/controller/model/Role.java
+++ b/PermissionController/role-controller/java/com/android/role/controller/model/Role.java
@@ -472,6 +472,12 @@ public class Role {
if (!isAvailableByFeatureFlagAndSdkVersion()) {
return false;
}
+
+ if (getExclusivity() == EXCLUSIVITY_PROFILE_GROUP
+ && UserUtils.isPrivateProfile(user, context)) {
+ return false;
+ }
+
if (mBehavior != null) {
boolean isAvailableAsUser = mBehavior.isAvailableAsUser(this, user, context);
// Ensure that cross-user role is only available if also available for