DO NOT MERGE Handle unlimited usage table capacity.
[ Merge of http://go/wvgerrit/103684 ] [ Cherry pick of http://ag/12221244 ] The OEMCrypto method for usage table capacity can return zero to indicate that the usage table size is not explicitly limited. The CDM must handle this case with regard to the CDM's usage table management and information querying. The usage table initialization tests are extended to include cases where the table does not have a defined limit. AddEntry() was missing call to update the usage table header after creating a new usage entry. This call is now included and required additional changes to the usage table unit tests. Bug: 160560364 Test: Android unit tests Change-Id: Ica5d181092d2938d24deba5005a211ca883cb0f0
This commit is contained in:
@@ -93,6 +93,10 @@ class UsageTableHeader {
|
||||
|
||||
size_t potential_table_capacity() const { return potential_table_capacity_; }
|
||||
|
||||
bool HasUnlimitedTableCapacity() const {
|
||||
return potential_table_capacity_ == 0;
|
||||
}
|
||||
|
||||
// Returns the number of entries currently tracked by the CDM that
|
||||
// are related to usage info (streaming licenses).
|
||||
size_t UsageInfoCount() const;
|
||||
|
||||
Reference in New Issue
Block a user