| 952 | } // namespace xg |
| 953 | |
| 954 | JNIEXPORT jint JNI_OnLoad(JavaVM *vm, void *reserved) { |
| 955 | F2_LOG_I("#JNI_OnLoad", "%s", "JNI_OnLoad Start..."); |
| 956 | JavaVM *old = xg::jni::GetJVM(); |
| 957 | if(old == vm) { |
| 958 | F2_LOG_I("#JNI_OnLoad", "%s", "JNI_OnLoad dupliation vm, skip OnLoad"); |
| 959 | return JNI_VERSION_1_4; |
| 960 | } |
| 961 | |
| 962 | xg::jni::InitJavaVM(vm); |
| 963 | |
| 964 | JNIEnv *env = xg::jni::AttachCurrentThread(); |
| 965 | F2_LOG_I("#JNI_OnLoad", "%s", "AttachCurrentThread FINISH"); |
| 966 | bool result = xg::jni::OnJniLoad(env); |
| 967 | |
| 968 | if(!result) { |
| 969 | F2_LOG_E("#JNI_OnLoad", "%s", "JNI_OnLoad FAIL"); |
| 970 | } |
| 971 | return JNI_VERSION_1_4; |
| 972 | } |
| 973 | |
| 974 | JNIEXPORT void JNI_OnUnload(JavaVM *vm, void *reserved) { F2_LOG_I("#JNI_OnUnload", "%s", "JNI_OnUnload Finished"); } |
nothing calls this directly
no test coverage detected