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:
@@ -142,14 +142,16 @@ WVDrmPlugin::~WVDrmPlugin() {
|
||||
}
|
||||
}
|
||||
mCryptoSessions.clear();
|
||||
CdmIdentifier identifier;
|
||||
Status status = mCdmIdentifierBuilder.getCdmIdentifier(&identifier);
|
||||
if (status != Status::OK) {
|
||||
ALOGE("Failed to get cdm identifier %d", status);
|
||||
} else {
|
||||
status = mapCdmResponseType(mCDM->CloseCdm(identifier));
|
||||
if (mCdmIdentifierBuilder.is_sealed()) {
|
||||
CdmIdentifier identifier;
|
||||
Status status = mCdmIdentifierBuilder.getCdmIdentifier(&identifier);
|
||||
if (status != Status::OK) {
|
||||
ALOGE("Failed to close cdm. status %d", status);
|
||||
ALOGE("Failed to get cdm identifier %d", status);
|
||||
} else {
|
||||
status = mapCdmResponseType(mCDM->CloseCdm(identifier));
|
||||
if (status != Status::OK) {
|
||||
ALOGE("Failed to close cdm. status %d", status);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user