| 101 | } |
| 102 | |
| 103 | jobject VmCore::findMethod(JNIEnv *env, const char *className, const char *methodName, |
| 104 | const char *signature) { |
| 105 | try { |
| 106 | if (!is_str_utf8(className) || !is_str_utf8(methodName) || !is_str_utf8(methodName)) { |
| 107 | return nullptr; |
| 108 | } |
| 109 | auto clazz = (jclass) env->CallStaticObjectMethod(VMEnv.VMCoreClass, VMEnv.findMethod, |
| 110 | env->NewStringUTF(className), |
| 111 | env->NewStringUTF(methodName), |
| 112 | env->NewStringUTF(signature)); |
| 113 | env->ExceptionClear(); |
| 114 | return clazz; |
| 115 | } catch (const char* &e) { |
| 116 | ALOGE("catch findMethod %s", e); |
| 117 | return nullptr; |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | jstring VmCore::redirectPathString(JNIEnv *env, jstring path) { |
| 122 | env = ensureEnvCreated(); |
nothing calls this directly
no test coverage detected