Fix thread pool check.

We also need to check the zygote priority for a zygote process.

Test: boot with the debug apex
Bug: 214049018
Change-Id: I121cc71a609adb5fe92c18e6422b981708920aff
diff --git a/runtime/jit/jit.h b/runtime/jit/jit.h
index c0c4536..fc7f071 100644
--- a/runtime/jit/jit.h
+++ b/runtime/jit/jit.h
@@ -273,6 +273,10 @@
     return options_->GetThreadPoolPthreadPriority();
   }
 
+  int GetZygoteThreadPoolPthreadPriority() const {
+    return options_->GetZygoteThreadPoolPthreadPriority();
+  }
+
   uint16_t HotMethodThreshold() const {
     return options_->GetOptimizeThreshold();
   }
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 483e2ab..7048eaa 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -709,7 +709,9 @@
     // Ensure that the threads in the JIT pool have been created with the right
     // priority.
     if (kIsDebugBuild && jit->GetThreadPool() != nullptr) {
-      jit->GetThreadPool()->CheckPthreadPriority(jit->GetThreadPoolPthreadPriority());
+      jit->GetThreadPool()->CheckPthreadPriority(
+          IsZygote() ? jit->GetZygoteThreadPoolPthreadPriority()
+                     : jit->GetThreadPoolPthreadPriority());
     }
   }
   // Reset all stats.