diff options
author | Gloria Wang <gwang@google.com> | 2011-03-11 14:07:21 -0800 |
---|---|---|
committer | Gloria Wang <gwang@google.com> | 2011-03-11 14:54:23 -0800 |
commit | 0e0a5f9e0b7a7ca618e8a1f7ccecc57a17e0d1e2 (patch) | |
tree | 8ad3203ba726da5b28d63f25d16c1c761cc97885 /drm/drmserver | |
parent | 2eb62955eb84b97695e8a7e56e14310cbb86412b (diff) | |
download | frameworks_av-0e0a5f9e0b7a7ca618e8a1f7ccecc57a17e0d1e2.zip frameworks_av-0e0a5f9e0b7a7ca618e8a1f7ccecc57a17e0d1e2.tar.gz frameworks_av-0e0a5f9e0b7a7ca618e8a1f7ccecc57a17e0d1e2.tar.bz2 |
- Some change on the DrmManager in order to support feature request 4082089.
In DrmManager, we currently lock both processDrmInfo() and onInfo() which is
ok for now since processDrmInfo() is async call, and it will return without
waiting for onInfo() call. However, if we send an event in processDrmInfo(),
we will got deadlock here because we need to invoke onInf() which will wait
for processDrmInfo() to release the lock. Use different lock for onInfo().
- Remove some redundent mutex lock.
Change-Id: I59c794f95ba1693425723224114fa975cf9b235f
Diffstat (limited to 'drm/drmserver')
-rw-r--r-- | drm/drmserver/DrmManager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drm/drmserver/DrmManager.cpp b/drm/drmserver/DrmManager.cpp index 305bafc..1eee5f2 100644 --- a/drm/drmserver/DrmManager.cpp +++ b/drm/drmserver/DrmManager.cpp @@ -119,7 +119,7 @@ status_t DrmManager::unloadPlugIns() { status_t DrmManager::setDrmServiceListener( int uniqueId, const sp<IDrmServiceListener>& drmServiceListener) { - Mutex::Autolock _l(mLock); + Mutex::Autolock _l(mListenerLock); if (NULL != drmServiceListener.get()) { mServiceListeners.add(uniqueId, drmServiceListener); } else { @@ -573,7 +573,7 @@ String8 DrmManager::getSupportedPlugInIdFromPath(int uniqueId, const String8& pa } void DrmManager::onInfo(const DrmInfoEvent& event) { - Mutex::Autolock _l(mLock); + Mutex::Autolock _l(mListenerLock); for (unsigned int index = 0; index < mServiceListeners.size(); index++) { int uniqueId = mServiceListeners.keyAt(index); |