Consolidate update usage table calls

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

In OEMCrypto version 13, usage information is updated by calls to
OEMCrypto_UpdateUsageEntry. In previous versions calls were made to
OEMCrypto_UpdateUsageTable instead. Both need to be supported as the
OEMCrypto version may vary by device.

This consolidates calls to OEMCrypto_UpdateUsageTable so that they
can be disabled if OEMCrypto version >= 13. No functional changes other
than disabling by OEMCrypto version were introduced in this section.

Helper routines have been added to device files as well.

Bug: 34327459

Test: WV unit/integration tests
Change-Id: I223b0a947c21b8b7ba3c8f345b0206747eb50984
This commit is contained in:
Rahul Frias
2018-01-04 10:59:05 -08:00
parent 17ccdcf351
commit e34f83cdce
3 changed files with 26 additions and 9 deletions

View File

@@ -96,7 +96,7 @@ class CryptoSession {
// Usage related methods
virtual bool UsageInformationSupport(bool* has_support);
virtual CdmResponseType UpdateUsageInformation();
virtual CdmResponseType UpdateUsageInformation(); // only for OEMCrypto v9-12
virtual CdmResponseType DeactivateUsageInformation(
const std::string& provider_session_token);
virtual CdmResponseType GenerateUsageReport(