Revert^2: Hiddenapi tests: skip JNI on clinit error
Hiddenapi whitelist tests attempt to resolve all boot class path
methods/fields using reflection and JNI. While reflection does not
initialize the class, JNI attempts to resolve method/field ID do.
Classes which throw in the static initializer would therefore always
fail the test.
Change the sematics to catch ExceptionInInitializerError and skip
the JNI tests in such cases. The error is logged in logcat.
Bug: 110531123
Bug: 116768343
Test: cd cts/tests/signature; ./runSignatureTests.sh
Merged-In: I3892c00a3843217f733d8c3e1fd7d36eab240440
Change-Id: I3892c00a3843217f733d8c3e1fd7d36eab240440
(cherry picked from commit 9e0beaa873db378c7fb8771fa86657f4326aefdf)
2 files changed