Allow stripped-down OatDexFile in system server.
Bug: 119800099
Test: boot
Change-Id: 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() {}