Disable the public SDK Checker during exception throwing

The compiler will try to throw exception when it cannot
resolved methods/classes or when there's an incompatible class
change. While doing so, it requires the thrown exception class
to be initialized.

However, when verifying with a public SDK Checker installed,
it's possible that the exception class may not initialized due
to private member access (e.g. serialVersionUid).

Since during verification the exceptions are simply mechanism
for the compiler to propagate the verification error it is OK
to disable the SDK Checker and allow the class to be initialized.

Bug: 177017481
Test: m test-art-host & manual
Change-Id: I3765897bf9885b7e26b3ab044002df88866cd3cd
diff --git a/runtime/aot_class_linker.h b/runtime/aot_class_linker.h
index 30a79aa..a094e3a 100644
--- a/runtime/aot_class_linker.h
+++ b/runtime/aot_class_linker.h
@@ -46,6 +46,7 @@
   bool DenyAccessBasedOnPublicSdk(ArtField* art_field ATTRIBUTE_UNUSED) const override
       REQUIRES_SHARED(Locks::mutator_lock_);
   bool DenyAccessBasedOnPublicSdk(const char* type_descriptor ATTRIBUTE_UNUSED) const override;
+  void SetEnablePublicSdkChecks(bool enabled) override;
 
  protected:
   // Overridden version of PerformClassVerification allows skipping verification if the class was