Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 742981ec authored by Mathieu Chartier's avatar Mathieu Chartier
Browse files

Pass runtimeFlags to postForkSystemServer

Flags are now required by ART.

(cherry-picked from commit 2cb0a4d8)
Bug: 139883463
Bug: 144383344
Test: showmap `pid system_server` and verify
Test: atest BootImageProfileTest
Merged-In: I9416ef888557bf0bc0ec7c83f7af1979cac351f8
Change-Id: I9416ef888557bf0bc0ec7c83f7af1979cac351f8
parent 6cc2ca0b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -891,9 +891,9 @@ public final class Zygote {
        }
    }

    private static void callPostForkSystemServerHooks() {
    private static void callPostForkSystemServerHooks(int runtimeFlags) {
        // SystemServer specific post fork hooks run before child post fork hooks.
        ZygoteHooks.postForkSystemServer();
        ZygoteHooks.postForkSystemServer(runtimeFlags);
    }

    private static void callPostForkChildHooks(int runtimeFlags, boolean isSystemServer,
+2 −2
Original line number Diff line number Diff line
@@ -1108,7 +1108,7 @@ static void SpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArray gids,
  UnsetChldSignalHandler();

  if (is_system_server) {
    env->CallStaticVoidMethod(gZygoteClass, gCallPostForkSystemServerHooks);
    env->CallStaticVoidMethod(gZygoteClass, gCallPostForkSystemServerHooks, runtime_flags);
    if (env->ExceptionCheck()) {
      fail_fn("Error calling post fork system server hooks.");
    }
@@ -1741,7 +1741,7 @@ int register_com_android_internal_os_Zygote(JNIEnv* env) {
  gZygoteClass = MakeGlobalRefOrDie(env, FindClassOrDie(env, kZygoteClassName));
  gCallPostForkSystemServerHooks = GetStaticMethodIDOrDie(env, gZygoteClass,
                                                          "callPostForkSystemServerHooks",
                                                          "()V");
                                                          "(I)V");
  gCallPostForkChildHooks = GetStaticMethodIDOrDie(env, gZygoteClass, "callPostForkChildHooks",
                                                   "(IZZLjava/lang/String;)V");