From 07e04b69a5368936fac185a6fbf8588bf0dc9d25 Mon Sep 17 00:00:00 2001 From: Taesu Lee Date: Tue, 29 Jun 2021 14:15:43 +0900 Subject: [PATCH] Fix JNI error Replace CallStaticVoidMethod with CallStaticObjectMethod. Bug: 192290163 Test: build & boot Signed-off-by: Taesu Lee Change-Id: I02980e58bfd9bb334f1aa50c9e51a8ce4ae5e059 --- core/jni/com_android_internal_os_Zygote.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp index 55a398e7a0849..a2c67f1e04509 100644 --- a/core/jni/com_android_internal_os_Zygote.cpp +++ b/core/jni/com_android_internal_os_Zygote.cpp @@ -1579,7 +1579,7 @@ static void SpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArray gids, if (is_system_server) { // Prefetch the classloader for the system server. This is done early to // allow a tie-down of the proper system server selinux domain. - env->CallStaticVoidMethod(gZygoteInitClass, gGetOrCreateSystemServerClassLoader); + env->CallStaticObjectMethod(gZygoteInitClass, gGetOrCreateSystemServerClassLoader); if (env->ExceptionCheck()) { // Be robust here. The Java code will attempt to create the classloader // at a later point (but may not have rights to use AoT artifacts).