remove unnecessary jni hook logs

This commit is contained in:
5ec1cff
2023-12-31 14:27:19 +08:00
parent 0741a35c8f
commit cd714527e9

View File

@@ -236,14 +236,12 @@ void hookJniNativeMethods(JNIEnv *env, const char *clz, JNINativeMethod *methods
if (mid == nullptr) {
env->ExceptionClear();
nm.fnPtr = nullptr;
LOGE("Could not found jni method in class %s: %s(%s)", clz, nm.name, nm.signature);
continue;
}
auto method = lsplant::JNI_ToReflectedMethod(env, clazz, mid, is_static);
auto modifier = lsplant::JNI_CallIntMethod(env, method, member_getModifiers);
if ((modifier & MODIFIER_NATIVE) == 0) {
nm.fnPtr = nullptr;
LOGE("Don't hook method because it's not native method: %s: %s(%s)", clz, nm.name, nm.signature);
continue;
}
auto artMethod = lsplant::art::ArtMethod::FromReflectedMethod(env, method);