diff options
| author | Thomas Martitz <kugel@rockbox.org> | 2011-07-19 23:44:56 +0000 |
|---|---|---|
| committer | Thomas Martitz <kugel@rockbox.org> | 2011-07-19 23:44:56 +0000 |
| commit | b2f52477dfce620c11e1707e69d3a5f8cab5f6d7 (patch) | |
| tree | 094d7a9ce51c684ebec417cdcd954f379b49dfa7 /firmware/target/hosted/android/kernel-android.c | |
| parent | b8bfa84d1bf74fcb133d7f5bbf49c39d38d9ed7d (diff) | |
| download | rockbox-b2f52477dfce620c11e1707e69d3a5f8cab5f6d7.zip rockbox-b2f52477dfce620c11e1707e69d3a5f8cab5f6d7.tar.gz rockbox-b2f52477dfce620c11e1707e69d3a5f8cab5f6d7.tar.bz2 rockbox-b2f52477dfce620c11e1707e69d3a5f8cab5f6d7.tar.xz | |
Android: Change headphone detection to call into native.
Making a JNI call from tick tasks is not permitted as the underlying thread
is not attached to the Java VM. This is an error and crashes in the emulator
(which has stricter JNI checks enabled by default).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30173 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/hosted/android/kernel-android.c')
| -rw-r--r-- | firmware/target/hosted/android/kernel-android.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/firmware/target/hosted/android/kernel-android.c b/firmware/target/hosted/android/kernel-android.c index 80ff88f..e352241 100644 --- a/firmware/target/hosted/android/kernel-android.c +++ b/firmware/target/hosted/android/kernel-android.c @@ -60,7 +60,13 @@ void interrupt(void) } /* - * setup a hrtimer to send a signal to our process every tick */ + * setup a hrtimer to send a signal to our process every tick + * + * WARNING: JNI calls are not permitted from tick tasks, as the + * underlying thread is not attached to the Java VM + * + * Can be possibly be attached if it really needs to be. but let's + * keep this leightweight */ void tick_start(unsigned int interval_in_ms) { int ret = 0; |