Add post fork hook for System Server
Adds a post fork hook for System Server that is used to enable JIT.
Bug: 62356545
Bug: 66095511
Test: device boots, no permission errors
Change-Id: I963e8c4903fb20fd0b5a207fdc6746035b69c569
diff --git a/core/java/com/android/internal/os/Zygote.java b/core/java/com/android/internal/os/Zygote.java
index 4ee950a..8b3829b3 100644
--- a/core/java/com/android/internal/os/Zygote.java
+++ b/core/java/com/android/internal/os/Zygote.java
@@ -211,6 +211,11 @@
*/
native protected static void nativeUnmountStorageOnInit();
+ private static void callPostForkSystemServerHooks() {
+ // SystemServer specific post fork hooks run before child post fork hooks.
+ VM_HOOKS.postForkSystemServer();
+ }
+
private static void callPostForkChildHooks(int runtimeFlags, boolean isSystemServer,
boolean isZygote, String instructionSet) {
VM_HOOKS.postForkChild(runtimeFlags, isSystemServer, isZygote, instructionSet);