Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9f7796a authored by Alex Johnston's avatar Alex Johnston Committed by Android (Google) Code Review
Browse files

Merge "Log metric when generateKeyPair throws exception" into sc-dev

parents 50545f71 d104aeef
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -5774,6 +5774,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
                if (generationResult != KeyChain.KEY_GEN_SUCCESS) {
                if (generationResult != KeyChain.KEY_GEN_SUCCESS) {
                    Log.e(LOG_TAG, String.format(
                    Log.e(LOG_TAG, String.format(
                            "KeyChain failed to generate a keypair, error %d.", generationResult));
                            "KeyChain failed to generate a keypair, error %d.", generationResult));
                    logGenerateKeyPairFailure(caller, isCredentialManagementApp);
                    switch (generationResult) {
                    switch (generationResult) {
                        case KeyChain.KEY_GEN_STRONGBOX_UNAVAILABLE:
                        case KeyChain.KEY_GEN_STRONGBOX_UNAVAILABLE:
                            throw new ServiceSpecificException(
                            throw new ServiceSpecificException(
@@ -5783,7 +5784,6 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
                            throw new UnsupportedOperationException(
                            throw new UnsupportedOperationException(
                                "Device does not support Device ID attestation.");
                                "Device does not support Device ID attestation.");
                        default:
                        default:
                            logGenerateKeyPairFailure(caller, isCredentialManagementApp);
                            return false;
                            return false;
                    }
                    }
                }
                }