Hidlize IBase; use IBase instead of IBinder.
* IBase is hidlized over hwbinder. GenericBinder
is removed and Interface with name
android.hidl.base@1.0::IBase is used instead.
* Removed AST::mImportedNamesForJava, because in Java,
we always refer to a type with the full name. We don't
import anything in the java file.
* IFoo.h now includes HidlSupport.h instead of
HidlTransportSupport.h
Test: hidl_test
Test: hidl_test_java
Fix: 32756130
Fix: 33273293
Change-Id: I435ad7c68dea028a16252148b6f5778e3610b7cd
diff --git a/Interface.cpp b/Interface.cpp
index e0c4461..52e9a98 100644
--- a/Interface.cpp
+++ b/Interface.cpp
@@ -114,6 +114,11 @@
bool Interface::addMethod(Method *method) {
+ if (isIBase()) {
+ // ignore addMethod requests for IBase; they are all HIDL reserved methods.
+ return true;
+ }
+
CHECK(!method->isHidlReserved());
if (lookupMethod(method->name()) != nullptr) {
LOG(ERROR) << "Redefinition of method " << method->name();
@@ -188,7 +193,9 @@
}
}
for (Method *reservedMethod : hidlReservedMethods()) {
- v.push_back(InterfaceAndMethod(this, reservedMethod));
+ v.push_back(InterfaceAndMethod(
+ *chain.rbegin(), // IBase
+ reservedMethod));
}
return v;
}