Add Oemcrypto build information to metrics.

Import from http://go/wvgerrit/68385

Adds the build information returned from OEMCrypto_BuildInformation()
to the CDM session metrics.

Bug: 117117555
Test: Unit tests. GPlay manual. GTS Tests.
Change-Id: I505c46fec61a7c62538f843185ec0358f860da79
This commit is contained in:
Adam Stone
2018-12-12 16:40:41 -08:00
parent 0a64d25067
commit 27e26110b4
6 changed files with 19 additions and 3 deletions

View File

@@ -98,6 +98,12 @@ CdmResponseType CdmSession::Init(CdmClientPropertySet* cdm_client_property_set,
security_level_ = crypto_session_->GetSecurityLevel();
crypto_metrics_->crypto_session_security_level_.Record(security_level_);
std::string oemcrypto_build;
if(crypto_session_->GetBuildInformation(&oemcrypto_build)) {
metrics_->oemcrypto_build_info_.Record(oemcrypto_build);
} else {
metrics_->oemcrypto_build_info_.SetError(false);
}
if (!file_handle_->Init(security_level_)) {
LOGE("CdmSession::Init: Unable to initialize file handle");