Fix verifier/linker IncompatibleClassChangeError with hidden API
The verifier and class linker will attempt to find a method with
the wrong type if it could not be found with the original type,
i.e an interface method on a regular class and vice versa.
This logic did not previously take hidden API restrictions into
account and would result in bogus error messages to the user or
debug crashes.
Bug: 64382372
Bug: 77464273
Test: art/test.py -r -t 674-hiddenapi
Merged-In: If8327a70dd73b90249da3d9e505f0c6f89838f8e
Change-Id: If8327a70dd73b90249da3d9e505f0c6f89838f8e
(cherry picked from commit 54a99cfcf3d3463404fdf4152523dcc69b8648d7)
diff --git a/test/674-hiddenapi/src/ParentInterface.java b/test/674-hiddenapi/src/ParentInterface.java
index e36fe0e..f79ac9d 100644
--- a/test/674-hiddenapi/src/ParentInterface.java
+++ b/test/674-hiddenapi/src/ParentInterface.java
@@ -23,9 +23,9 @@
// INSTANCE METHOD
int methodPublicWhitelist();
- int methodPublicBlacklist();
int methodPublicLightGreylist();
int methodPublicDarkGreylist();
+ int methodPublicBlacklist();
// STATIC METHOD
static int methodPublicStaticWhitelist() { return 21; }