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:
@@ -160,8 +160,8 @@ class CdmSession {
|
||||
license_parser_->provider_session_token().size() > 0);
|
||||
}
|
||||
|
||||
virtual CdmUsageSupportType get_usage_support_type() {
|
||||
return usage_support_type_;
|
||||
virtual bool supports_usage_info() const {
|
||||
return usage_table_header_ != nullptr;
|
||||
}
|
||||
|
||||
// This method will remove keys by resetting crypto resources and
|
||||
@@ -297,8 +297,9 @@ class CdmSession {
|
||||
// Usage related flags and data
|
||||
bool is_initial_usage_update_;
|
||||
bool is_usage_update_needed_;
|
||||
CdmUsageSupportType usage_support_type_;
|
||||
UsageTableHeader* usage_table_header_;
|
||||
// Only assign |usage_table_header_| if capable of supporting usage
|
||||
// information.
|
||||
UsageTableHeader* usage_table_header_ = nullptr;
|
||||
uint32_t usage_entry_number_;
|
||||
CdmUsageEntry usage_entry_;
|
||||
std::string usage_provider_session_token_;
|
||||
|
||||
Reference in New Issue
Block a user