Merge "-Lexport-header includes package root."
diff --git a/Interface.cpp b/Interface.cpp
index b4a1b67..57f3ca4 100644
--- a/Interface.cpp
+++ b/Interface.cpp
@@ -669,17 +669,13 @@
         << " o) ";
 
     out.block([&] {
-        out << "std::string os;\nbool ok = false;\n";
-        // TODO b/34136228 use interfaceDescriptor instead
-        out << "auto ret = o->interfaceChain([&os, &ok] (const auto &chain) ";
+        out << "std::string os;\n";
+        out << "auto ret = o->interfaceDescriptor([&os] (const auto &name) ";
         out.block([&] {
-            out.sIf("chain.size() >= 1", [&] {
-                out << "os += chain[0].c_str();\n"
-                    << "ok = true;\n";
-            }).endl();
+            out << "os += name.c_str();\n";
         });
         out << ");\n";
-        out.sIf("!ret.isOk() || !ok", [&] {
+        out.sIf("!ret.isOk()", [&] {
             out << "os += \"[class or subclass of \";\n"
                 << "os += " << fullName() << "::descriptor;\n"
                 << "os += \"]\";\n";
diff --git a/test/java_test/hidl_test_java_native.cpp b/test/java_test/hidl_test_java_native.cpp
index 2bf5417..b17ea0c 100644
--- a/test/java_test/hidl_test_java_native.cpp
+++ b/test/java_test/hidl_test_java_native.cpp
@@ -648,7 +648,7 @@
 };
 
 template <typename T>
-static void EXPECT_OK(::android::hardware::Return<T> ret) {
+static void EXPECT_OK(const ::android::hardware::Return<T> &ret) {
     EXPECT_TRUE(ret.isOk());
 }
 
diff --git a/test/main.cpp b/test/main.cpp
index 2dc969c..6dda6b2 100644
--- a/test/main.cpp
+++ b/test/main.cpp
@@ -124,7 +124,7 @@
 using std::to_string;
 
 template <typename T>
-static inline ::testing::AssertionResult isOk(::android::hardware::Return<T> ret) {
+static inline ::testing::AssertionResult isOk(const ::android::hardware::Return<T> &ret) {
     return ret.isOk()
         ? (::testing::AssertionSuccess() << ret.description())
         : (::testing::AssertionFailure() << ret.description());
@@ -1281,9 +1281,8 @@
                 [&](const auto &out) {
                     EXPECT_EQ(in.size(), out.size());
 
-                    EXPECT_OK(out[0]->interfaceChain([](const auto &names) {
-                        ASSERT_GT(names.size(), 0u);
-                        ASSERT_STREQ(names[0].c_str(), ISimple::descriptor);
+                    EXPECT_OK(out[0]->interfaceDescriptor([](const auto &name) {
+                        ASSERT_STREQ(name.c_str(), ISimple::descriptor);
                     }));
                     for (size_t i = 0; i < in.size(); ++i) {
                         sp<ISimple> inSimple = ISimple::castFrom(in[i]);
@@ -1419,11 +1418,11 @@
     sp<ISimple> out = ret;
     ASSERT_NE(out.get(), nullptr);
     EXPECT_EQ(out->getCookie(), 42);
-    EXPECT_OK(out->customVecInt([&](const auto &) { }));
-    EXPECT_OK(out->customVecStr([&](const auto &) { }));
-    EXPECT_OK(out->interfaceChain([&](const auto &) { }));
-    EXPECT_OK(out->mystr([&](const auto &) { }));
-    EXPECT_OK(out->myhandle([&](const auto &) { }));
+    EXPECT_OK(out->customVecInt([](const auto &) { }));
+    EXPECT_OK(out->customVecStr([](const auto &) { }));
+    EXPECT_OK(out->ping());
+    EXPECT_OK(out->mystr([](const auto &) { }));
+    EXPECT_OK(out->myhandle([](const auto &) { }));
 }
 
 TEST_F(HidlTest, InheritRemoteGrandparentTest) {