Properly close plugins on SIGTERM and exit
test: adb reboot while playing netflix and check logcat to make sure session are closed. [ Merge of http://go/wvgerrit/133063 ] bug: 193099676 Change-Id: I375695673b0c366e09fb857f5ae7a9cb6b946779
This commit is contained in:
@@ -196,10 +196,17 @@ WVDrmPlugin::WVDrmPlugin(const sp<WvContentDecryptionModule>& cdm,
|
||||
mCDM(cdm),
|
||||
mCrypto(crypto),
|
||||
mCryptoSessions(),
|
||||
mAppPackageName(appPackageName) {}
|
||||
mAppPackageName(appPackageName) {
|
||||
Terminator::Register(this);
|
||||
}
|
||||
|
||||
WVDrmPlugin::~WVDrmPlugin() {
|
||||
wvcdm::SetLoggingUid(mCdmIdentifierBuilder.user_id());
|
||||
Terminator::Forget(this);
|
||||
Close();
|
||||
}
|
||||
|
||||
void WVDrmPlugin::Close() {
|
||||
typedef map<CdmSessionId, CryptoSession>::iterator mapIterator;
|
||||
for (mapIterator iter = mCryptoSessions.begin();
|
||||
iter != mCryptoSessions.end();
|
||||
|
||||
Reference in New Issue
Block a user