DO NOT MERGE Move legacy widevine classic global lock from framework to
vendor/widevine implementation.

This prevents a hang on contention for the lock if the datasource
read blocks during sniffing.

bug:28888414
Change-Id: Idb2a8653744535f711139c87f39b259daddbf337
diff --git a/media/libstagefright/WVMExtractor.cpp b/media/libstagefright/WVMExtractor.cpp
index d1b2f54..1c170b8 100644
--- a/media/libstagefright/WVMExtractor.cpp
+++ b/media/libstagefright/WVMExtractor.cpp
@@ -42,13 +42,9 @@
 
 namespace android {
 
-static Mutex gWVMutex;
-
 WVMExtractor::WVMExtractor(const sp<DataSource> &source)
     : mDataSource(source)
 {
-    Mutex::Autolock autoLock(gWVMutex);
-
     if (!getVendorLibHandle()) {
         return;
     }
@@ -169,8 +165,6 @@
     const sp<DataSource> &source, String8 *mimeType, float *confidence,
         sp<AMessage> *) {
 
-    Mutex::Autolock autoLock(gWVMutex);
-
     if (!WVMExtractor::getVendorLibHandle()) {
         return false;
     }