diff options
Diffstat (limited to 'src/thread/Thread.cxx')
-rw-r--r-- | src/thread/Thread.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/thread/Thread.cxx b/src/thread/Thread.cxx index 67bcf7184..2932d478f 100644 --- a/src/thread/Thread.cxx +++ b/src/thread/Thread.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2013 The Music Player Daemon Project + * Copyright (C) 2003-2014 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -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; } |