summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGloria Wang <gwang@google.com>2011-03-14 11:56:39 -0700
committerGloria Wang <gwang@google.com>2011-03-14 11:56:39 -0700
commit1825ce2475d4cbed336ddb779ab5acb09d9a155c (patch)
tree229089e703ee58a77790038ac5de28a3e0581296
parent8b9a9067511efca72ca872d689e30315c1450f94 (diff)
parent6cfa41f06fc6a85ebaf5b94c4602128359587473 (diff)
downloadframeworks_av-1825ce2475d4cbed336ddb779ab5acb09d9a155c.zip
frameworks_av-1825ce2475d4cbed336ddb779ab5acb09d9a155c.tar.gz
frameworks_av-1825ce2475d4cbed336ddb779ab5acb09d9a155c.tar.bz2
resolved conflicts for merge of c761a80d to master
Change-Id: I0c0474b95d66c23310d04b7a7f4c9571a211582c
-rw-r--r--drm/drmserver/DrmManager.cpp4
-rw-r--r--drm/libdrmframework/DrmManagerClient.cpp5
-rw-r--r--drm/libdrmframework/include/DrmManager.h1
-rw-r--r--include/drm/DrmManagerClient.h1
4 files changed, 3 insertions, 8 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);
diff --git a/drm/libdrmframework/DrmManagerClient.cpp b/drm/libdrmframework/DrmManagerClient.cpp
index 3143d45..8b78132 100644
--- a/drm/libdrmframework/DrmManagerClient.cpp
+++ b/drm/libdrmframework/DrmManagerClient.cpp
@@ -79,7 +79,6 @@ int DrmManagerClient::checkRightsStatus(const String8& path, int action) {
status_t DrmManagerClient::consumeRights(
sp<DecryptHandle> &decryptHandle, int action, bool reserve) {
- Mutex::Autolock _l(mDecryptLock);
return mDrmManagerClientImpl->consumeRights(mUniqueId, decryptHandle, action, reserve);
}
@@ -132,7 +131,6 @@ status_t DrmManagerClient::closeDecryptSession(sp<DecryptHandle> &decryptHandle)
status_t DrmManagerClient::initializeDecryptUnit(
sp<DecryptHandle> &decryptHandle, int decryptUnitId, const DrmBuffer* headerInfo) {
- Mutex::Autolock _l(mDecryptLock);
return mDrmManagerClientImpl->initializeDecryptUnit(
mUniqueId, decryptHandle, decryptUnitId, headerInfo);
}
@@ -140,21 +138,18 @@ status_t DrmManagerClient::initializeDecryptUnit(
status_t DrmManagerClient::decrypt(
sp<DecryptHandle> &decryptHandle, int decryptUnitId,
const DrmBuffer* encBuffer, DrmBuffer** decBuffer, DrmBuffer* IV) {
- Mutex::Autolock _l(mDecryptLock);
return mDrmManagerClientImpl->decrypt(
mUniqueId, decryptHandle, decryptUnitId, encBuffer, decBuffer, IV);
}
status_t DrmManagerClient::finalizeDecryptUnit(
sp<DecryptHandle> &decryptHandle, int decryptUnitId) {
- Mutex::Autolock _l(mDecryptLock);
return mDrmManagerClientImpl->finalizeDecryptUnit(mUniqueId,
decryptHandle, decryptUnitId);
}
ssize_t DrmManagerClient::pread(
sp<DecryptHandle> &decryptHandle, void* buffer, ssize_t numBytes, off64_t offset) {
- Mutex::Autolock _l(mDecryptLock);
return mDrmManagerClientImpl->pread(mUniqueId, decryptHandle, buffer, numBytes, offset);
}
diff --git a/drm/libdrmframework/include/DrmManager.h b/drm/libdrmframework/include/DrmManager.h
index e05366d..c7276f9 100644
--- a/drm/libdrmframework/include/DrmManager.h
+++ b/drm/libdrmframework/include/DrmManager.h
@@ -147,6 +147,7 @@ private:
int mDecryptSessionId;
int mConvertId;
Mutex mLock;
+ Mutex mListenerLock;
Mutex mDecryptLock;
Mutex mConvertLock;
TPlugInManager<IDrmEngine> mPlugInManager;
diff --git a/include/drm/DrmManagerClient.h b/include/drm/DrmManagerClient.h
index 044ff0e..5011137 100644
--- a/include/drm/DrmManagerClient.h
+++ b/include/drm/DrmManagerClient.h
@@ -368,7 +368,6 @@ public:
private:
int mUniqueId;
- Mutex mDecryptLock;
DrmManagerClientImpl* mDrmManagerClientImpl;
};