Reland "Remove gBn/sConstructorMap."
Use getBn/sConstructorMap() instead to avoid initialization
order problem.
This reverts commit c6ce6e50a77c08a17a28013599469b83d11049b0.
Reason for revert: internal devices are fixed.
Test: boots
Change-Id: Ia6f2bb09a6333abd87affb9c7c089d2ba512c7c9
Fixes: 69122224
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)));