Remove gBn/sConstructorMap.
Test: boot fugu, 2016/2017 Pixel
Bug: 69122224
Change-Id: I525574228bc5f3720901d884fe041597a00ddc77
diff --git a/transport/HidlPassthroughSupport.cpp b/transport/HidlPassthroughSupport.cpp
index b79d21c..18ef1c0 100644
--- a/transport/HidlPassthroughSupport.cpp
+++ b/transport/HidlPassthroughSupport.cpp
@@ -37,10 +37,7 @@
}
auto func = getBsConstructorMap().get(myDescriptor, nullptr);
if (!func) {
- func = gBsConstructorMap.get(myDescriptor, nullptr);
- if (!func) {
- return nullptr;
- }
+ return nullptr;
}
sp<IBase> base = func(static_cast<void*>(iface.get()));
diff --git a/transport/Static.cpp b/transport/Static.cpp
index cbe6add..aa1ac42 100644
--- a/transport/Static.cpp
+++ b/transport/Static.cpp
@@ -29,17 +29,11 @@
Mutex gDefaultServiceManagerLock;
sp<android::hidl::manager::V1_0::IServiceManager> gDefaultServiceManager;
-// Deprecated; kept for ABI compatibility. Use getBnConstructorMap.
-BnConstructorMap gBnConstructorMap{};
-
ConcurrentMap<const ::android::hidl::base::V1_0::IBase*, wp<::android::hardware::BHwBinder>>
gBnMap{};
ConcurrentMap<wp<::android::hidl::base::V1_0::IBase>, SchedPrio> gServicePrioMap{};
-// Deprecated; kept for ABI compatibility. Use getBsConstructorMap.
-BsConstructorMap gBsConstructorMap{};
-
// For static executables, it is not guaranteed that gBnConstructorMap are initialized before
// used in HAL definition libraries.
BnConstructorMap& getBnConstructorMap() {
diff --git a/transport/include/hidl/HidlBinderSupport.h b/transport/include/hidl/HidlBinderSupport.h
index 9759af1..55003cc 100644
--- a/transport/include/hidl/HidlBinderSupport.h
+++ b/transport/include/hidl/HidlBinderSupport.h
@@ -332,10 +332,7 @@
if (sBnObj == nullptr) {
auto func = details::getBnConstructorMap().get(myDescriptor, nullptr);
if (!func) {
- func = details::gBnConstructorMap.get(myDescriptor, nullptr);
- if (!func) {
- return nullptr;
- }
+ return nullptr;
}
sBnObj = sp<IBinder>(func(static_cast<void*>(ifacePtr)));
diff --git a/transport/include/hidl/Static.h b/transport/include/hidl/Static.h
index 0522e44..9d9a14a 100644
--- a/transport/include/hidl/Static.h
+++ b/transport/include/hidl/Static.h
@@ -44,8 +44,6 @@
// For HidlBinderSupport and autogenerated code
// value function receives reinterpret_cast<void *>(static_cast<IFoo *>(foo)),
// returns sp<IBinder>
-// deprecated; use getBnConstructorMap instead.
-extern BnConstructorMap gBnConstructorMap;
BnConstructorMap& getBnConstructorMap();
using BsConstructorMap = ConcurrentMap<std::string,
@@ -53,8 +51,6 @@
// For HidlPassthroughSupport and autogenerated code
// value function receives reinterpret_cast<void *>(static_cast<IFoo *>(foo)),
// returns sp<IBase>
-// deprecated; use getBsConstructorMap instead.
-extern BsConstructorMap gBsConstructorMap;
BsConstructorMap& getBsConstructorMap();
} // namespace details
} // namespace hardware