Add getReferenceInfo to IBase.
Also added a IMPL_STUB_IMPL for HIDL reserved methods that:
* add a method with the same name and signature
to BnHwFoo
* BnHwFoo::onTransact will call BnHwFoo::method instead of
_hidl_mImpl->method
* Content of IMPL_STUB_IMPL will go to BnHwFoo::method.
Test: make and tested NFC / light / audio
Test: hidl_test
Change-Id: I85f6314450178c02c7bcba91c8a9fffbce822c76
diff --git a/Method.cpp b/Method.cpp
index 38a6c04..476a10b 100644
--- a/Method.cpp
+++ b/Method.cpp
@@ -45,6 +45,12 @@
mSerial = serial;
mCppImpl = cppImpl;
mJavaImpl = javaImpl;
+
+ CHECK(mJavaImpl.find(IMPL_STUB_IMPL) == mJavaImpl.end())
+ << "FATAL: mJavaImpl should not use IMPL_STUB_IMPL; use IMPL_HEADER instead.";
+ CHECK(mCppImpl.find(IMPL_STUB_IMPL) == mCppImpl.end() ||
+ mCppImpl.find(IMPL_STUB) == mCppImpl.end())
+ << "FATAL: mCppImpl IMPL_STUB will override IMPL_STUB_IMPL.";
}
std::string Method::name() const {