provide slightly more complete Thread.nativeGetStatus implementation

This fixes SimpleFramework (which depends on Thread.getState returning
Thread.State.NEW for unstarted threads) when using the Android class
library.
This commit is contained in:
Joel Dice 2014-09-29 11:08:41 -06:00
parent b406e9c2ed
commit ffb0f9b345

View File

@ -965,10 +965,14 @@ extern "C" AVIAN_EXPORT int64_t JNICALL
} }
extern "C" AVIAN_EXPORT int64_t JNICALL extern "C" AVIAN_EXPORT int64_t JNICALL
Avian_java_lang_Thread_nativeGetStatus(Thread*, object, uintptr_t*) Avian_java_lang_Thread_nativeGetStatus(Thread*,
object,
uintptr_t* arguments)
{ {
// todo enum { New, Runnable, Blocked, Waiting, TimedWaiting, Terminated };
return 1;
// todo: more detail? (e.g. waiting, terminated, etc.)
return arguments[1] ? Runnable : New;
} }
extern "C" AVIAN_EXPORT int64_t JNICALL extern "C" AVIAN_EXPORT int64_t JNICALL