Only one function for reporting usage support.
[ Merge of http://go/wvgerrit/121567 ] Replaced the two usage support functions GetUsageSupportType() and UsageInformationSupport() into a single function HasUsageInfoSupport(). Since moving to only supporting a single usage info system (usage table header + usage entries), the different usage support functions have lost their purpose. One version of the method works on an open session and will use a cached value of the property if previously set. The other can be called without opening the session (as used for query calls). This is part of larger fix for the usage table initialization process. Bug: 169195093 Test: CE CDM unit tests Change-Id: I637c24dd143e995dbb0f8848850e3c71ff1018eb
This commit is contained in:
@@ -437,9 +437,8 @@ CdmResponseType CdmLicense::PrepareKeyUpdateRequest(
|
||||
}
|
||||
|
||||
// TODO(rfrias): Refactor to avoid needing to call CdmSession
|
||||
if (cdm_session &&
|
||||
cdm_session->get_usage_support_type() == kUsageEntrySupport) {
|
||||
CdmResponseType status = cdm_session->UpdateUsageEntryInformation();
|
||||
if (cdm_session && cdm_session->supports_usage_info()) {
|
||||
const CdmResponseType status = cdm_session->UpdateUsageEntryInformation();
|
||||
if (NO_ERROR != status) return status;
|
||||
}
|
||||
|
||||
@@ -843,9 +842,8 @@ CdmResponseType CdmLicense::RestoreOfflineLicense(
|
||||
}
|
||||
|
||||
if (!provider_session_token_.empty()) {
|
||||
if (cdm_session &&
|
||||
cdm_session->get_usage_support_type() == kUsageEntrySupport) {
|
||||
CdmResponseType status = cdm_session->UpdateUsageEntryInformation();
|
||||
if (cdm_session && cdm_session->supports_usage_info()) {
|
||||
const CdmResponseType status = cdm_session->UpdateUsageEntryInformation();
|
||||
if (NO_ERROR != status) return sts;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user