Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80189cde authored by Tony Mak's avatar Tony Mak
Browse files

getProfiles should only returns non-partial user info

Bug: 26928524
Change-Id: I537bb0a9632cad603717a367b81d5e072452a6d7
parent 43459040
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -500,6 +500,9 @@ public class UserManagerService extends IUserManager.Stub {
            if (mRemovingUserIds.get(profile.id)) {
                continue;
            }
            if (profile.partial) {
                continue;
            }
            users.add(userWithName(profile));
        }
        return users;
+1 −1
Original line number Diff line number Diff line
@@ -3006,7 +3006,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
            ArrayList<ActiveAdmin> admins = new ArrayList<ActiveAdmin>();
            for (UserInfo userInfo : mUserManager.getProfiles(userHandle)) {
                DevicePolicyData policy = getUserData(userInfo.id);
                if (!isManagedProfile(userInfo.id)) {
                if (!userInfo.isManagedProfile()) {
                    admins.addAll(policy.mAdminList);
                } else {
                    // For managed profiles, we always include the policies set on the parent