Allow apps with CREATE_USERS permission to call UM.getProfiles.
Bug: 29189712 Bug: 30317026 Bug: 30235113 Change-Id: I899f13898773483ee627a974d70173b5aa962e9a
This commit is contained in:
@@ -548,7 +548,7 @@ public class UserManagerService extends IUserManager.Stub {
|
|||||||
public List<UserInfo> getProfiles(int userId, boolean enabledOnly) {
|
public List<UserInfo> getProfiles(int userId, boolean enabledOnly) {
|
||||||
boolean returnFullInfo = true;
|
boolean returnFullInfo = true;
|
||||||
if (userId != UserHandle.getCallingUserId()) {
|
if (userId != UserHandle.getCallingUserId()) {
|
||||||
checkManageUsersPermission("getting profiles related to user " + userId);
|
checkManageOrCreateUsersPermission("getting profiles related to user " + userId);
|
||||||
} else {
|
} else {
|
||||||
returnFullInfo = hasManageUsersPermission();
|
returnFullInfo = hasManageUsersPermission();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user