Modified return values for Restore operations

[ Merge of http://go/wvgerrit/70543 ]

RestoreOfflineLicense and RestoreLicenseForRelease now return
CdmResponseType errors rather than a boolean. These error codes
can now be used when gathering metrics.

Bug: 115517916
Test: WV unit/integration tests
Change-Id: If4784d2cdd9825948c5dec31d3e60058ea06b61d
This commit is contained in:
Rahul Frias
2019-01-17 00:09:38 -08:00
parent cfe7221d9e
commit 675b934406
8 changed files with 159 additions and 43 deletions

View File

@@ -308,6 +308,19 @@ static Status mapCdmResponseType(wvcdm::CdmResponseType res) {
case wvcdm::SET_DECRYPT_HASH_ERROR:
case wvcdm::GET_DECRYPT_HASH_ERROR:
case wvcdm::INVALID_DECRYPT_HASH_FORMAT:
case wvcdm::EMPTY_LICENSE_REQUEST_2:
case wvcdm::EMPTY_LICENSE_REQUEST_3:
case wvcdm::EMPTY_LICENSE_RESPONSE_3:
case wvcdm::EMPTY_LICENSE_RESPONSE_4:
case wvcdm::PARSE_REQUEST_ERROR_1:
case wvcdm::PARSE_REQUEST_ERROR_2:
case wvcdm::INVALID_LICENSE_REQUEST_TYPE_1:
case wvcdm::INVALID_LICENSE_REQUEST_TYPE_2:
case wvcdm::LICENSE_RESPONSE_PARSE_ERROR_4:
case wvcdm::LICENSE_RESPONSE_PARSE_ERROR_5:
case wvcdm::INVALID_LICENSE_TYPE_2:
case wvcdm::SIGNATURE_NOT_FOUND_2:
case wvcdm::SESSION_KEYS_NOT_FOUND_2:
ALOGW("Returns UNKNOWN error for legacy status: %d", res);
return Status::ERROR_DRM_UNKNOWN;