summaryrefslogtreecommitdiff
path: root/transport/HidlBinderSupport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'transport/HidlBinderSupport.cpp')
-rw-r--r--transport/HidlBinderSupport.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/transport/HidlBinderSupport.cpp b/transport/HidlBinderSupport.cpp
index 8b36f1f..b48b460 100644
--- a/transport/HidlBinderSupport.cpp
+++ b/transport/HidlBinderSupport.cpp
@@ -254,8 +254,12 @@ sp<IBinder> getOrCreateCachedBinder(::android::hidl::base::V1_0::IBase* ifacePtr
if (sBnObj == nullptr) {
auto func = details::getBnConstructorMap().get(descriptor, nullptr);
- LOG_ALWAYS_FATAL_IF(func == nullptr, "%s getBnConstructorMap returned null for %s",
- __func__, descriptor.c_str());
+ 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());
sBnObj = sp<IBinder>(func(static_cast<void*>(ifacePtr)));
LOG_ALWAYS_FATAL_IF(sBnObj == nullptr, "%s Bn constructor function returned null for %s",