Add policy handling for v16

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

This allows for handling of timer and clock values as supported when both
the license service and the OEMCrypto on the device support v16.
A flag based on a value in the SignedResponse license indicates
whether this support should be enabled. A new class PolicyTimerV16
performs the duration value evaluation.

Bug: 139372190
Test: Android WV unit/integration tests
Change-Id: Iacbbd51ad26c9f29cb5418ff832f8822982644b7
This commit is contained in:
Rahul Frias
2020-02-13 02:43:56 -08:00
parent 68587be8a0
commit c033892f2a
12 changed files with 1961 additions and 178 deletions

View File

@@ -58,7 +58,8 @@ class PolicyEngine {
// an exact copy of the policy information stored in the license.
// The license state transitions to kLicenseStateCanPlay if the license
// permits playback.
virtual void SetLicense(const video_widevine::License& license);
virtual void SetLicense(const video_widevine::License& license,
bool supports_core_messages);
// Used to update the currently loaded entitled content keys.
virtual void SetEntitledLicenseKeys(
@@ -66,7 +67,8 @@ class PolicyEngine {
// SetLicenseForRelease is used when releasing a license. The keys in this
// license will be ignored, and any old keys will be expired.
virtual void SetLicenseForRelease(const video_widevine::License& license);
virtual void SetLicenseForRelease(const video_widevine::License& license,
bool supports_core_messages);
// Call this on first decrypt to set the start of playback.
virtual bool BeginDecryption(void);