Merge "Allow Reloading Partially-Released Licenses"
This commit is contained in:
@@ -60,7 +60,7 @@ class CdmSession {
|
||||
WvCdmEventListener* event_listener);
|
||||
|
||||
virtual CdmResponseType RestoreOfflineSession(
|
||||
const CdmKeySetId& key_set_id, const CdmLicenseType license_type);
|
||||
const CdmKeySetId& key_set_id, CdmLicenseType license_type);
|
||||
virtual CdmResponseType RestoreUsageSession(
|
||||
const DeviceFiles::CdmUsageData& usage_data);
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ CdmResponseType CdmSession::Init(CdmClientPropertySet* cdm_client_property_set,
|
||||
}
|
||||
|
||||
CdmResponseType CdmSession::RestoreOfflineSession(
|
||||
const CdmKeySetId& key_set_id, const CdmLicenseType license_type) {
|
||||
const CdmKeySetId& key_set_id, CdmLicenseType license_type) {
|
||||
if (!initialized_) {
|
||||
LOGE("CdmSession::RestoreOfflineSession: not initialized");
|
||||
return NOT_INITIALIZED_ERROR;
|
||||
@@ -214,7 +214,14 @@ CdmResponseType CdmSession::RestoreOfflineSession(
|
||||
return GET_LICENSE_ERROR;
|
||||
}
|
||||
|
||||
// Do not restore a released offline license, unless a release retry
|
||||
// Attempts to restore a released offline license are treated as a release
|
||||
// retry.
|
||||
if (license_state == DeviceFiles::kLicenseStateReleasing) {
|
||||
license_type = kLicenseTypeRelease;
|
||||
}
|
||||
|
||||
// Only restore offline licenses if they are active or this is a release
|
||||
// retry.
|
||||
if (!(license_type == kLicenseTypeRelease ||
|
||||
license_state == DeviceFiles::kLicenseStateActive)) {
|
||||
LOGE(
|
||||
|
||||
Reference in New Issue
Block a user