summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Rubin Xu <rubinxu@google.com> 2023-03-06 21:20:34 +0000
committer Rubin Xu <rubinxu@google.com> 2023-03-06 21:20:34 +0000
commitfb41da4662f71e787c7100ef4388f67da9cec37a (patch)
tree3660ba1f66dc4711131f9740ea89e87ba4f3f0e7
parent5c6c582940cf4509d5a1ea987f6b41c7666a0d00 (diff)
Fix DefaultSmsApplicationTest for organization-owned profile owner
Bug: 270614236 Fix: 270614236 Test: DefaultSmsApplicationTest Change-Id: Ieee2f12f7e786588aeec679e97be7f2179baa032
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index bfcb4c7b6bc0..d3cfb9d80b3c 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -11196,7 +11196,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
} else {
Objects.requireNonNull(admin, "ComponentName is null");
Preconditions.checkCallAuthorization(isDefaultDeviceOwner(caller)
- || (parent && isProfileOwnerOfOrganizationOwnedDevice(caller)));
+ || isProfileOwnerOfOrganizationOwnedDevice(caller));
}
if (parent) {
userId = getProfileParentId(mInjector.userHandleGetCallingUserId());