Disable encoded static initialization

Encoded static initialization currently requires fixing up intered
strings. This fix up process causes app startup to be ~10ms longer.
Disable the initialization and fixup process until there is a faster
way to fix up the interned strings.

Bug: 70734839
Test: test-art-host
Change-Id: I847d0bd9a362243241c93b115081a67faab7bfc1
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index bd3a145..5360476 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -2317,6 +2317,7 @@
             // The boot image case doesn't need to recursively initialize the dependencies with
             // special logic since the class linker already does this.
             can_init_static_fields =
+                ClassLinker::kAppImageMayContainStrings &&
                 !soa.Self()->IsExceptionPending() &&
                 is_superclass_initialized &&
                 NoClinitInDependency(klass, soa.Self(), &class_loader);
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 1d72b46..8b64b8d 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -1340,7 +1340,7 @@
       }
     }
   }
-  {
+  if (ClassLinker::kAppImageMayContainStrings) {
     // Fixup all the literal strings happens at app images which are supposed to be interned.
     ScopedTrace timing("Fixup String Intern in image and dex_cache");
     const auto& image_header = space->GetImageHeader();
diff --git a/runtime/class_linker.h b/runtime/class_linker.h
index d05e78f..2f6b754 100644
--- a/runtime/class_linker.h
+++ b/runtime/class_linker.h
@@ -152,6 +152,8 @@
     kClassRootsMax,
   };
 
+  static constexpr bool kAppImageMayContainStrings = false;
+
   explicit ClassLinker(InternTable* intern_table);
   virtual ~ClassLinker();