Add decrypt hash support
[ Merge of http://go/wvgerrit/68083 ] Add ability to query decrypt hash support, set a hash computed over a frame and retrieve the last error at a later point. Bug: 34080802 Test: WV unit/integration tests. New tests added to cdm_engine_test, libwvdrmdrmplugin_hidl_test and request_license_test. Change-Id: I7548c8798c873a6af3e1cfc0df57c117e1e474a6
This commit is contained in:
@@ -270,10 +270,13 @@ enum {
|
||||
kGetProvisioningError = ERROR_DRM_VENDOR_MIN + 280,
|
||||
kDeviceCannotReprovision = ERROR_DRM_VENDOR_MIN + 281,
|
||||
kKeySizeError2 = ERROR_DRM_VENDOR_MIN + 282,
|
||||
kSetDecryptHashError = ERROR_DRM_VENDOR_MIN + 283,
|
||||
kGetDecryptHashError = ERROR_DRM_VENDOR_MIN + 284,
|
||||
kInvalidDecryptHashFormat = ERROR_DRM_VENDOR_MIN + 285,
|
||||
|
||||
// This should always follow the last error code.
|
||||
// The offset value should be updated each time a new error code is added.
|
||||
kErrorWVDrmMaxErrorUsed = ERROR_DRM_VENDOR_MIN + 282,
|
||||
kErrorWVDrmMaxErrorUsed = ERROR_DRM_VENDOR_MIN + 285,
|
||||
|
||||
// Used by crypto test mode
|
||||
kErrorTestMode = ERROR_DRM_VENDOR_MAX,
|
||||
|
||||
@@ -234,6 +234,7 @@ static android::status_t mapCdmResponseType(wvcdm::CdmResponseType res) {
|
||||
case wvcdm::SESSION_NOT_FOUND_17:
|
||||
case wvcdm::SESSION_NOT_FOUND_18:
|
||||
case wvcdm::SESSION_NOT_FOUND_19:
|
||||
case wvcdm::SESSION_NOT_FOUND_20:
|
||||
return android::ERROR_DRM_SESSION_NOT_OPENED;
|
||||
case wvcdm::SESSION_KEYS_NOT_FOUND:
|
||||
return kSessionKeysNotFound;
|
||||
@@ -524,6 +525,12 @@ static android::status_t mapCdmResponseType(wvcdm::CdmResponseType res) {
|
||||
return kGetProvisioningError;
|
||||
case wvcdm::DEVICE_CANNOT_REPROVISION:
|
||||
return kDeviceCannotReprovision;
|
||||
case wvcdm::SET_DECRYPT_HASH_ERROR:
|
||||
return kSetDecryptHashError;
|
||||
case wvcdm::GET_DECRYPT_HASH_ERROR:
|
||||
return kGetDecryptHashError;
|
||||
case wvcdm::INVALID_DECRYPT_HASH_FORMAT:
|
||||
return kInvalidDecryptHashFormat;
|
||||
}
|
||||
|
||||
// Return here instead of as a default case so that the compiler will warn
|
||||
|
||||
Reference in New Issue
Block a user