diff --git a/libwvdrmengine/include/mapErrors-inl.h b/libwvdrmengine/include/mapErrors-inl.h index 0e223c33..6f848d21 100644 --- a/libwvdrmengine/include/mapErrors-inl.h +++ b/libwvdrmengine/include/mapErrors-inl.h @@ -146,7 +146,7 @@ static android::status_t mapCdmResponseType(wvcdm::CdmResponseType res) { case wvcdm::INVALID_DECRYPT_PARAMETERS_ENG_4: return kInvalidDecryptParametersEng4; case wvcdm::SESSION_NOT_FOUND_FOR_DECRYPT: - return kSessionNotFoundForDecrypt; + return android::ERROR_DRM_SESSION_NOT_OPENED; case wvcdm::INVALID_DEVICE_CERTIFICATE_TYPE: return kInvalidDeviceCertificateType; case wvcdm::INVALID_KEY_SYSTEM: diff --git a/libwvdrmengine/mediacrypto/src/WVCryptoPlugin.cpp b/libwvdrmengine/mediacrypto/src/WVCryptoPlugin.cpp index c39f0551..b163d6ef 100644 --- a/libwvdrmengine/mediacrypto/src/WVCryptoPlugin.cpp +++ b/libwvdrmengine/mediacrypto/src/WVCryptoPlugin.cpp @@ -185,6 +185,10 @@ ssize_t WVCryptoPlugin::decrypt(bool secure, const uint8_t key[KEY_ID_SIZE], errorDetailMsg->setTo("Error decrypting data: requested key has not been loaded"); // This error is actionable by the app and should be passed up. return mapCdmResponseType(res); + } else if (res == wvcdm::SESSION_NOT_FOUND_FOR_DECRYPT) { + errorDetailMsg->setTo("Error decrypting data: session not found, possibly reclaimed"); + // This error is actionable by the app and should be passed up. + return mapCdmResponseType(res); } else { // Swallow the specifics of other errors to obscure decrypt internals. return kErrorCDMGeneric;