Allow drm plugin to be released when binder dies

A plugin's listener reference was preventing the plugin
from being released in binderDied, which caused
drm sessions to be kept open if an app was abnormally
terminated.  Setting the plugin's listener to NULL
in binderDied resolves the problem.

Test: repeat {launch netflix app, kill <app-pid>}
Prior to this change the netflix app would always fail to
run on the second iteration and the log showed
ERROR_TOO_MANY_SESSIONS. After this change, the netflix app
can be killed and restarted without failures.

Also verified with gts tests and play movies app.

bug:37720811
Change-Id: Iceb1c23e2a1d518da85641336f017bb8b2948863
gugelfrei
Jeff Tinker 7 years ago
parent 593111f446
commit 3e2891674e

@ -958,11 +958,9 @@ status_t DrmHal::signRSA(Vector<uint8_t> const &sessionId,
void DrmHal::binderDied(const wp<IBinder> &the_late_who __unused)
{
mEventLock.lock();
mListener.clear();
mEventLock.unlock();
Mutex::Autolock autoLock(mLock);
setListener(NULL);
mPlugin->setListener(NULL);
mPlugin.clear();
}

Loading…
Cancel
Save