Avoid throwing exceptions when sessions are closed

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

Closing a non-existant (already closed) session results in an exception
being thrown though mediaDrm. The mediaDrm plugin will now ignore
errors when called though MediaDrm.closeSession.

b/21122725

Change-Id: Ib1c48ade4bdb131195ee56ce2af32bf0cd2166da
This commit is contained in:
Rahul Frias
2015-05-22 10:23:25 -07:00
parent 3a7ef26375
commit 5f227dd85d
2 changed files with 15 additions and 2 deletions

View File

@@ -139,9 +139,9 @@ status_t WVDrmPlugin::openSession(Vector<uint8_t>& sessionId) {
status_t WVDrmPlugin::closeSession(const Vector<uint8_t>& sessionId) {
CdmSessionId cdmSessionId(sessionId.begin(), sessionId.end());
CdmResponseType res = mCDM->CloseSession(cdmSessionId);
mCDM->CloseSession(cdmSessionId);
mCryptoSessions.erase(cdmSessionId);
return mapAndNotifyOfCdmResponseType(sessionId, res);
return android::OK;
}
status_t WVDrmPlugin::getKeyRequest(