Fix JNI GetMethodID on interfaces
The GetMethodID call was only searching through methods declared by
classes and superclasses. If you passed it an interface class and
asked for a method declared in a superinterface, the call would fail.
We now have separate code for handling lookups on interfaces.
This also refactors some similar code in the interface method resolver.
Bug 3329492
(Cherry-pick from dalvik-dev)
Change-Id: Icaf744b9e75a1fd6d99f47281002cc6b3c36e368
diff --git a/vm/oo/Object.h b/vm/oo/Object.h
index 903450f..4fc0e5c 100644
--- a/vm/oo/Object.h
+++ b/vm/oo/Object.h
@@ -629,6 +629,14 @@
const DexProto* proto);
/*
+ * Find a method in an interface hierarchy.
+ */
+Method* dvmFindInterfaceMethodHierByDescriptor(const ClassObject* iface,
+ const char* methodName, const char* descriptor);
+Method* dvmFindInterfaceMethodHier(const ClassObject* iface,
+ const char* methodName, const DexProto* proto);
+
+/*
* Find the implementation of "meth" in "clazz".
*
* Returns NULL and throws an exception if not found.