DRM Framework bug fixes.

- Make sure to clean-up obsolete listeners.
- Close cursor after using it.
- Add virtual destructor to the base class of OnInfoListener.

Changes are made by SEMC and Sony.

Change-Id: Ibb6dd625ef48e3597188f0d7c90f9d4c780b6139
This commit is contained in:
Takeshi Aimi
2010-11-30 16:27:42 +09:00
parent c533edc9c7
commit c618b5af98
4 changed files with 11 additions and 2 deletions

View File

@@ -81,7 +81,8 @@ status_t DrmManagerClientImpl::setOnInfoListener(
int uniqueId, const sp<DrmManagerClient::OnInfoListener>& infoListener) {
Mutex::Autolock _l(mLock);
mOnInfoListener = infoListener;
return getDrmManagerService()->setDrmServiceListener(uniqueId, this);
return getDrmManagerService()->setDrmServiceListener(uniqueId,
(NULL != infoListener.get()) ? this : NULL);
}
status_t DrmManagerClientImpl::installDrmEngine(int uniqueId, const String8& drmEngineFile) {