DO NOT MERGE: Lock drm plugin API calls globally, not per MediaDrm instance
Bug: 22414321
Change-Id: I062c662a440a1becccd248c3b8ddf711c51e53cc
related-to-bug: 18394494
related-to-bug: 19664283
(cherry picked from commit 2fb561a6fe9bca79c50a81e90fc4bb4eb18af0be)
diff --git a/media/libmediaplayerservice/Drm.cpp b/media/libmediaplayerservice/Drm.cpp
index 81dad41..ac948a6 100644
--- a/media/libmediaplayerservice/Drm.cpp
+++ b/media/libmediaplayerservice/Drm.cpp
@@ -46,6 +46,7 @@
KeyedVector<Vector<uint8_t>, String8> Drm::mUUIDToLibraryPathMap;
KeyedVector<String8, wp<SharedLibrary> > Drm::mLibraryPathToOpenLibraryMap;
Mutex Drm::mMapLock;
+Mutex Drm::mLock;
static bool operator<(const Vector<uint8_t> &lhs, const Vector<uint8_t> &rhs) {
if (lhs.size() < rhs.size()) {