Snap for 8397960 from b3a5a656af to tm-release

Change-Id: I32f78328df2514046d1e6009055701cfdff8113a
This commit is contained in:
Android Build Coastguard Worker
2022-04-02 03:21:11 +00:00

View File

@@ -374,15 +374,18 @@ void CryptoSession::Init() {
void CryptoSession::ReinitializeForTest() {
if (initialized_) {
initialized_ = false;
OEMCryptoResult status = OEMCrypto_Terminate();
const OEMCryptoResult status = OEMCrypto_Terminate();
if (OEMCrypto_SUCCESS != status) {
LOGE("OEMCrypto_Terminate failed: %d", status);
return;
}
initialized_ = false;
// Tables will be reinitialized by tests when needed.
usage_table_header_l1_.reset();
usage_table_header_l3_.reset();
}
// Give up if we cannot initialize at all.
OEMCryptoResult status = OEMCrypto_Initialize();
const OEMCryptoResult status = OEMCrypto_Initialize();
if (OEMCrypto_SUCCESS != status) {
LOGE("OEMCrypto_Initialize failed: %d", status);
return;