Allow stripped-down OatDexFile in system server.

(cherry picked from commit b5649f9b2bce5f4e90be7e2ccfbb9e33ff3105a0)

Bug: 119800099
Test: boot
Change-Id: I9b435eb87904b4b95e5f6e9c49b4353605e23a6a
Merged-In: I6629ea1a96dcc945dda532720c7cc7c4dc305ab7
diff --git a/runtime/oat_file.cc b/runtime/oat_file.cc
index 9a7eeff..05015e3 100644
--- a/runtime/oat_file.cc
+++ b/runtime/oat_file.cc
@@ -1914,10 +1914,11 @@
 }
 
 OatDexFile::OatDexFile(TypeLookupTable&& lookup_table) : lookup_table_(std::move(lookup_table)) {
-  // Stripped-down OatDexFile only allowed in the compiler or in the zygote.
+  // Stripped-down OatDexFile only allowed in the compiler, the zygote, or the system server.
   CHECK(Runtime::Current() == nullptr ||
         Runtime::Current()->IsAotCompiler() ||
-        Runtime::Current()->IsZygote());
+        Runtime::Current()->IsZygote() ||
+        Runtime::Current()->IsSystemServer());
 }
 
 OatDexFile::~OatDexFile() {}