|
|
|
@ -23,6 +23,10 @@
|
|
|
|
|
#include "client/linux/handler/minidump_descriptor.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef USING_MQTT
|
|
|
|
|
#include <mosquitto.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include <android/native_window.h>
|
|
|
|
|
#include <android/native_window_jni.h>
|
|
|
|
|
|
|
|
|
@ -227,9 +231,22 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved)
|
|
|
|
|
|
|
|
|
|
curl_global_init(CURL_GLOBAL_ALL);
|
|
|
|
|
|
|
|
|
|
#ifdef USING_MQTT
|
|
|
|
|
mosquitto_lib_init();
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JNIEXPORT void JNICALL JNI_OnUnload(JavaVM* vm, void* reserved)
|
|
|
|
|
{
|
|
|
|
|
#ifdef USING_MQTT
|
|
|
|
|
mosquitto_lib_cleanup();
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
curl_global_cleanup();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool GetJniEnv(JavaVM *vm, JNIEnv **env, bool& didAttachThread)
|
|
|
|
|
{
|
|
|
|
|
didAttachThread = false;
|
|
|
|
|