Add MediaDrm property to allow test keybox

Merge from Widevine repo of http://go/wvgerrit/142150 (part 1)

For an EVT device, without a keybox or with a test keybox, we want it
to fall back to L3. However, when running the unit or integration
tests it should continue running tests with test keybox. This will
allow us to test L1 oemcrypto on an EVT device, while still using an
EVT device for dogfooding video content at the L3 level.

The original CL modified the HIDL and non-HIDL plugin, so this is the
hand cherry-pick.

Bug: 210807585
Change-Id: I85b96f127abe30f8f061b242f7580fa8f6c01776
This commit is contained in:
Fred Gylys-Colwell
2021-12-19 20:00:25 +00:00
parent d808ae18b6
commit 04e1d8efbc
3 changed files with 23 additions and 0 deletions

View File

@@ -1443,6 +1443,18 @@ Return<Status> WVDrmPlugin::setPropertyString(const hidl_string& propertyName,
}
CdmResponseType res = mCDM->SetDebugIgnoreKeyboxCount(count);
return mapCdmResponseType(res);
} else if (name == "allowTestKeybox") {
bool allow;
if (_value == kEnable) {
allow = true;
} else if (_value == kDisable) {
allow = false;
} else {
ALOGE("App requested unknown allowTestKeybox %s", _value.c_str());
return Status::BAD_VALUE;
}
CdmResponseType res = mCDM->SetAllowTestKeybox(allow);
return mapCdmResponseType(res);
} else if (name == "decryptHash") {
wvcdm::CdmSessionId sessionId;
CdmResponseType res =