Implement isCryptoSchemeSupported in the Widevine drm plugin

Support overloaded isCryptoSchemeSupported method that
accepts a security level parameter

bug:110701831
test: cts media test cases, widevine integration tests, gts media tests

Change-Id: Ia84e40ff8d4f13fc06478e338e3238061e283dac
This commit is contained in:
Jeff Tinker
2019-01-25 22:06:22 -08:00
parent 54104c7a22
commit 8084bd5375
5 changed files with 27 additions and 3 deletions

View File

@@ -35,9 +35,22 @@ Return<bool> WVDrmFactory::isCryptoSchemeSupported_1_2(
const hidl_array<uint8_t, 16>& uuid,
const hidl_string& initDataType,
SecurityLevel level) {
return isWidevineUUID(uuid.data()) &&
isContentTypeSupported(initDataType)
/* TODO: jtinker@ b/117104043 && wvcdm::IsSecurityLevelSupported(level)*/;
if (!isWidevineUUID(uuid.data()) || !isContentTypeSupported(initDataType)) {
return false;
}
if (wvcdm::WvContentDecryptionModule::IsSecurityLevelSupported(
wvcdm::kSecurityLevelL1)) {
if (wvcdm::WvContentDecryptionModule::IsAudio(initDataType)) {
if (level < SecurityLevel::HW_SECURE_ALL) {
return true;
}
} else {
return true;
}
}
return level <= SecurityLevel::SW_SECURE_DECODE;
}
Return<bool> WVDrmFactory::isContentTypeSupported(