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

Commit 2e233054 authored by Stephanie Bak's avatar Stephanie Bak Committed by Android (Google) Code Review
Browse files

Merge "Change SystemUID check to QUERY_ADMIN_POLICY check"

parents c0d5a432 e1a640e2
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -18515,9 +18515,10 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
        final CallerIdentity caller = getCallerIdentity();
        Preconditions.checkCallAuthorization(
                isDefaultDeviceOwner(caller) || isProfileOwnerOfOrganizationOwnedDevice(caller)
                        || isSystemUid(caller),
                        || canQueryAdminPolicy(caller),
                "SSID allowlist can only be retrieved by a device owner or "
                        + "a profile owner on an organization-owned device or a system app.");
                        + "a profile owner on an organization-owned device or "
                        + "an app with the QUERY_ADMIN_POLICY permission.");
        synchronized (getLockObject()) {
            final ActiveAdmin admin = getDeviceOwnerOrProfileOwnerOfOrganizationOwnedDeviceLocked(
                    UserHandle.USER_SYSTEM);
@@ -18553,9 +18554,10 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
        final CallerIdentity caller = getCallerIdentity();
        Preconditions.checkCallAuthorization(
                isDefaultDeviceOwner(caller) || isProfileOwnerOfOrganizationOwnedDevice(caller)
                        || isSystemUid(caller),
                        || canQueryAdminPolicy(caller),
                "SSID denylist can only be retrieved by a device owner or "
                        + "a profile owner on an organization-owned device or a system app.");
                        + "a profile owner on an organization-owned device or "
                        + "an app with the QUERY_ADMIN_POLICY permission.");
        synchronized (getLockObject()) {
            final ActiveAdmin admin = getDeviceOwnerOrProfileOwnerOfOrganizationOwnedDeviceLocked(
                    UserHandle.USER_SYSTEM);