RESTRICT AUTOMERGE Add cross-user check to streaming policy getters
Bug: 235822336 Bug: 235821829 Test: atest CtsDevicePolicyTestCases:android.devicepolicy.cts.NearbyAppStreamingPolicyTest Test: atest CtsDevicePolicyTestCases:android.devicepolicy.cts.NearbyNotificationStreamingPolicyTest Change-Id: If8c10b5742f256d0b954a89634f2ca3e41d46778
This commit is contained in:
@@ -7783,6 +7783,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
|
||||
Preconditions.checkCallAuthorization(
|
||||
isProfileOwner(caller) || isDefaultDeviceOwner(caller)
|
||||
|| hasCallingOrSelfPermission(permission.READ_NEARBY_STREAMING_POLICY));
|
||||
Preconditions.checkCallAuthorization(hasCrossUsersPermission(caller, userId));
|
||||
|
||||
synchronized (getLockObject()) {
|
||||
if (mOwners.hasProfileOwner(userId) || mOwners.hasDeviceOwner()) {
|
||||
@@ -7823,6 +7824,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
|
||||
Preconditions.checkCallAuthorization(
|
||||
isProfileOwner(caller) || isDefaultDeviceOwner(caller)
|
||||
|| hasCallingOrSelfPermission(permission.READ_NEARBY_STREAMING_POLICY));
|
||||
Preconditions.checkCallAuthorization(hasCrossUsersPermission(caller, userId));
|
||||
|
||||
synchronized (getLockObject()) {
|
||||
if (mOwners.hasProfileOwner(userId) || mOwners.hasDeviceOwner()) {
|
||||
|
||||
Reference in New Issue
Block a user