Add DPM.getKeyPairGrants()

The method returns names of the packages that have access
to the key grouped by UID since grants are stored on per-uid
basis. This is expressed as Set<Set<String>>

Since Binder currently doesn't support sets or lists of lists,
this data structure is flattened into a list of strings, with
null values used as a delimiter.

Bug: 160457441
Test: atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testKeyManagement
Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegatedCertInstallerDirectly
Test: atest android.admin.cts.DevicePolicyManagerTest
Change-Id: Ieee1048b145fb8400eccbf32c054afc64b5d90c0
6 files changed