Address request license test failures

[ Merge of http://go/wvgerrit/81743 and http://go/ag/7747989 ]

This fixes some failures in tests. A platform property has been added
which controls whether an offline license can be restored if a release
request has been previously made. This behaviour was introduced by
CE CDM in b/113167010 but is not permitted for android.

The tests failures addressed are
* ProvisioningTestWithServiceCertificate
* ReleaseRetryOfflineKeyTest
* ReleaseRetryL3OfflineKeyTest
* ReleaseRetryL3OfflineKeySessionUsageDisable

Bug: 119428680
Bug: 133684744
Test: WV unit/integration tests
Change-Id: I5beacecea32f26c8a319a6d73a45cc36f04d8aa1
This commit is contained in:
Rahul Frias
2019-05-27 02:46:47 -07:00
parent 435f839f7e
commit 57f2a7fe31
6 changed files with 17 additions and 30 deletions

View File

@@ -243,8 +243,10 @@ CdmResponseType CdmSession::RestoreOfflineSession(const CdmKeySetId& key_set_id,
// Attempts to restore a released offline license are treated as a release
// retry.
if (license_state == DeviceFiles::kLicenseStateReleasing) {
license_type = kLicenseTypeRelease;
if (Properties::allow_restore_of_offline_licenses_with_release()) {
if (license_state == DeviceFiles::kLicenseStateReleasing) {
license_type = kLicenseTypeRelease;
}
}
// Only restore offline licenses if they are active or this is a release

View File

@@ -20,6 +20,7 @@ bool Properties::oem_crypto_use_userspace_buffers_;
bool Properties::provisioning_messages_are_binary_;
bool Properties::allow_service_certificate_requests_;
bool Properties::device_files_is_a_real_filesystem_;
bool Properties::allow_restore_of_offline_licenses_with_release_;
std::unique_ptr<CdmClientPropertySetMap> Properties::session_property_set_;
bool Properties::AddSessionPropertySet(const CdmSessionId& session_id,