Remove interfaceChain from IServiceManager::add()
Bug: 32742469
Test: hidl_test, binderized marlin boots
Change-Id: I361008893184a8358f9b28df8fe4ffbd0f70be98
diff --git a/generateCpp.cpp b/generateCpp.cpp
index 30e335b..13d887e 100644
--- a/generateCpp.cpp
+++ b/generateCpp.cpp
@@ -230,20 +230,9 @@
out.sIf("sm == nullptr", [&] {
out << "return ::android::INVALID_OPERATION;\n";
}).endl();
- out << "bool success = false;\n"
- << "::android::hardware::Return<void> ret =\n";
- out.indent(2, [&] {
- out << "this->interfaceChain("
- << "[&success, &sm, &serviceName, this](const auto &chain) ";
- out.block([&] {
- out << "::android::hardware::Return<bool> addRet = "
- << "sm->add(chain, serviceName.c_str(), this);\n";
- out << "success = addRet.isOk() && addRet;\n";
- });
- out << ");\n";
- out << "success = success && ret.isOk();\n";
- });
- out << "return success ? ::android::OK : ::android::UNKNOWN_ERROR;\n";
+ out << "::android::hardware::Return<bool> ret = "
+ << "sm->add(serviceName.c_str(), this);\n"
+ << "return ret.isOk() && ret ? ::android::OK : ::android::UNKNOWN_ERROR;\n";
}).endl().endl();
out << "bool " << interfaceName << "::registerForNotifications(\n";