Correct exception returned after RemoveKeys is called.
[ Merge of http://go/wvgerrit/47065 ] RemoveKeys now resets associated crypto and policy resources, rather than just closing the crypto session. This results in a MediaCodec.CryptoException with error code ERROR_NO_KEY rather than ERROR_SESSION_NOT_OPENED, if decrypt is called afterwards. Error SESSION_NOT_FOUND_FOR_DECRYPT is made unique. Error codes were also synchonized between various branches in the widevine repo. Bug: 77304819 Test: WV unit/integration tests, VtsHalDrmV1_0Target tests Change-Id: I6cba2a3e1ce466d58c7727cde2d8f81d9503d655
This commit is contained in:
@@ -272,7 +272,8 @@ CdmResponseType WvContentDecryptionModule::GetSecureStopIds(
|
||||
const CdmIdentifier& identifier,
|
||||
std::vector<CdmSecureStopId>* ssids) {
|
||||
if (ssids == NULL) {
|
||||
LOGE("WvContentDecryptionModule::Decrypt: ssid destination not provided");
|
||||
LOGE("WvContentDecryptionModule::GetSecureStopIds: ssid destination not "
|
||||
"provided");
|
||||
return PARAMETER_NULL;
|
||||
}
|
||||
|
||||
@@ -294,7 +295,10 @@ CdmResponseType WvContentDecryptionModule::Decrypt(
|
||||
// First find the CdmEngine that has the given session_id. If we are using
|
||||
// key sharing, the shared session will still be in the same CdmEngine.
|
||||
CdmEngine* cdm_engine = GetCdmForSessionId(session_id);
|
||||
if (!cdm_engine) return SESSION_NOT_FOUND_FOR_DECRYPT;
|
||||
if (!cdm_engine) {
|
||||
LOGE("WvContentDecryptionModule::Decrypt: not found");
|
||||
return SESSION_NOT_FOUND_18;
|
||||
}
|
||||
|
||||
CdmSessionId local_session_id = session_id;
|
||||
if (validate_key_id && Properties::GetSessionSharingId(session_id) != 0) {
|
||||
|
||||
Reference in New Issue
Block a user