Merge "Device ID attestation for Corp-owned Profile Owner: follow-up"
diff --git a/data/etc/privapp-permissions-platform.xml b/data/etc/privapp-permissions-platform.xml
index 163b6b3..9e4ea32 100644
--- a/data/etc/privapp-permissions-platform.xml
+++ b/data/etc/privapp-permissions-platform.xml
@@ -91,7 +91,6 @@
<permission name="android.permission.CONNECTIVITY_INTERNAL"/>
<permission name="android.permission.CRYPT_KEEPER"/>
<permission name="android.permission.DELETE_PACKAGES"/>
- <permission name="android.permission.GRANT_PROFILE_OWNER_DEVICE_IDS_ACCESS"/>
<permission name="android.permission.INSTALL_PACKAGES"/>
<permission name="android.permission.INTERACT_ACROSS_USERS"/>
<permission name="android.permission.MANAGE_DEVICE_ADMINS"/>
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/Owners.java b/services/devicepolicy/java/com/android/server/devicepolicy/Owners.java
index a2bec79..ee1c1df3 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/Owners.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/Owners.java
@@ -969,8 +969,10 @@
if (remoteBugreportHash != null) {
out.attribute(null, ATTR_REMOTE_BUGREPORT_HASH, remoteBugreportHash);
}
- out.attribute(null, ATTR_CAN_ACCESS_DEVICE_IDS,
- String.valueOf(canAccessDeviceIds));
+ if (canAccessDeviceIds) {
+ out.attribute(null, ATTR_CAN_ACCESS_DEVICE_IDS,
+ String.valueOf(canAccessDeviceIds));
+ }
out.endTag(null, tag);
}