Merge "Correct when usage entry information is updated" into oc-mr1-dev
am: 8309922a89
Change-Id: Id8c65a1897ecf3206c5c1a7b6f06cd0d44a38a4f
This commit is contained in:
@@ -887,8 +887,11 @@ CdmResponseType CdmSession::UpdateUsageEntryInformation() {
|
|||||||
if (usage_support_type_ != kUsageEntrySupport ||
|
if (usage_support_type_ != kUsageEntrySupport ||
|
||||||
!has_provider_session_token() ||
|
!has_provider_session_token() ||
|
||||||
usage_table_header_ == nullptr) {
|
usage_table_header_ == nullptr) {
|
||||||
LOGE("CdmSession::UpdateUsageEntryInformation: Unexpected usage type "
|
LOGE("CdmSession::UpdateUsageEntryInformation: Unexpected state, "
|
||||||
"supported: %d", usage_support_type_);
|
"usage support type: %d, PST present: %s, usage table header available"
|
||||||
|
": %s", usage_support_type_,
|
||||||
|
has_provider_session_token() ? "yes" : "no",
|
||||||
|
usage_table_header_ == nullptr ? "no" : "yes");
|
||||||
return INCORRECT_USAGE_SUPPORT_TYPE_2;
|
return INCORRECT_USAGE_SUPPORT_TYPE_2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -349,7 +349,8 @@ CdmResponseType CdmLicense::PrepareKeyUpdateRequest(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO(rfrias): Refactor to avoid needing to call CdmSession
|
// TODO(rfrias): Refactor to avoid needing to call CdmSession
|
||||||
if (cdm_session) {
|
if (cdm_session &&
|
||||||
|
cdm_session->get_usage_support_type() == kUsageEntrySupport) {
|
||||||
CdmResponseType status = cdm_session->UpdateUsageEntryInformation();
|
CdmResponseType status = cdm_session->UpdateUsageEntryInformation();
|
||||||
if (NO_ERROR != status) return status;
|
if (NO_ERROR != status) return status;
|
||||||
}
|
}
|
||||||
@@ -671,7 +672,8 @@ bool CdmLicense::RestoreOfflineLicense(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!provider_session_token_.empty()) {
|
if (!provider_session_token_.empty()) {
|
||||||
if (cdm_session) {
|
if (cdm_session &&
|
||||||
|
cdm_session->get_usage_support_type() == kUsageEntrySupport) {
|
||||||
CdmResponseType status = cdm_session->UpdateUsageEntryInformation();
|
CdmResponseType status = cdm_session->UpdateUsageEntryInformation();
|
||||||
if (NO_ERROR != status) return false;
|
if (NO_ERROR != status) return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user