Allows DPM.generateKeyPair() to be called from PO of affiliated user.
If the key is used by device attestation, it can only be used by the
user that generated it, as it's not parcelable. Hence, on devices
running with Headless System User Mode (HSUM), the key must be
generated by the "real" user's PO, not the DO (which runs on system
user).
Test: atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testDelegatedCertInstallerDeviceIdAttestation # on phone
Test: manual verification with TestDpc on automotive
Bug: 213388897
Change-Id: I58623f5c1a1d60af7743f5a815a491ebbad9b9fe
2 files changed