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

Commit 5263ffa5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Give the PO the MANAGE_DEVICE_POLICY_CERTIFICATES permission" into udc-dev am: e8899cf6

parents e02018d1 e8899cf6
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -10748,7 +10748,9 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
    @VisibleForTesting
    boolean hasDeviceIdAccessUnchecked(String packageName, int uid) {
        final int userId = UserHandle.getUserId(uid);
        if (isPermissionCheckFlagEnabled()) {
        // TODO(b/280048070): Introduce a permission to handle device ID access
        if (isPermissionCheckFlagEnabled()
                && !(isUidProfileOwnerLocked(uid) || isUidDeviceOwnerLocked(uid))) {
            return hasPermission(MANAGE_DEVICE_POLICY_CERTIFICATES, packageName, userId);
        } else {
            ComponentName deviceOwner = getDeviceOwnerComponent(true);
@@ -22930,6 +22932,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
                    MANAGE_DEVICE_POLICY_LOCATION,
                    MANAGE_DEVICE_POLICY_LOCK,
                    MANAGE_DEVICE_POLICY_LOCK_CREDENTIALS,
                    MANAGE_DEVICE_POLICY_CERTIFICATES,
                    MANAGE_DEVICE_POLICY_NEARBY_COMMUNICATION,
                    MANAGE_DEVICE_POLICY_ORGANIZATION_IDENTITY,
                    MANAGE_DEVICE_POLICY_PACKAGE_STATE,