Fixes for query information and usage reporting

* The Usage APIs return usage reports from either L1 or L3 (if available).
* Correction to when usage reports are saved. In addition to other events
  they are now saved when keys are loaded, usage reports are released and soon
  after first decryption and periodically (60 seconds) after that,
  if decryption takes place.
* Usage reports now get deleted on an unprovision request.
* Policy timer is now started when offline licenses are restored.
* Usage session is now released, when a usage response is received.
* Usage tests ahev been enabled.
* Added CDM extended duration (integration) tests to test usage reporting
  and querying. These need to be run manually as they take a while (currently
  half an hour).

b/15592374

[ Merge of https://widevine-internal-review.googlesource.com/#/c/10800
  from the Widevine CDM repo ]

Change-Id: Ia817e03ebbe880e08ba7b4a235ecb82b3ff35fbf
This commit is contained in:
Rahul Frias
2014-08-07 10:45:11 -07:00
parent b608e17e08
commit 4819a26bd4
18 changed files with 1824 additions and 62 deletions

View File

@@ -88,8 +88,10 @@ class CdmSession {
virtual CdmResponseType UpdateUsageInformation();
virtual bool is_initial_usage_update() { return is_initial_usage_update_; }
virtual bool is_usage_update_needed() { return is_usage_update_needed_; }
virtual void reset_is_usage_update_needed() {
virtual void reset_usage_flags() {
is_initial_usage_update_ = false;
is_usage_update_needed_ = false;
}
@@ -117,10 +119,13 @@ class CdmSession {
bool license_received_;
bool is_offline_;
bool is_release_;
bool is_usage_update_needed_;
CdmSecurityLevel security_level_;
// decryption and usage flags
bool is_initial_decryption_;
bool has_decrypted_recently_;
CdmSecurityLevel security_level_;
bool is_initial_usage_update_;
bool is_usage_update_needed_;
// information useful for offline and usage scenarios
CdmKeyMessage key_request_;