From 1e06c66c776e2dca217059d7d94309b0c5431a3f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 1 Mar 2014 09:19:32 +0100 Subject: java: new helper library for the Android port --- src/thread/Thread.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/thread') diff --git a/src/thread/Thread.cxx b/src/thread/Thread.cxx index 9016680e4..2932d478f 100644 --- a/src/thread/Thread.cxx +++ b/src/thread/Thread.cxx @@ -21,6 +21,10 @@ #include "Thread.hxx" #include "util/Error.hxx" +#ifdef ANDROID +#include "java/Global.hxx" +#endif + bool Thread::Start(void (*_f)(void *ctx), void *_ctx, Error &error) { @@ -102,6 +106,11 @@ Thread::ThreadProc(void *ctx) #endif thread.f(thread.ctx); + +#ifdef ANDROID + Java::DetachCurrentThread(); +#endif + return nullptr; } -- cgit v1.2.3