Merge "Added metrics for production readiness." into tm-dev am: 8ac7ca3f46 am: b3bc24aaf1

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/18304422

Change-Id: I1598e1e56e4ace0d19c82cd6fa5edf0d21d28a1a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Alex Dale
2022-05-12 23:49:21 +00:00
committed by Automerger Merge Worker
5 changed files with 12 additions and 1 deletions

View File

@@ -2363,6 +2363,7 @@ bool CryptoSession::GetProductionReadiness(
const OEMCryptoResult result = WithOecReadLock("GetProductionReadiness", [&] {
return OEMCrypto_ProductionReady(security_level);
});
metrics_->oemcrypto_production_readiness_.Record(result);
switch (result) {
case OEMCrypto_SUCCESS:
*readiness = kProductionReadinessTrue;
@@ -2372,6 +2373,9 @@ bool CryptoSession::GetProductionReadiness(
break;
case OEMCrypto_ERROR_UNKNOWN_FAILURE:
default: // Other vendor-defined codes indicate not production ready.
LOGD("Not production ready: security_level = %s, result = %d",
RequestedSecurityLevelToString(security_level),
static_cast<int>(result));
*readiness = kProductionReadinessFalse;
break;
}