Correct when usage entry information is updated

[ Merge of http://go/wvgerrit/33340 ]

Update usage entry information only when usage entries are
supported.

Bug: 65483034

Test: wv unit/integration tests on angler
Test: GTS tests
Test: playback using play movies and netflix

Change-Id: If5a33900a30ce88f97ef46a800817cd4c71d195e
This commit is contained in:
Rahul Frias
2017-09-08 11:21:12 -07:00
parent d355e505c7
commit a40aeec7bf
2 changed files with 9 additions and 4 deletions

View File

@@ -349,7 +349,8 @@ CdmResponseType CdmLicense::PrepareKeyUpdateRequest(
}
// 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();
if (NO_ERROR != status) return status;
}
@@ -671,7 +672,8 @@ bool CdmLicense::RestoreOfflineLicense(
}
if (!provider_session_token_.empty()) {
if (cdm_session) {
if (cdm_session &&
cdm_session->get_usage_support_type() == kUsageEntrySupport) {
CdmResponseType status = cdm_session->UpdateUsageEntryInformation();
if (NO_ERROR != status) return false;
}