Allow offline licenses to be loaded and restored in the same session am: 79eabb0989
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12309365 Change-Id: I04f37e6440e7f09ed40df3c3d65cd3ff3f31b83f
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
|
||||
// led us to add a test to support this use case as there were multiple
|
||||
// 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");
|
||||
return RESTORE_OFFLINE_LICENSE_ERROR_3;
|
||||
}
|
||||
|
||||
@@ -2709,8 +2709,7 @@ TEST_F(WvCdmRequestLicenseTest, AllowLoadAndRestoreOfflineKeyTest) {
|
||||
GenerateKeyRequest(key_id, kLicenseTypeOffline);
|
||||
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_);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user