IHidlInterfaceBase for all autogenerated interfaces.
Add an interfaceChain() method to each interface
to facilitate casting between interfaces.
Add ::descriptor for each interface (so that
IFoo::descriptor won't fall back to
IHidlInterfaceBase::descriptor.
Test: hidl_test
Test: cd system/tools/hidl && mma
Test: cd hardware/interfaces/test && mma
Bug: 32337854
Change-Id: I317b7905750db0bfefc4c5fd608a07080923c719
diff --git a/generateVts.cpp b/generateVts.cpp
index 2eba598..35eb0d0 100644
--- a/generateVts.cpp
+++ b/generateVts.cpp
@@ -121,11 +121,7 @@
out << "interface: {\n";
out.indent();
- std::vector<const Interface *> chain;
- while (iface != NULL) {
- chain.push_back(iface);
- iface = iface->superType();
- }
+ std::vector<const Interface *> chain = iface->typeChain();
// Generate all the attribute declarations first.
for (auto it = chain.rbegin(); it != chain.rend(); ++it) {