Delay license state evaluation for offline licenses am: 8543b4c903 am: 9f2363e076

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12646162

Change-Id: I0158e6b1dc2560ff28ff9379533a428f2970efeb
This commit is contained in:
Rahul Frias
2020-09-23 03:03:08 +00:00
committed by Automerger Merge Worker
7 changed files with 248 additions and 171 deletions

View File

@@ -593,7 +593,8 @@ CdmResponseType CdmSession::AddKeyInternal(const CdmKeyResponse& key_response) {
if (sts != NO_ERROR) return sts;
}
}
sts = license_parser_->HandleKeyResponse(key_response);
sts = license_parser_->HandleKeyResponse(/* is restore */ false,
key_response);
// Update the license sdk and service versions.
const VersionInfo& version_info = license_parser_->GetServiceVersion();
@@ -790,8 +791,9 @@ CdmResponseType CdmSession::RenewKey(const CdmKeyResponse& key_response) {
LOGE("CDM session not initialized");
return NOT_INITIALIZED_ERROR;
}
CdmResponseType sts =
license_parser_->HandleKeyUpdateResponse(true, key_response);
CdmResponseType sts = license_parser_->HandleKeyUpdateResponse(
/* is renewal */ true,
/* is restore */ false, key_response);
// Record the timing on success.
UpdateRequestLatencyTiming(sts);
@@ -855,8 +857,9 @@ CdmResponseType CdmSession::ReleaseKey(const CdmKeyResponse& key_response) {
LOGE("CDM session not initialized");
return NOT_INITIALIZED_ERROR;
}
CdmResponseType sts =
license_parser_->HandleKeyUpdateResponse(false, key_response);
CdmResponseType sts = license_parser_->HandleKeyUpdateResponse(
/* is renewal */ false,
/* is restore */ false, key_response);
// Record the timing on success.
UpdateRequestLatencyTiming(sts);