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:
@@ -9,6 +9,7 @@
|
||||
#include "clock.h"
|
||||
#include "log.h"
|
||||
#include "policy_timers_v15.h"
|
||||
#include "policy_timers_v16.h"
|
||||
#include "properties.h"
|
||||
#include "string_conversions.h"
|
||||
#include "wv_cdm_constants.h"
|
||||
@@ -157,7 +158,9 @@ void PolicyEngine::OnTimerEvent() {
|
||||
}
|
||||
}
|
||||
|
||||
void PolicyEngine::SetLicense(const License& license) {
|
||||
void PolicyEngine::SetLicense(const License& license,
|
||||
bool supports_core_messages) {
|
||||
if (supports_core_messages) policy_timers_.reset(new PolicyTimersV16());
|
||||
license_id_.CopyFrom(license.id());
|
||||
license_keys_->SetFromLicense(license);
|
||||
policy_timers_->SetLicense(license);
|
||||
@@ -169,7 +172,9 @@ void PolicyEngine::SetEntitledLicenseKeys(
|
||||
license_keys_->SetEntitledKeys(entitled_keys);
|
||||
}
|
||||
|
||||
void PolicyEngine::SetLicenseForRelease(const License& license) {
|
||||
void PolicyEngine::SetLicenseForRelease(const License& license,
|
||||
bool supports_core_messages) {
|
||||
if (supports_core_messages) policy_timers_.reset(new PolicyTimersV16());
|
||||
license_id_.CopyFrom(license.id());
|
||||
|
||||
// Expire any old keys.
|
||||
|
||||
Reference in New Issue
Block a user