diff options
author | Takeshi Aimi <aimitakeshi@gmail.com> | 2010-11-30 16:27:42 +0900 |
---|---|---|
committer | Takeshi Aimi <aimitakeshi@gmail.com> | 2010-11-30 16:27:42 +0900 |
commit | c618b5af98dec06d49374a61a5a94016f9fec2d3 (patch) | |
tree | a33e45ff0d2cd56b47da6fced34e898950ca08b2 /drm/libdrmframework | |
parent | c533edc9c70dd9434e2e496dc0d52f534472c7e0 (diff) | |
download | frameworks_av-c618b5af98dec06d49374a61a5a94016f9fec2d3.zip frameworks_av-c618b5af98dec06d49374a61a5a94016f9fec2d3.tar.gz frameworks_av-c618b5af98dec06d49374a61a5a94016f9fec2d3.tar.bz2 |
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
Diffstat (limited to 'drm/libdrmframework')
-rw-r--r-- | drm/libdrmframework/DrmManagerClient.cpp | 1 | ||||
-rw-r--r-- | drm/libdrmframework/DrmManagerClientImpl.cpp | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/drm/libdrmframework/DrmManagerClient.cpp b/drm/libdrmframework/DrmManagerClient.cpp index fa3d52a..8bb00c3 100644 --- a/drm/libdrmframework/DrmManagerClient.cpp +++ b/drm/libdrmframework/DrmManagerClient.cpp @@ -31,6 +31,7 @@ DrmManagerClient::DrmManagerClient(): DrmManagerClient::~DrmManagerClient() { DrmManagerClientImpl::remove(mUniqueId); mDrmManagerClientImpl->removeClient(mUniqueId); + mDrmManagerClientImpl->setOnInfoListener(mUniqueId, NULL); delete mDrmManagerClientImpl; mDrmManagerClientImpl = NULL; } diff --git a/drm/libdrmframework/DrmManagerClientImpl.cpp b/drm/libdrmframework/DrmManagerClientImpl.cpp index 32fa491..eea312b 100644 --- a/drm/libdrmframework/DrmManagerClientImpl.cpp +++ b/drm/libdrmframework/DrmManagerClientImpl.cpp @@ -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) { |