Fix hidden API blacklist CTS test

The current CTS test for hidden API blacklist will fail because it
will succeed when resolving with JNI and finding a field/method in
one of the parents. For example, this happens with CREATOR static
fields which are public in a superclass but @hide in a subclass.
Convert the jfieldID/jmethodID to java.lang.reflect.Field/Method
and check if it is declared in the method we expected it to be.

Bug: 64382372
Bug: 78230396
Test: (cd cts/tests/signature && ./runSignatureTests.sh)
Change-Id: I7ee18d9f38b063583f1cc3a68ee0ddecee3e24f1
2 files changed