Source release 19.4.0

This commit is contained in:
Vicky Min
2024-11-27 00:07:23 +00:00
parent 11c108a8da
commit 22759672a8
72 changed files with 5321 additions and 2622 deletions

View File

@@ -19,6 +19,7 @@
#include "license_holder.h"
#include "log.h"
#include "oec_device_features.h"
#include "properties.h"
#include "provisioning_holder.h"
#include "test_base.h"
#include "test_printers.h"
@@ -193,13 +194,24 @@ TEST_F(CorePIGTest, LicenseRelease1) {
ASSERT_NO_FATAL_FAILURE(holder.FetchLicense());
ASSERT_NO_FATAL_FAILURE(holder.LoadLicense());
EXPECT_EQ(NO_ERROR, holder.Decrypt(key_id));
// For Android where AlwaysUseKeySetIds() is false, the CDM engine generates
// a session separately. Thus, we close the session and only for CE CDM reopen
// it for the license release.
ASSERT_NO_FATAL_FAILURE(holder.CloseSession());
if (Properties::AlwaysUseKeySetIds()) {
ASSERT_NO_FATAL_FAILURE(holder.OpenSession());
ASSERT_NO_FATAL_FAILURE(holder.ReloadLicense());
}
ASSERT_NO_FATAL_FAILURE(holder.GenerateAndPostReleaseRequest(
"CDM_UnlimitedStreaming_can_persist"));
EXPECT_NE(NO_ERROR, holder.Decrypt(key_id));
ASSERT_NO_FATAL_FAILURE(holder.FetchRelease());
ASSERT_NO_FATAL_FAILURE(holder.LoadRelease());
EXPECT_NE(NO_ERROR, holder.Decrypt(key_id));
ASSERT_NO_FATAL_FAILURE(holder.CloseSession());
// For CE CDM, we can close the session after we have gotten the release.
if (Properties::AlwaysUseKeySetIds()) {
ASSERT_NO_FATAL_FAILURE(holder.CloseSession());
}
}
/**
@@ -219,11 +231,22 @@ TEST_F(CorePIGTest, LicenseRelease2) {
ASSERT_NO_FATAL_FAILURE(holder.FetchLicense());
ASSERT_NO_FATAL_FAILURE(holder.LoadLicense());
wvutil::TestSleep::Sleep(10);
// For Android where AlwaysUseKeySetIds() is false, the CDM engine generates
// a session separately. Thus, we close the session and only for CE CDM reopen
// it for the license release.
ASSERT_NO_FATAL_FAILURE(holder.CloseSession());
if (Properties::AlwaysUseKeySetIds()) {
ASSERT_NO_FATAL_FAILURE(holder.OpenSession());
ASSERT_NO_FATAL_FAILURE(holder.ReloadLicense());
}
ASSERT_NO_FATAL_FAILURE(holder.GenerateAndPostReleaseRequest(
"CDM_UnlimitedStreaming_can_persist"));
ASSERT_NO_FATAL_FAILURE(holder.FetchRelease());
ASSERT_NO_FATAL_FAILURE(holder.LoadRelease());
ASSERT_NO_FATAL_FAILURE(holder.CloseSession());
// For CE CDM, we can close the session after we have gotten the release.
if (Properties::AlwaysUseKeySetIds()) {
ASSERT_NO_FATAL_FAILURE(holder.CloseSession());
}
}
TEST_F(CorePIGTest, CastReceiverProvisioningUsingCdm) {