ART: Allow oatstatus verification for app dependencies

Allow taking verification state from the oat file durin compilation
if the class is a dependency (thus not being compiled itself). This
is necessary in case the dependency itself has been quickened and
stripped, as quickened bytecodes are not supported during compile-
time verification.

Expose this through the CompilerCallbacks.

Bug: 72237763
Test: m test-art-host
Change-Id: I9b7d3a353d81a6422c3b145fd5c5b71f36c6f257
diff --git a/runtime/compiler_callbacks.h b/runtime/compiler_callbacks.h
index 4560bca..8395966 100644
--- a/runtime/compiler_callbacks.h
+++ b/runtime/compiler_callbacks.h
@@ -25,6 +25,12 @@
 
 class CompilerDriver;
 
+namespace mirror {
+
+class Class;
+
+}  // namespace mirror
+
 namespace verifier {
 
 class MethodVerifier;
@@ -68,6 +74,11 @@
   virtual void UpdateClassState(ClassReference ref ATTRIBUTE_UNUSED,
                                 ClassStatus state ATTRIBUTE_UNUSED) {}
 
+  virtual bool CanUseOatStatusForVerification(mirror::Class* klass ATTRIBUTE_UNUSED)
+      REQUIRES_SHARED(Locks::mutator_lock_) {
+    return false;
+  }
+
  protected:
   explicit CompilerCallbacks(CallbackMode mode) : mode_(mode) { }