Update support for HDCP levels on Android and CE CDM.

[ Merge of http://go/wvgerrit/194050 ]

OEMCrypto v17 introduced higher granularity in the device's HDCP V1
levels.  Previously, all HDCP v1.x were group together.  The change
was aimed towards server policy enforcement, not device enforcement.

Core code was updated, and could then be reflected in license
requests; however, reporting the new v1.x subversions was never
exposed to the higher app layers.

It is likely that devices which attempted to use specific 1.x versions
encountered test failures (for both CE CDM and Android CDM) as neither
implementations could handle such versions when communicating with
the app.

This change updates both CE CDM and Android CDM:
1) The CE CDM now uses the same subversion version comparisons as
   performed by the core code.
2) The Android CDM will now recognize new HDCP levels, and not return
   unexpected values.

Bug: 329155501
Test: run_x86_64_tests
Test: request_license_test on Oriole
Change-Id: I61fc0f11808f594456bd00210fd9b2bb5ed16c0e
This commit is contained in:
Alex Dale
2024-03-13 14:48:45 -07:00
parent 5c175ad151
commit 67393a2cb6
4 changed files with 35 additions and 28 deletions

View File

@@ -134,7 +134,12 @@ KeyStatusType ConvertFromCdmKeyStatus(CdmKeyStatus keyStatus) {
}
HdcpLevel mapHdcpLevel(const std::string& level) {
if (level == wvcdm::QUERY_VALUE_HDCP_V1)
if (level == wvcdm::QUERY_VALUE_HDCP_V1_X ||
level == wvcdm::QUERY_VALUE_HDCP_V1_0 ||
level == wvcdm::QUERY_VALUE_HDCP_V1_1 ||
level == wvcdm::QUERY_VALUE_HDCP_V1_2 ||
level == wvcdm::QUERY_VALUE_HDCP_V1_3 ||
level == wvcdm::QUERY_VALUE_HDCP_V1_4)
return HdcpLevel::HDCP_V1;
else if (level == wvcdm::QUERY_VALUE_HDCP_V2_0)
return HdcpLevel::HDCP_V2;