Merge "Pass runtimeFlags to postForkSystemServer" am: d9bcf56448
am: b541162122
Change-Id: Ia5a036407ecac6e2b178f67b199214d93abf0010
This commit is contained in:
@@ -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.
|
// SystemServer specific post fork hooks run before child post fork hooks.
|
||||||
ZygoteHooks.postForkSystemServer();
|
ZygoteHooks.postForkSystemServer(runtimeFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void callPostForkChildHooks(int runtimeFlags, boolean isSystemServer,
|
private static void callPostForkChildHooks(int runtimeFlags, boolean isSystemServer,
|
||||||
|
|||||||
@@ -1108,7 +1108,7 @@ static void SpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArray gids,
|
|||||||
UnsetChldSignalHandler();
|
UnsetChldSignalHandler();
|
||||||
|
|
||||||
if (is_system_server) {
|
if (is_system_server) {
|
||||||
env->CallStaticVoidMethod(gZygoteClass, gCallPostForkSystemServerHooks);
|
env->CallStaticVoidMethod(gZygoteClass, gCallPostForkSystemServerHooks, runtime_flags);
|
||||||
if (env->ExceptionCheck()) {
|
if (env->ExceptionCheck()) {
|
||||||
fail_fn("Error calling post fork system server hooks.");
|
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));
|
gZygoteClass = MakeGlobalRefOrDie(env, FindClassOrDie(env, kZygoteClassName));
|
||||||
gCallPostForkSystemServerHooks = GetStaticMethodIDOrDie(env, gZygoteClass,
|
gCallPostForkSystemServerHooks = GetStaticMethodIDOrDie(env, gZygoteClass,
|
||||||
"callPostForkSystemServerHooks",
|
"callPostForkSystemServerHooks",
|
||||||
"()V");
|
"(I)V");
|
||||||
gCallPostForkChildHooks = GetStaticMethodIDOrDie(env, gZygoteClass, "callPostForkChildHooks",
|
gCallPostForkChildHooks = GetStaticMethodIDOrDie(env, gZygoteClass, "callPostForkChildHooks",
|
||||||
"(IZZLjava/lang/String;)V");
|
"(IZZLjava/lang/String;)V");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user