Loading core/api/test-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -1082,7 +1082,7 @@ package android.content.pm { method public android.os.UserHandle getUserHandle(); method public boolean isAdmin(); method public boolean isCloneProfile(); method public boolean isCommunalProfile(); method @FlaggedApi("android.multiuser.support_communal_profile") public boolean isCommunalProfile(); method public boolean isDemo(); method public boolean isEnabled(); method public boolean isEphemeral(); Loading core/java/android/content/pm/UserInfo.java +2 −3 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package android.content.pm; import static android.os.Flags.FLAG_ALLOW_PRIVATE_PROFILE; import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.NonNull; Loading Loading @@ -389,11 +387,12 @@ public class UserInfo implements Parcelable { return UserManager.isUserTypeCloneProfile(userType); } @FlaggedApi(android.multiuser.Flags.FLAG_SUPPORT_COMMUNAL_PROFILE) public boolean isCommunalProfile() { return UserManager.isUserTypeCommunalProfile(userType); } @FlaggedApi(FLAG_ALLOW_PRIVATE_PROFILE) @FlaggedApi(android.os.Flags.FLAG_ALLOW_PRIVATE_PROFILE) public boolean isPrivateProfile() { return UserManager.isUserTypePrivateProfile(userType); } Loading services/core/java/com/android/server/pm/UserManagerService.java +3 −1 Original line number Diff line number Diff line Loading @@ -1282,7 +1282,9 @@ public class UserManagerService extends IUserManager.Stub { */ private boolean isSameUserOrProfileGroupOrTargetIsCommunal(UserInfo asker, UserInfo target) { if (asker.id == target.id) return true; if (android.multiuser.Flags.supportCommunalProfile()) { if (target.isCommunalProfile()) return true; } return (asker.profileGroupId != UserInfo.NO_PROFILE_GROUP_ID && asker.profileGroupId == target.profileGroupId); } Loading Loading
core/api/test-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -1082,7 +1082,7 @@ package android.content.pm { method public android.os.UserHandle getUserHandle(); method public boolean isAdmin(); method public boolean isCloneProfile(); method public boolean isCommunalProfile(); method @FlaggedApi("android.multiuser.support_communal_profile") public boolean isCommunalProfile(); method public boolean isDemo(); method public boolean isEnabled(); method public boolean isEphemeral(); Loading
core/java/android/content/pm/UserInfo.java +2 −3 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package android.content.pm; import static android.os.Flags.FLAG_ALLOW_PRIVATE_PROFILE; import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.NonNull; Loading Loading @@ -389,11 +387,12 @@ public class UserInfo implements Parcelable { return UserManager.isUserTypeCloneProfile(userType); } @FlaggedApi(android.multiuser.Flags.FLAG_SUPPORT_COMMUNAL_PROFILE) public boolean isCommunalProfile() { return UserManager.isUserTypeCommunalProfile(userType); } @FlaggedApi(FLAG_ALLOW_PRIVATE_PROFILE) @FlaggedApi(android.os.Flags.FLAG_ALLOW_PRIVATE_PROFILE) public boolean isPrivateProfile() { return UserManager.isUserTypePrivateProfile(userType); } Loading
services/core/java/com/android/server/pm/UserManagerService.java +3 −1 Original line number Diff line number Diff line Loading @@ -1282,7 +1282,9 @@ public class UserManagerService extends IUserManager.Stub { */ private boolean isSameUserOrProfileGroupOrTargetIsCommunal(UserInfo asker, UserInfo target) { if (asker.id == target.id) return true; if (android.multiuser.Flags.supportCommunalProfile()) { if (target.isCommunalProfile()) return true; } return (asker.profileGroupId != UserInfo.NO_PROFILE_GROUP_ID && asker.profileGroupId == target.profileGroupId); } Loading