OEMCrypto v16.1
Merge of http://go/wvgerrit/93404 This CL updates the Widevine CDM to support OEMCrypto v16.1 Test: Tested in 16.2 CL Bug: 141247171 Change-Id: I69bd993500f6fb63bf6010c8b0250dc7acc3d71b
This commit is contained in:
@@ -894,18 +894,11 @@ CdmResponseType CdmSession::StoreLicense() {
|
||||
usage_entry_number_)) {
|
||||
LOGE("Unable to store usage info");
|
||||
// Usage info file is corrupt. Delete current usage entry and file.
|
||||
switch (usage_support_type_) {
|
||||
case kUsageEntrySupport:
|
||||
DeleteUsageEntry(usage_entry_number_);
|
||||
break;
|
||||
case kUsageTableSupport:
|
||||
crypto_session_->DeleteUsageInformation(provider_session_token);
|
||||
crypto_session_->UpdateUsageInformation();
|
||||
break;
|
||||
default:
|
||||
LOGW("Unexpected usage support type: %d",
|
||||
static_cast<int>(usage_support_type_));
|
||||
break;
|
||||
if (usage_support_type_ == kUsageEntrySupport) {
|
||||
DeleteUsageEntry(usage_entry_number_);
|
||||
} else {
|
||||
LOGW("Unexpected usage support type: %d",
|
||||
static_cast<int>(usage_support_type_));
|
||||
}
|
||||
std::vector<std::string> provider_session_tokens;
|
||||
file_handle_->DeleteAllUsageInfoForApp(
|
||||
@@ -1006,41 +999,6 @@ void CdmSession::GetApplicationId(std::string* app_id) {
|
||||
}
|
||||
}
|
||||
|
||||
CdmResponseType CdmSession::DeleteMultipleUsageInformation(
|
||||
const std::vector<std::string>& provider_session_tokens) {
|
||||
CdmUsageSupportType usage_support_type;
|
||||
CdmResponseType sts =
|
||||
crypto_session_->GetUsageSupportType(&usage_support_type);
|
||||
if (sts == NO_ERROR && usage_support_type == kUsageTableSupport) {
|
||||
for (size_t i = 0; i < provider_session_tokens.size(); ++i) {
|
||||
crypto_session_->DeactivateUsageInformation(provider_session_tokens[i]);
|
||||
UpdateUsageTableInformation();
|
||||
}
|
||||
}
|
||||
|
||||
if (sts == NO_ERROR) {
|
||||
sts = crypto_session_->DeleteMultipleUsageInformation(
|
||||
provider_session_tokens);
|
||||
crypto_metrics_->crypto_session_delete_multiple_usage_information_
|
||||
.Increment(sts);
|
||||
}
|
||||
return sts;
|
||||
}
|
||||
|
||||
CdmResponseType CdmSession::UpdateUsageTableInformation() {
|
||||
CdmUsageSupportType usage_support_type;
|
||||
CdmResponseType sts =
|
||||
crypto_session_->GetUsageSupportType(&usage_support_type);
|
||||
|
||||
if (sts == NO_ERROR && usage_support_type == kUsageTableSupport) {
|
||||
M_TIME(sts = crypto_session_->UpdateUsageInformation(), crypto_metrics_,
|
||||
crypto_session_update_usage_information_, sts);
|
||||
return sts;
|
||||
}
|
||||
|
||||
return NO_ERROR; // Ignore
|
||||
}
|
||||
|
||||
CdmResponseType CdmSession::UpdateUsageEntryInformation() {
|
||||
if (usage_support_type_ != kUsageEntrySupport ||
|
||||
!has_provider_session_token() || usage_table_header_ == nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user