Remove enforceCallerCanRequestDeviceIdAttestation()
As enforceCallerCanRequestDeviceIdAttestation() only triggers a precondition checkCallAuthorisation on hasDeviceIdAccessUnchecked(), it can be removed and replaced with the precondition check itself. DPMtests that test enforeCallerCanRequestDeviceIdAttestation are modified to test hasDeviceIdAccessUnchecked().
Fixes: 243629377
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Test: atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testKeyManagement
Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegatedCertInstallerDirectly
Test: atest android.admin.cts.DevicePolicyManagerTest
Change-Id: I0e387a501185320266e699275a85e81892c77484
2 files changed