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
This commit is contained in:
Rahul Frias
2015-06-26 14:16:40 -07:00
parent 53d9ade2ef
commit 6e2cc1a3ed

View File

@@ -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;