diff options
| author | 2021-05-06 17:09:56 +0000 | |
|---|---|---|
| committer | 2021-05-06 17:09:56 +0000 | |
| commit | 27bc799e7ea61ba90bc50562d5054bd2864526f7 (patch) | |
| tree | f766fbb04a489ed15d1cd06a1dde3a0aed4510ba | |
| parent | 44da0f67b43f9c39dbdd5bbdced8ccb0861b1229 (diff) | |
| parent | c73fe01f1607fb4b1f9afb98fc46960623fef483 (diff) | |
Merge "Don't re-wrap DeviceIdAttestationExceptions"
| -rw-r--r-- | keystore/java/android/security/keystore/AttestationUtils.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/keystore/java/android/security/keystore/AttestationUtils.java b/keystore/java/android/security/keystore/AttestationUtils.java index be865a02a945..3980d3a0203b 100644 --- a/keystore/java/android/security/keystore/AttestationUtils.java +++ b/keystore/java/android/security/keystore/AttestationUtils.java @@ -293,6 +293,11 @@ public abstract class AttestationUtils { } catch (SecurityException e) { throw e; } catch (Exception e) { + // If a DeviceIdAttestationException was previously wrapped with some other type, + // let's throw the original exception instead of wrapping it yet again. + if (e.getCause() instanceof DeviceIdAttestationException) { + throw (DeviceIdAttestationException) e.getCause(); + } throw new DeviceIdAttestationException("Unable to perform attestation", e); } } |