Close CDM sessions only if opened

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

This avoids logging an unnecessary error, when the session is not found.

Bug: 79210873
Test: Wv unit/integration test, GtsMediaDrmTest, playback with Play
      Movies and Netflix.

Change-Id: Ifef99d1380d763670ad0fa89c885fb5fd41567e2
This commit is contained in:
Rahul Frias
2018-05-08 00:30:46 -07:00
parent 5b169b1722
commit 9c95aba4f5

View File

@@ -142,6 +142,7 @@ WVDrmPlugin::~WVDrmPlugin() {
}
}
mCryptoSessions.clear();
if (mCdmIdentifierBuilder.is_sealed()) {
CdmIdentifier identifier;
Status status = mCdmIdentifierBuilder.getCdmIdentifier(&identifier);
if (status != Status::OK) {
@@ -153,6 +154,7 @@ WVDrmPlugin::~WVDrmPlugin() {
}
}
}
}
Status WVDrmPlugin::openSessionCommon(std::vector<uint8_t>& sessionId) {
Status status = Status::OK;