Merge "Don't re-wrap DeviceIdAttestationExceptions" am: 27bc799e7e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1698089 Change-Id: Iee544cafa0cba275bb151cd99b431af00389ffb6
This commit is contained in:
@ -293,6 +293,11 @@ public abstract class AttestationUtils {
|
|||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (Exception 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);
|
throw new DeviceIdAttestationException("Unable to perform attestation", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user