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

@@ -531,6 +531,32 @@ static android::status_t mapCdmResponseType(wvcdm::CdmResponseType res) {
return kGetDecryptHashError;
case wvcdm::INVALID_DECRYPT_HASH_FORMAT:
return kInvalidDecryptHashFormat;
case wvcdm::EMPTY_LICENSE_REQUEST_2:
return kEmptyLicenseRequest2;
case wvcdm::EMPTY_LICENSE_REQUEST_3:
return kEmptyLicenseRequest3;
case wvcdm::EMPTY_LICENSE_RESPONSE_3:
return kEmptyLicenseResponse3;
case wvcdm::EMPTY_LICENSE_RESPONSE_4:
return kEmptyLicenseResponse4;
case wvcdm::PARSE_REQUEST_ERROR_1:
return kParseRequestError1;
case wvcdm::PARSE_REQUEST_ERROR_2:
return kParseRequestError2;
case wvcdm::INVALID_LICENSE_REQUEST_TYPE_1:
return kInvalidLicenseRequestType1;
case wvcdm::INVALID_LICENSE_REQUEST_TYPE_2:
return kInvalidLicenseRequestType2;
case wvcdm::LICENSE_RESPONSE_PARSE_ERROR_4:
return kLicenseResponseParseError4;
case wvcdm::LICENSE_RESPONSE_PARSE_ERROR_5:
return kLicenseResponseParseError5;
case wvcdm::INVALID_LICENSE_TYPE_2:
return kInvalidLicenseType2;
case wvcdm::SIGNATURE_NOT_FOUND_2:
return kSignatureNotFound2;
case wvcdm::SESSION_KEYS_NOT_FOUND_2:
return kSessionKeysNotFound2;
}
// Return here instead of as a default case so that the compiler will warn