From 6e2cc1a3ed53d2fed2ad87edbcda4fac37313fb0 Mon Sep 17 00:00:00 2001 From: Rahul Frias Date: Fri, 26 Jun 2015 14:16:40 -0700 Subject: [PATCH] Avoid multiple deletions of a usage entry [ Merge of http://go/wvgerrit/14900 ] When releasing a license, usage entries were being released twice with both OEMCrypto_DeleteUsageEntry and OEMCrypto_ForceDeleteUsageEntry being called. The second call would always fail because the usage information had already been released. The CdmSession::DeleteLicense methods will now only handles deletion of license metadata and leave deletion of usage entries to the CdmLicense class. b/22097805 Change-Id: Ic55764d5357043d136e7d88583f709a4ceea3e64 --- libwvdrmengine/cdm/core/src/cdm_session.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/libwvdrmengine/cdm/core/src/cdm_session.cpp b/libwvdrmengine/cdm/core/src/cdm_session.cpp index 4d6f5d15..a7c728ca 100644 --- a/libwvdrmengine/cdm/core/src/cdm_session.cpp +++ b/libwvdrmengine/cdm/core/src/cdm_session.cpp @@ -507,12 +507,6 @@ bool CdmSession::DeleteLicense() { if (!is_offline_ && license_parser_->provider_session_token().empty()) return false; - if (!license_parser_->provider_session_token().empty()) { - if (crypto_session_->DeleteUsageInformation( - license_parser_->provider_session_token()) != NO_ERROR) { - LOGE("CdmSession::DeleteLicense: error deleting usage info"); - } - } if (!file_handle_->Reset(security_level_)) { LOGE("CdmSession::DeleteLicense: Unable to initialize device files"); return false;