Revert "Revert "delete gBn/sConstructorMap""

This reverts commit 8324445c8f709dd4bd6e5b8787ac8746601053f9.

While this works on the system image, this is breaking GSI images,
as they may ship a different version of libhidlbase.

Revert this change and patch affected modules instead.

Change-Id: I91001f0bac427879fc66c4d25fea8221405f5aa4
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
diff --git a/transport/HidlBinderSupport.cpp b/transport/HidlBinderSupport.cpp
index 6e3038c..8b36f1f 100644
--- a/transport/HidlBinderSupport.cpp
+++ b/transport/HidlBinderSupport.cpp
@@ -254,10 +254,6 @@
 
     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);
-        }
         LOG_ALWAYS_FATAL_IF(func == nullptr, "%s getBnConstructorMap returned null for %s",
                             __func__, descriptor.c_str());
 
diff --git a/transport/HidlPassthroughSupport.cpp b/transport/HidlPassthroughSupport.cpp
index 6f30b7b..e059b4d 100644
--- a/transport/HidlPassthroughSupport.cpp
+++ b/transport/HidlPassthroughSupport.cpp
@@ -29,10 +29,6 @@
 
 static sp<IBase> tryWrap(const std::string& descriptor, sp<IBase> iface) {
     auto func = getBsConstructorMap().get(descriptor, nullptr);
-    if (!func) {
-        // TODO(b/69122224): remove this when prebuilts don't reference it
-        func = gBsConstructorMap->get(descriptor, nullptr);
-    }
     if (func) {
         return func(static_cast<void*>(iface.get()));
     }
diff --git a/transport/InternalStatic.h b/transport/InternalStatic.h
index 666b2b6..a0d1c2d 100644
--- a/transport/InternalStatic.h
+++ b/transport/InternalStatic.h
@@ -28,13 +28,6 @@
 namespace details {
 
 // TODO(b/69122224): remove this once no prebuilts reference it
-// deprecated; use getBnConstructorMap instead.
-extern DoNotDestruct<BnConstructorMap> gBnConstructorMap;
-// TODO(b/69122224): remove this once no prebuilts reference it
-// deprecated; use getBsConstructorMap instead.
-extern DoNotDestruct<BsConstructorMap> gBsConstructorMap;
-
-// TODO(b/69122224): remove this once no prebuilts reference it
 extern DoNotDestruct<ConcurrentMap<wp<::android::hidl::base::V1_0::IBase>, SchedPrio>>
         gServicePrioMap;
 // TODO(b/69122224): remove this once no prebuilts reference it
diff --git a/transport/Static.cpp b/transport/Static.cpp
index 240d196..fe7c0f0 100644
--- a/transport/Static.cpp
+++ b/transport/Static.cpp
@@ -27,9 +27,6 @@
 namespace hardware {
 namespace details {
 
-// Deprecated; kept for ABI compatibility. Use getBnConstructorMap.
-DoNotDestruct<BnConstructorMap> gBnConstructorMap{};
-
 DoNotDestruct<ConcurrentMap<const ::android::hidl::base::V1_0::IBase*,
                             wp<::android::hardware::BHwBinder>>>
         gBnMap{};
@@ -38,11 +35,6 @@
 DoNotDestruct<ConcurrentMap<wp<::android::hidl::base::V1_0::IBase>, SchedPrio>> gServicePrioMap{};
 DoNotDestruct<ConcurrentMap<wp<::android::hidl::base::V1_0::IBase>, bool>> gServiceSidMap{};
 
-// Deprecated; kept for ABI compatibility. Use getBsConstructorMap.
-DoNotDestruct<BsConstructorMap> gBsConstructorMap{};
-
-// For static executables, it is not guaranteed that gBnConstructorMap are initialized before
-// used in HAL definition libraries.
 BnConstructorMap& getBnConstructorMap() {
     static BnConstructorMap& map = *new BnConstructorMap();
     return map;