Snap for 7874456 from 29cd4088f4c4484cdc20a2f0dbd421162ba8efd0 to tm-release
Change-Id: Iec585caacbf04e009647e6156d915a862c08803b
diff --git a/transport/HidlBinderSupport.cpp b/transport/HidlBinderSupport.cpp
index b48b460..8b36f1f 100644
--- a/transport/HidlBinderSupport.cpp
+++ b/transport/HidlBinderSupport.cpp
@@ -254,12 +254,8 @@
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 gBnConstructorMap returned null for %s", __func__,
- descriptor.c_str());
+ LOG_ALWAYS_FATAL_IF(func == nullptr, "%s getBnConstructorMap returned null for %s",
+ __func__, descriptor.c_str());
sBnObj = sp<IBinder>(func(static_cast<void*>(ifacePtr)));
LOG_ALWAYS_FATAL_IF(sBnObj == nullptr, "%s Bn constructor function returned null for %s",
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;