Make JNI work correctly with default methods.
Also adds some tests for JNI and DefaultMethods.
Bug: 27259142
Bug: 24618811
Change-Id: I31222e3e41059d803be1dbb0f40e1144ac4bf457
diff --git a/runtime/mirror/class-inl.h b/runtime/mirror/class-inl.h
index 3f806d3..19584ed 100644
--- a/runtime/mirror/class-inl.h
+++ b/runtime/mirror/class-inl.h
@@ -502,7 +502,7 @@
if (method->IsDirect()) {
return method;
}
- if (method->GetDeclaringClass()->IsInterface() && !method->IsMiranda()) {
+ if (method->GetDeclaringClass()->IsInterface() && !method->IsCopied()) {
return FindVirtualMethodForInterface(method, pointer_size);
}
return FindVirtualMethodForVirtual(method, pointer_size);