diff options
Diffstat (limited to 'platform/android/src/attach_env.cpp')
-rw-r--r-- | platform/android/src/attach_env.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/platform/android/src/attach_env.cpp b/platform/android/src/attach_env.cpp index 6da075ee3e..0dc8069284 100644 --- a/platform/android/src/attach_env.cpp +++ b/platform/android/src/attach_env.cpp @@ -1,3 +1,5 @@ +#include <android/log.h> +#include <mbgl/util/platform.hpp> #include "attach_env.hpp" #include "jni.hpp" @@ -10,8 +12,10 @@ UniqueEnv AttachEnv() { switch (err) { case JNI_OK: + __android_log_write(ANDROID_LOG_ERROR, "JNI_THREAD", ("is attached: " + mbgl::platform::getCurrentThreadName()).c_str()); return UniqueEnv(env, JNIEnvDeleter(*theJVM, false)); case JNI_EDETACHED: + __android_log_write(ANDROID_LOG_ERROR, "JNI_THREAD", ("is detached: " + mbgl::platform::getCurrentThreadName()).c_str()); return UniqueEnv(jni::AttachCurrentThread(*theJVM).release(), JNIEnvDeleter(*theJVM, true)); default: throw std::system_error(err, jni::ErrorCategory()); |