java: new helper library for the Android port

This commit is contained in:
Max Kellermann
2014-03-01 09:19:32 +01:00
parent c73771e3ce
commit 1e06c66c77
15 changed files with 735 additions and 1 deletions

View File

@@ -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;
}