PreloadCheck: Add support for regex checking

Add some reflection hackery to retrieve boot classpath dex files. This
requires unstripped jars. Then use DexFile APIs to retrieve all classes,
and run a check if the given regular exception matches.

Use the new infrastructure to check that NoPreloadHolder classes are
not initialized.

Test: atest --test-mapping frameworks/base/tools/preload-check
Change-Id: Ic19e950647e5827d3c3ec4a7109553f39be7f43a
3 files changed