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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user