summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2021-11-01 18:09:48 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-11-01 18:09:48 +0000
commitd697be25416de9a6e1969559014f097975e27866 (patch)
tree2a5d6badb15f65134e02ba90289f9a785f076cb3
parent1e1216610b2be27e296d4d9e2200a4989ef1500a (diff)
parentcd1676c13a5df7628b712a302c8fd62f145b5f71 (diff)
downloadlibhidl-d697be25416de9a6e1969559014f097975e27866.tar.gz
delete gBn/sConstructorMap am: e29b2ad215 am: cd1676c13a
Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1875942 Change-Id: I739a0513dabdf9f8c6eb4d77d2e5029925743584
-rw-r--r--transport/HidlBinderSupport.cpp8
-rw-r--r--transport/HidlPassthroughSupport.cpp4
-rw-r--r--transport/InternalStatic.h7
-rw-r--r--transport/Static.cpp8
4 files changed, 2 insertions, 25 deletions
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 @@ sp<IBinder> getOrCreateCachedBinder(::android::hidl::base::V1_0::IBase* ifacePtr
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 @@ namespace details {
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 hardware {
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 android {
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<const ::android::hidl::base::V1_0::IBase*,
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;