Allow offline licenses to be loaded and restored in the same session
[ Merge of http://go/wvgerrit/103243 ] Include review comments from wv gerrit CL. Bug: 161551490 Test: WV unit integration tests, GtsMediaTestCases and WidevineConcurrentDrmCertificatesTest#testConcurrentDrmCertificates, MediaDrmTest#testMultipleLoadKeys on a redfin Change-Id: Ie9b41a2e68b95692f9353578f6955637411d4dfc
This commit is contained in:
@@ -281,7 +281,7 @@ CdmResponseType CdmSession::RestoreOfflineSession(const CdmKeySetId& key_set_id,
|
|||||||
// We need to investigate the conditions that caused an app failure and
|
// We need to investigate the conditions that caused an app failure and
|
||||||
// led us to add a test to support this use case as there were multiple
|
// led us to add a test to support this use case as there were multiple
|
||||||
// related issues.
|
// related issues.
|
||||||
if (!has_license_been_loaded_ && has_license_been_restored_) {
|
if (!has_license_been_loaded_ && has_license_been_restored_) {
|
||||||
LOGE("Disallow multiple offline license restores");
|
LOGE("Disallow multiple offline license restores");
|
||||||
return RESTORE_OFFLINE_LICENSE_ERROR_3;
|
return RESTORE_OFFLINE_LICENSE_ERROR_3;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2709,8 +2709,7 @@ TEST_F(WvCdmRequestLicenseTest, AllowLoadAndRestoreOfflineKeyTest) {
|
|||||||
GenerateKeyRequest(key_id, kLicenseTypeOffline);
|
GenerateKeyRequest(key_id, kLicenseTypeOffline);
|
||||||
VerifyKeyRequestResponse(config_.license_server(), client_auth);
|
VerifyKeyRequestResponse(config_.license_server(), client_auth);
|
||||||
|
|
||||||
CdmKeySetId key_set_id = key_set_id_;
|
EXPECT_EQ(wvcdm::KEY_ADDED, decryptor_->RestoreKey(session_id_, key_set_id_));
|
||||||
EXPECT_EQ(wvcdm::KEY_ADDED, decryptor_->RestoreKey(session_id_, key_set_id));
|
|
||||||
decryptor_->CloseSession(session_id_);
|
decryptor_->CloseSession(session_id_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user