Add CLIENT_TOKEN_NOT_SET error code

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

Bug: 169740403
Test: WV unit/integration test
Change-Id: Iba77c0b7e7f1bee1e96b0d08f0ab8e8591292012
This commit is contained in:
Rahul Frias
2021-03-22 05:44:16 -07:00
parent 1aa197ce4a
commit 30ebbefb40
5 changed files with 10 additions and 1 deletions

View File

@@ -419,6 +419,7 @@ enum CdmResponseType : int32_t {
SESSION_NOT_FOUND_23 = 364,
CERT_PROVISIONING_RESPONSE_ERROR_9 = 365,
CERT_PROVISIONING_RESPONSE_ERROR_10 = 366,
CLIENT_TOKEN_NOT_SET = 367,
// Don't forget to add new values to
// * core/test/test_printers.cpp.
// * android/include/mapErrors-inl.h

View File

@@ -93,6 +93,9 @@ void PrintTo(const enum CdmResponseType& value, ::std::ostream* os) {
case CLIENT_ID_RSA_INIT_ERROR:
*os << "CLIENT_ID_RSA_INIT_ERROR";
break;
case CLIENT_TOKEN_NOT_SET:
*os << "CLIENT_TOKEN_NOT_SET";
break;
case COPY_OLD_USAGE_ENTRY_UNKNOWN_ERROR:
*os << "COPY_OLD_USAGE_ENTRY_UNKNOWN_ERROR";
break;

View File

@@ -300,10 +300,11 @@ enum {
kNoSrmVersion = ERROR_DRM_VENDOR_MIN + 315,
kCertProvisioningResponseError9 = ERROR_DRM_VENDOR_MIN + 316,
kCertProvisioningResponseError10 = ERROR_DRM_VENDOR_MIN + 317,
kClientTokenNotSet = ERROR_DRM_VENDOR_MIN + 318,
// 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 + 317,
kErrorWVDrmMaxErrorUsed = ERROR_DRM_VENDOR_MIN + 318,
// Used by crypto test mode
kErrorTestMode = ERROR_DRM_VENDOR_MAX,

View File

@@ -119,6 +119,8 @@ static android::status_t mapCdmResponseType(wvcdm::CdmResponseType res) {
return kClientIdRsaEncryptError;
case wvcdm::CLIENT_ID_RSA_INIT_ERROR:
return kClientIdRsaInitError;
case wvcdm::CLIENT_TOKEN_NOT_SET:
return kClientTokenNotSet;
case wvcdm::COPY_OLD_USAGE_ENTRY_UNKNOWN_ERROR:
return kCopyOldUsageEntryUnknownError;
case wvcdm::CORE_MESSAGE_NOT_FOUND:

View File

@@ -360,6 +360,7 @@ static Status mapCdmResponseType_1_0(wvcdm::CdmResponseType res) {
case wvcdm::NO_SRM_VERSION:
case wvcdm::CERT_PROVISIONING_RESPONSE_ERROR_9:
case wvcdm::CERT_PROVISIONING_RESPONSE_ERROR_10:
case wvcdm::CLIENT_TOKEN_NOT_SET:
ALOGW("Returns UNKNOWN error for legacy status: %d", res);
return Status::ERROR_DRM_UNKNOWN;
@@ -521,6 +522,7 @@ static S mapCdmResponseType(wvcdm::CdmResponseType res) {
case wvcdm::USAGE_INVALID_PARAMETERS_1:
case wvcdm::USAGE_INVALID_PARAMETERS_2:
case wvcdm::USAGE_STORE_ENTRY_RETRIEVE_INVALID_STORAGE_TYPE:
case wvcdm::CLIENT_TOKEN_NOT_SET:
err = ::drm::V1_4::Status::GENERAL_PLUGIN_ERROR;
break;
case wvcdm::CLIENT_ID_GENERATE_RANDOM_ERROR: