create gBsConstructorMap; add wrapPassthrough
Similar to gBnConstructorMap, this map helps wrapping a local
interface with the smallest BsFoo possible. They are added
in Static.h/cpp.
Added HidlPassthroughSupport.h/cpp to hold wrapPassthrough.
Also fixes a few Return object isOk() checks.
Fix: 33307350
Test: hidl_test
Change-Id: I92a7283699bfe5b022df5ab5a9ead5690477ea97
diff --git a/transport/include/hidl/HidlBinderSupport.h b/transport/include/hidl/HidlBinderSupport.h
index 1dfaecd..38ff6c9 100644
--- a/transport/include/hidl/HidlBinderSupport.h
+++ b/transport/include/hidl/HidlBinderSupport.h
@@ -296,12 +296,7 @@
if (ifacePtr->isRemote()) {
return ::android::hardware::IInterface::asBinder(static_cast<ProxyType *>(ifacePtr));
} else {
- std::string myDescriptor{};
- ifacePtr->interfaceChain([&](const hidl_vec<hidl_string> &types) {
- if (types.size() > 0) {
- myDescriptor = types[0].c_str();
- }
- });
+ std::string myDescriptor = getDescriptor(ifacePtr);
if (myDescriptor.empty()) {
// interfaceChain fails
return nullptr;