Fixes for renew on license load
[ Merge of http://go/wvgerrit/173290 ] * Renew timer offset from when license is loaded verifies that the rental duration has not expired and begins decryption. * Renew timer offset from first decrypt bugfix * Feature is enabled based on oemcrypto v18 presence * Renewal logic verifies that |can_renew| is enabled * Unit tests were added to reflect use cases from duration and renewal documentation Bug: 278751387 Test: policy unittests, CdmUseCase tests, wvts tests Change-Id: I3070b3f31b316e150c28ebe38d0440ab1eeb89b9
This commit is contained in:
@@ -119,7 +119,7 @@ class PolicyTimers {
|
||||
// started playing. This takes into account GetHardLicenseExpiryTime.
|
||||
virtual int64_t GetExpiryTime(int64_t current_time,
|
||||
bool ignore_soft_enforce_playback_duration);
|
||||
|
||||
virtual int64_t GetRentalExpiryTime(int64_t current_time);
|
||||
virtual int64_t GetRenewalStartTime() { return renewal_start_time_; }
|
||||
|
||||
// This is the current policy information for this license. This gets updated
|
||||
@@ -139,7 +139,6 @@ class PolicyTimers {
|
||||
|
||||
private:
|
||||
// Gets the clock time that the rental duration or playback will expire.
|
||||
virtual int64_t GetRentalExpiryTime(int64_t current_time);
|
||||
virtual int64_t GetPlaybackExpiryTime(
|
||||
int64_t current_time, bool ignore_soft_enforce_playback_duration);
|
||||
bool HasRentalOrPlaybackDurationExpired(int64_t current_time);
|
||||
|
||||
@@ -47,6 +47,7 @@ class PolicyTimersV18 : public PolicyTimers {
|
||||
// Indicates whether this is an initial license or a renewal
|
||||
bool license_renewal_ = false;
|
||||
bool renew_on_first_decrypt_ = false;
|
||||
bool can_renew_ = false;
|
||||
|
||||
CORE_DISALLOW_COPY_AND_ASSIGN(PolicyTimersV18);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user