Loading services/core/java/com/android/server/pm/UserManagerService.java +9 −5 Original line number Diff line number Diff line Loading @@ -641,12 +641,16 @@ public class UserManagerService extends IUserManager.Stub { @Override public UserInfo getUserInfo(int userId) { if (!hasManageUsersPermission() && !isSameProfileGroupLP(UserHandle.getCallingUserId(), userId)) { int callingUserId = UserHandle.getCallingUserId(); if (callingUserId != userId && !hasManageUsersPermission()) { synchronized (mPackagesLock) { if (!isSameProfileGroupLP(callingUserId, userId)) { throw new SecurityException( "You need MANAGE_USERS permission to: query users outside profile group"); "You need MANAGE_USERS permission to: query users outside profile" + " group"); } } } synchronized (mUsersLock) { return getUserInfoLU(userId); } Loading Loading
services/core/java/com/android/server/pm/UserManagerService.java +9 −5 Original line number Diff line number Diff line Loading @@ -641,12 +641,16 @@ public class UserManagerService extends IUserManager.Stub { @Override public UserInfo getUserInfo(int userId) { if (!hasManageUsersPermission() && !isSameProfileGroupLP(UserHandle.getCallingUserId(), userId)) { int callingUserId = UserHandle.getCallingUserId(); if (callingUserId != userId && !hasManageUsersPermission()) { synchronized (mPackagesLock) { if (!isSameProfileGroupLP(callingUserId, userId)) { throw new SecurityException( "You need MANAGE_USERS permission to: query users outside profile group"); "You need MANAGE_USERS permission to: query users outside profile" + " group"); } } } synchronized (mUsersLock) { return getUserInfoLU(userId); } Loading