Device Identifiers access: only on organization-owned devices
Deprecate access to device identifiers on non organization-owned
devices.
This is in line with changes to device identifiers access made in
Android Q. Profile owner access to device identifiers on personal
devices was deprecated in Q and is now removed.
However, on an organization-owned device, for asset management
purposes, the profile owner maintains access to device identifiers as
well as the ability to perform device ID attestation.
This is done by adjusting the checkDeviceIdentifierAccess method in the
DevicePolicyManagerService to take into account whether the profile
owner is on organization-owned device.
Bug: 145336515
Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testDeviceOwnerCanGetDeviceIdentifiers
Test: atest com.android.cts.devicepolicy.ManagedProfileTest#testProfileOwnerCanGetDeviceIdentifiers
Change-Id: I13486509b5af7acb4713adf8cb17fa301e647268
2 files changed