Allow offline release retries

A bug prevented regenerating license release requests. This has
been corrected. A crash due to a formatting error has been addressed.
Clean up of logging and additional logging for open session failures
have been included.

b/16197822

Merge of https://widevine-internal-review.googlesource.com/#/c/10806
from the widevine cdm repo.

Change-Id: I854ead388f311d00b1cd700dfa1b2f58322c2dd4
This commit is contained in:
Rahul Frias
2014-07-27 19:41:09 -07:00
parent e894774942
commit 9f52cd3724
6 changed files with 70 additions and 15 deletions

View File

@@ -143,8 +143,12 @@ CdmResponseType CdmSession::RestoreOfflineSession(
return UNKNOWN_ERROR;
}
if (license_state != DeviceFiles::kLicenseStateActive) {
LOGE("CdmSession::Init invalid offline license state = %s", license_state);
// Do not restore a released offline license, unless a release retry
if (!(license_type == kLicenseTypeRelease ||
license_state == DeviceFiles::kLicenseStateActive)) {
LOGE("CdmSession::Init invalid offline license state = %d, type = %d",
license_state,
license_type);
return UNKNOWN_ERROR;
}