hidl: return BAD_VALUE from RemoveOfflineLicense when keyset is not found
[ Merge from http://go/wvgerrit/75623 ] This addresses code-review comments during the merge to the wv repo. Bug: 127828539 Test: WV unit/integration tests Change-Id: I12abe3eb0767bb9ccb76940dcca12c17d32e8e53
This commit is contained in:
@@ -103,6 +103,7 @@ static android::status_t mapCdmResponseType(wvcdm::CdmResponseType res) {
|
||||
return kLicenseRenewalNonceGenerationError;
|
||||
case wvcdm::GENERATE_USAGE_REPORT_ERROR:
|
||||
return kGenerateUsageReportError;
|
||||
case wvcdm::KEYSET_ID_NOT_FOUND_4:
|
||||
case wvcdm::GET_LICENSE_ERROR:
|
||||
return kGetLicenseError;
|
||||
case wvcdm::GET_RELEASED_LICENSE_ERROR:
|
||||
|
||||
@@ -76,6 +76,9 @@ static Status mapCdmResponseType(wvcdm::CdmResponseType res) {
|
||||
case wvcdm::INSUFFICIENT_OUTPUT_PROTECTION:
|
||||
return Status::ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION;
|
||||
|
||||
case wvcdm::KEYSET_ID_NOT_FOUND_4:
|
||||
return Status::BAD_VALUE;
|
||||
|
||||
// The following cases follow the order in wv_cdm_types.h
|
||||
// to make it easier to keep track of newly defined errors.
|
||||
case wvcdm::KEY_ERROR:
|
||||
@@ -354,9 +357,6 @@ static Status mapCdmResponseType(wvcdm::CdmResponseType res) {
|
||||
ALOGW("Returns UNKNOWN error for legacy status: %d", res);
|
||||
return Status::ERROR_DRM_UNKNOWN;
|
||||
|
||||
case wvcdm::KEYSET_ID_NOT_FOUND_4:
|
||||
return Status::BAD_VALUE;
|
||||
|
||||
case wvcdm::UNKNOWN_ERROR:
|
||||
return Status::ERROR_DRM_UNKNOWN;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user