Trim unnecessary CDM metrics.
Bug: 35269103 Test: Removing unnecessary code. Existing tests pass. Change-Id: I1ba8572a8b3fabbf707e77b366717c9ba3069ace
This commit is contained in:
@@ -553,13 +553,7 @@ CdmResponseType CdmSession::Decrypt(const CdmDecryptionParameters& params) {
|
||||
return policy_engine_->IsLicenseForFuture() ? DECRYPT_NOT_READY : NEED_KEY;
|
||||
}
|
||||
|
||||
CdmResponseType status;
|
||||
|
||||
M_TIME(
|
||||
status = crypto_session_->Decrypt(
|
||||
params),
|
||||
&metrics_, crypto_session_decrypt_,
|
||||
status);
|
||||
CdmResponseType status = crypto_session_->Decrypt(params);
|
||||
|
||||
if (status == NO_ERROR) {
|
||||
if (is_initial_decryption_) {
|
||||
@@ -659,11 +653,7 @@ CdmResponseType CdmSession::ReleaseKey(const CdmKeyResponse& key_response) {
|
||||
// Deletion of usage entry cannot occur while in use by a crypto session.
|
||||
// So close and reopen after deletion.
|
||||
if (usage_support_type_ == kUsageEntrySupport) {
|
||||
M_TIME(
|
||||
crypto_session_->Close(),
|
||||
&metrics_,
|
||||
crypto_session_close_);
|
||||
|
||||
crypto_session_->Close();
|
||||
CdmResponseType sts = usage_table_header_->DeleteEntry(usage_entry_number_);
|
||||
if (sts != NO_ERROR) return sts;
|
||||
|
||||
@@ -714,17 +704,7 @@ bool CdmSession::GenerateKeySetId(CdmKeySetId* key_set_id) {
|
||||
(kKeySetIdLength - sizeof(KEY_SET_ID_PREFIX)) / 2, 0);
|
||||
|
||||
while (key_set_id->empty()) {
|
||||
bool sts;
|
||||
M_TIME(
|
||||
sts = crypto_session_->GetRandom(
|
||||
random_data.size(),
|
||||
&random_data[0]),
|
||||
&metrics_,
|
||||
crypto_session_get_random_,
|
||||
sts,
|
||||
metrics::Pow2Bucket(random_data.size()));
|
||||
|
||||
if (!sts) {
|
||||
if (!crypto_session_->GetRandom(random_data.size(), &random_data[0])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -795,11 +775,7 @@ bool CdmSession::StoreLicense(DeviceFiles::LicenseState state) {
|
||||
}
|
||||
|
||||
CdmResponseType CdmSession::ReleaseCrypto() {
|
||||
M_TIME(
|
||||
crypto_session_->Close(),
|
||||
&metrics_,
|
||||
crypto_session_close_);
|
||||
|
||||
crypto_session_->Close();
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user