Remove error code INVALID_QUERY_STATUS
CdmEngine::QueryStatus was mapping all error codes
returned from crypto_session.Open to INVALID_QUERY_STATUS
which caused important failure information to be lost.
The GTS DrmSessionManagerTest test was failing as a
result, because session reclaiming no longer worked.
merge of http://go/wvgerrit/44800
bug:72705384
test:gts DrmSessionManagerTest
Change-Id: Id404a18b8f66cf6137b69f6b4e1bdd7004706a0c
(cherry picked from commit 6aad0f77cb)
This commit is contained in:
@@ -186,7 +186,7 @@ enum CdmResponseType {
|
||||
CLIENT_ID_AES_ENCRYPT_ERROR = 145,
|
||||
CLIENT_ID_RSA_INIT_ERROR = 146,
|
||||
CLIENT_ID_RSA_ENCRYPT_ERROR = 147,
|
||||
INVALID_QUERY_STATUS = 148,
|
||||
/* previously INVALID_QUERY_STATUS = 148 */
|
||||
/* previously EMPTY_PROVISIONING_CERTIFICATE_2 = 149 on mnc-dev, */
|
||||
/* and DUPLICATE_SESSION_ID_SPECIFIED = 149 on master */
|
||||
LICENSE_PARSER_NOT_INITIALIZED_4 = 150,
|
||||
|
||||
@@ -489,7 +489,7 @@ CdmResponseType CdmEngine::QueryStatus(SecurityLevel security_level,
|
||||
status,
|
||||
security_level);
|
||||
if (status != NO_ERROR)
|
||||
return INVALID_QUERY_STATUS;
|
||||
return status;
|
||||
|
||||
if (!query_response) {
|
||||
LOGE("CdmEngine::QueryStatus: no query response destination");
|
||||
|
||||
@@ -319,8 +319,6 @@ void PrintTo(const enum CdmResponseType& value, ::std::ostream* os) {
|
||||
break;
|
||||
case CLIENT_ID_RSA_ENCRYPT_ERROR: *os << "CLIENT_ID_RSA_ENCRYPT_ERROR";
|
||||
break;
|
||||
case INVALID_QUERY_STATUS: *os << "INVALID_QUERY_STATUS";
|
||||
break;
|
||||
case LICENSE_PARSER_NOT_INITIALIZED_4:
|
||||
*os << "LICENSE_PARSER_NOT_INITIALIZED_4";
|
||||
break;
|
||||
|
||||
@@ -145,7 +145,6 @@ enum {
|
||||
kClientIdAesEncryptError = ERROR_DRM_VENDOR_MIN + 144,
|
||||
kClientIdRsaInitError = ERROR_DRM_VENDOR_MIN + 145,
|
||||
kClientIdRsaEncryptError = ERROR_DRM_VENDOR_MIN + 146,
|
||||
kInvalidQueryStatus = ERROR_DRM_VENDOR_MIN + 147,
|
||||
kEmptyProvisioningCertificate2 = ERROR_DRM_VENDOR_MIN + 148,
|
||||
kLicenseParserNotInitialized4 = ERROR_DRM_VENDOR_MIN + 149,
|
||||
kInvalidParametersLic3 = ERROR_DRM_VENDOR_MIN + 150,
|
||||
|
||||
@@ -264,8 +264,6 @@ static android::status_t mapCdmResponseType(wvcdm::CdmResponseType res) {
|
||||
// KEY_ERROR is used by the CDM to mean just about any kind of error, not
|
||||
// just license errors, so it is mapped to the generic response.
|
||||
return kErrorCDMGeneric;
|
||||
case wvcdm::INVALID_QUERY_STATUS:
|
||||
return kInvalidQueryStatus;
|
||||
case wvcdm::EMPTY_PROVISIONING_CERTIFICATE_2:
|
||||
return kEmptyProvisioningCertificate2;
|
||||
case wvcdm::LICENSE_PARSER_NOT_INITIALIZED_4:
|
||||
|
||||
@@ -174,7 +174,6 @@ static Status mapCdmResponseType(wvcdm::CdmResponseType res) {
|
||||
case wvcdm::CLIENT_ID_AES_ENCRYPT_ERROR:
|
||||
case wvcdm::CLIENT_ID_RSA_INIT_ERROR:
|
||||
case wvcdm::CLIENT_ID_RSA_ENCRYPT_ERROR:
|
||||
case wvcdm::INVALID_QUERY_STATUS:
|
||||
case wvcdm::LICENSE_PARSER_NOT_INITIALIZED_4:
|
||||
case wvcdm::INVALID_PARAMETERS_LIC_3:
|
||||
case wvcdm::INVALID_PARAMETERS_LIC_4:
|
||||
|
||||
Reference in New Issue
Block a user