From 8ba203c726df97039125ad8b3223802fc80a9110 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 7 Mar 2013 02:15:59 +0200 Subject: Use __android_log_print directly Change-Id: I67d90eb58faa0427c4de894eac107cc2d05a3477 --- sal/osl/unx/thread.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'sal/osl/unx') diff --git a/sal/osl/unx/thread.c b/sal/osl/unx/thread.c index 034ca81bbc69..0e1ebbab7f02 100644 --- a/sal/osl/unx/thread.c +++ b/sal/osl/unx/thread.c @@ -30,6 +30,7 @@ #include #ifdef ANDROID #include +#include #include #endif @@ -242,20 +243,16 @@ static void* osl_thread_start_Impl (void* pData) if (!terminate) { #ifdef ANDROID - { - JNIEnv* env = 0; - int res = (*lo_get_javavm())->AttachCurrentThread(lo_get_javavm(), &env, NULL); // res == 0 - fprintf (stderr, "new sal thread started and attached %d!\n", res); - } + JNIEnv* env = 0; + int res = (*lo_get_javavm())->AttachCurrentThread(lo_get_javavm(), &env, NULL); + __android_log_print(ANDROID_LOG_INFO, "LibreOffice", "New sal thread started and attached res=%d", res); #endif /* call worker function */ pImpl->m_WorkerFunction(pImpl->m_pData); #ifdef ANDROID - { - int res = (*lo_get_javavm())->DetachCurrentThread(lo_get_javavm()); - fprintf (stderr, "detached finished sal thread %d!\n", res); - } + res = (*lo_get_javavm())->DetachCurrentThread(lo_get_javavm()); + __android_log_print(ANDROID_LOG_INFO, "LibreOffice", "Detached finished sal thread res=%d", res); #endif } -- cgit