Do not destruct static maps.

In case they are deleted while some threads are using them (this
happens sometimes depending on how these libraries are loaded and how
they are being used).

Noting that b/69122224 is filed to move these into functions.

Bug: 129726097
Test: HIDL's run_all_device_tests.sh
Test: no longer see error where it repro'd before:
FORTIFY: pthread_mutex_lock called on a destroyed mutex

Change-Id: I66eb9aa24e31d7fc652f0426361c17600b4716ec
diff --git a/transport/HidlBinderSupport.cpp b/transport/HidlBinderSupport.cpp
index caf7cf8..62b1755 100644
--- a/transport/HidlBinderSupport.cpp
+++ b/transport/HidlBinderSupport.cpp
@@ -256,16 +256,16 @@
     }
 
     // for get + set
-    std::unique_lock<std::mutex> _lock = details::gBnMap.lock();
+    std::unique_lock<std::mutex> _lock = details::gBnMap->lock();
 
-    wp<BHwBinder> wBnObj = details::gBnMap.getLocked(ifacePtr, nullptr);
+    wp<BHwBinder> wBnObj = details::gBnMap->getLocked(ifacePtr, nullptr);
     sp<IBinder> sBnObj = wBnObj.promote();
 
     if (sBnObj == nullptr) {
         auto func = details::getBnConstructorMap().get(descriptor, nullptr);
         if (!func) {
             // TODO(b/69122224): remove this static variable when prebuilts updated
-            func = details::gBnConstructorMap.get(descriptor, nullptr);
+            func = details::gBnConstructorMap->get(descriptor, nullptr);
         }
         LOG_ALWAYS_FATAL_IF(func == nullptr, "%s gBnConstructorMap returned null for %s", __func__,
                             descriptor.c_str());
@@ -274,7 +274,7 @@
         LOG_ALWAYS_FATAL_IF(sBnObj == nullptr, "%s Bn constructor function returned null for %s",
                             __func__, descriptor.c_str());
 
-        details::gBnMap.setLocked(ifacePtr, static_cast<BHwBinder*>(sBnObj.get()));
+        details::gBnMap->setLocked(ifacePtr, static_cast<BHwBinder*>(sBnObj.get()));
     }
 
     return sBnObj;