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

Commit d59513f9 authored by kholoud mohamed's avatar kholoud mohamed
Browse files

Fix bug in getProfileOwnerAdminsForCurrentProfileGroup

Fixing a bug in ag/9885696.
Changed to get the active admin for the current user rather
than the calling user.

BUG: 136249261
Test: atest CrossProfileAppsPermissionHostSideTest
Change-Id: I847056b4dbca215438a9856c456d6042ea4fa891
parent f8ac43ed
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -14551,8 +14551,10 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
            for (int i = 0; i < users.length; i++) {
                final ComponentName componentName = getProfileOwner(users[i]);
                if (componentName != null) {
                    admins.add(getActiveAdminForCallerLocked(
                            componentName, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER));
                    ActiveAdmin admin = getActiveAdminUncheckedLocked(componentName, users[i]);
                    if (admin != null) {
                        admins.add(admin);
                    }
                }
            }
            return admins;