CredentialStorage: Install keys using KeyChain
This is part of the work to unify the manual certificate
installation flow (via "Install from storage" in the Settings
app) with the programmatic one (using
DevicePolicyManager.installKeyPair).
The change to CredentialStorage is the crux of this work, where
the key is no longer installed by calling Keystore directly.
Instead, a new AsyncTask, InstallKeyInKeyChain, was created, which
calls KeyChainService.installKeyPair with the key data and associated
certificates (as well as the UID of the designated service, to allow
installation into the WiFi Keystore).
Once that task completes, if the key was installed successfully,
then it is marked as user-selectable.
Test: Manual CtsVerifier tests: KeyChain Storage Test, CA Cert Notification Test
Test: cts-tradefed run commandAndExit cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.MixedDeviceOwnerTest#testKeyManagement
Bug:
138375478
Change-Id: I7c4b4ea725a34307f58d27252c2958771001636f