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
(cherry picked from commit e28f98cc82)
This commit is contained in:
committed by
Fred Gylys-Colwell
parent
ff3e2c51b8
commit
9096b3134d
@@ -197,10 +197,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