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

Commit 25e29a10 authored by Pavel Grafov's avatar Pavel Grafov Committed by Android (Google) Code Review
Browse files

Merge "Add cross-user check to streaming policy getters"

parents 2737d04c d94cd5c0
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -7709,6 +7709,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
        Preconditions.checkCallAuthorization(
        Preconditions.checkCallAuthorization(
                isProfileOwner(caller) || isDefaultDeviceOwner(caller)
                isProfileOwner(caller) || isDefaultDeviceOwner(caller)
                        || hasCallingOrSelfPermission(permission.READ_NEARBY_STREAMING_POLICY));
                        || hasCallingOrSelfPermission(permission.READ_NEARBY_STREAMING_POLICY));
        Preconditions.checkCallAuthorization(hasCrossUsersPermission(caller, userId));
        synchronized (getLockObject()) {
        synchronized (getLockObject()) {
            if (mOwners.hasProfileOwner(userId) || mOwners.hasDeviceOwner()) {
            if (mOwners.hasProfileOwner(userId) || mOwners.hasDeviceOwner()) {
@@ -7749,6 +7750,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
        Preconditions.checkCallAuthorization(
        Preconditions.checkCallAuthorization(
                isProfileOwner(caller) || isDefaultDeviceOwner(caller)
                isProfileOwner(caller) || isDefaultDeviceOwner(caller)
                        || hasCallingOrSelfPermission(permission.READ_NEARBY_STREAMING_POLICY));
                        || hasCallingOrSelfPermission(permission.READ_NEARBY_STREAMING_POLICY));
        Preconditions.checkCallAuthorization(hasCrossUsersPermission(caller, userId));
        synchronized (getLockObject()) {
        synchronized (getLockObject()) {
            if (mOwners.hasProfileOwner(userId) || mOwners.hasDeviceOwner()) {
            if (mOwners.hasProfileOwner(userId) || mOwners.hasDeviceOwner()) {