Merge "Log metric when generateKeyPair throws exception" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
c9f7796ae6
@@ -5774,6 +5774,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
|
||||
if (generationResult != KeyChain.KEY_GEN_SUCCESS) {
|
||||
Log.e(LOG_TAG, String.format(
|
||||
"KeyChain failed to generate a keypair, error %d.", generationResult));
|
||||
logGenerateKeyPairFailure(caller, isCredentialManagementApp);
|
||||
switch (generationResult) {
|
||||
case KeyChain.KEY_GEN_STRONGBOX_UNAVAILABLE:
|
||||
throw new ServiceSpecificException(
|
||||
@@ -5783,7 +5784,6 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
|
||||
throw new UnsupportedOperationException(
|
||||
"Device does not support Device ID attestation.");
|
||||
default:
|
||||
logGenerateKeyPairFailure(caller, isCredentialManagementApp);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user