proxy: Fix crash when creating proxies with dx-built libcore.

dx and jack can place methods at different offsets within the direct methods
list. This is because (a) dx and jack name their synthetic methods
differently (e.g. 'access$100' vs '-get0') and (b) the methods are
required to be sorted by name.

Instead of hard-coding where <init>(InvocationHandler) is for
java.lang.reflect.Proxy, look it up from the name and signature which
will work regardless of which front-end compiler is used.

Test: ANDROID_FORCE_JACK_ENABLED=disabled make -j32 test-art-host-gtest-proxy_test64
Bug: 35799227
Change-Id: Ie04a37cfe293c146afbe414075a6c568c6a4a0b3
1 file changed