MCPcopy Create free account
hub / github.com/buggins/coolreader / jniRegisterNativeMethods

Function jniRegisterNativeMethods

android/jni/cr3engine.cpp:560–576  ·  view source on GitHub ↗

* Register native JNI-callable methods. * * "className" looks like "java/lang/String". */

Source from the content-addressed store, hash-verified

558 * "className" looks like "java/lang/String".
559 */
560static int jniRegisterNativeMethods(JNIEnv* env, const char* className,
561 const JNINativeMethod* gMethods, int numMethods)
562{
563 jclass clazz;
564
565 LOGV("Registering %s natives\n", className);
566 clazz = env->FindClass(className);
567 if (clazz == NULL) {
568 LOGE("Native registration unable to find class '%s'\n", className);
569 return -1;
570 }
571 if (env->RegisterNatives(clazz, gMethods, numMethods) < 0) {
572 LOGE("RegisterNatives failed for '%s'\n", className);
573 return -1;
574 }
575 return 0;
576}
577
578
579jint JNI_OnLoad(JavaVM* vm, void* reserved)

Callers 1

JNI_OnLoadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected