Kaydet (Commit) 8ba203c7 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Use __android_log_print directly

Change-Id: I67d90eb58faa0427c4de894eac107cc2d05a3477
üst 1ea2124e
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <sal/macros.h> #include <sal/macros.h>
#ifdef ANDROID #ifdef ANDROID
#include <jni.h> #include <jni.h>
#include <android/log.h>
#include <osl/detail/android-bootstrap.h> #include <osl/detail/android-bootstrap.h>
#endif #endif
...@@ -242,20 +243,16 @@ static void* osl_thread_start_Impl (void* pData) ...@@ -242,20 +243,16 @@ static void* osl_thread_start_Impl (void* pData)
if (!terminate) if (!terminate)
{ {
#ifdef ANDROID #ifdef ANDROID
{ JNIEnv* env = 0;
JNIEnv* env = 0; int res = (*lo_get_javavm())->AttachCurrentThread(lo_get_javavm(), &env, NULL);
int res = (*lo_get_javavm())->AttachCurrentThread(lo_get_javavm(), &env, NULL); // res == 0 __android_log_print(ANDROID_LOG_INFO, "LibreOffice", "New sal thread started and attached res=%d", res);
fprintf (stderr, "new sal thread started and attached %d!\n", res);
}
#endif #endif
/* call worker function */ /* call worker function */
pImpl->m_WorkerFunction(pImpl->m_pData); pImpl->m_WorkerFunction(pImpl->m_pData);
#ifdef ANDROID #ifdef ANDROID
{ res = (*lo_get_javavm())->DetachCurrentThread(lo_get_javavm());
int res = (*lo_get_javavm())->DetachCurrentThread(lo_get_javavm()); __android_log_print(ANDROID_LOG_INFO, "LibreOffice", "Detached finished sal thread res=%d", res);
fprintf (stderr, "detached finished sal thread %d!\n", res);
}
#endif #endif
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment