Merge "Add decrypt hash support"
This commit is contained in:
@@ -1025,6 +1025,11 @@ Return<void> WVDrmPlugin::getPropertyString(const hidl_string& propertyName,
|
||||
status = queryProperty(wvcdm::QUERY_KEY_RESOURCE_RATING_TIER, value);
|
||||
} else if (name == "oemCryptoBuildInformation") {
|
||||
status = queryProperty(wvcdm::QUERY_KEY_OEMCRYPTO_BUILD_INFORMATION, value);
|
||||
} else if (name == "decryptHashSupport") {
|
||||
status = queryProperty(wvcdm::QUERY_KEY_DECRYPT_HASH_SUPPORT, value);
|
||||
} else if (name == "decryptHashError") {
|
||||
status = mapCdmResponseType(
|
||||
mCDM->GetDecryptHashError(mDecryptHashSessionId, &value));
|
||||
} else {
|
||||
ALOGE("App requested unknown string property %s", name.c_str());
|
||||
status = Status::ERROR_DRM_CANNOT_HANDLE;
|
||||
@@ -1167,6 +1172,16 @@ Return<Status> WVDrmPlugin::setPropertyString(const hidl_string& propertyName,
|
||||
return Status::BAD_VALUE;
|
||||
}
|
||||
}
|
||||
} else if (name == "decryptHash") {
|
||||
wvcdm::CdmSessionId sessionId;
|
||||
CdmResponseType res =
|
||||
mCDM->SetDecryptHash(_value.c_str(), &sessionId);
|
||||
|
||||
if (wvcdm::NO_ERROR == res) mDecryptHashSessionId = sessionId;
|
||||
|
||||
return mapCdmResponseType(res);
|
||||
} else if (name == "decryptHashSessionId") {
|
||||
mDecryptHashSessionId = _value.c_str();
|
||||
} else {
|
||||
ALOGE("App set unknown string property %s", name.c_str());
|
||||
return Status::ERROR_DRM_CANNOT_HANDLE;
|
||||
|
||||
Reference in New Issue
Block a user