Disable check that no oat libraries are loaded.

This invariant no longer holds when libraries are preloaded by zygote.

Test: boot
Bug: 128529256

Change-Id: I12fbc65f948b93f9dfe35e5cce8c83ab911af5f9
diff --git a/runtime/oat_file_manager.cc b/runtime/oat_file_manager.cc
index b03551b..2642cd8 100644
--- a/runtime/oat_file_manager.cc
+++ b/runtime/oat_file_manager.cc
@@ -645,7 +645,12 @@
 void OatFileManager::SetOnlyUseSystemOatFiles(bool assert_no_files_loaded) {
   ReaderMutexLock mu(Thread::Current(), *Locks::oat_file_manager_lock_);
   if (assert_no_files_loaded) {
-    CHECK_EQ(oat_files_.size(), GetBootOatFiles().size());
+    // Make sure all files that were loaded up to this point are on /system.
+    if (kIsTargetBuild) {
+      for (const std::unique_ptr<const OatFile>& oat_file : oat_files_) {
+        CHECK(LocationIsOnSystem(oat_file->GetLocation().c_str())) << oat_file->GetLocation();
+      }
+    }
   }
   only_use_system_oat_files_ = true;
 }