Merge "Don't re-wrap DeviceIdAttestationExceptions" am: 27bc799e7e am: 02359c00d6 am: 85d779c4a4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1698089 Change-Id: I9aefcc9b3b93a37437885d7e6fb1a8d9734b3dd1
This commit is contained in:
commit
7ac158fda8
@ -260,6 +260,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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user