android: Add facility for java code to wait native code to be ready.
commit58e097d4a6c64bf762a8c30e24f16cc62c574519
authorThomas Martitz <kugel@rockbox.org>
Thu, 22 Mar 2012 19:35:57 +0000 (22 20:35 +0100)
committerThomas Martitz <kugel@rockbox.org>
Thu, 22 Mar 2012 19:44:52 +0000 (22 20:44 +0100)
tree16f8135f9ced2e8cd815ff68024b6ef3f237e388
parentb0df3233917c51049a380f04b909f061de828972
android: Add facility for java code to wait native code to be ready.

Especially when unzipping rockbox.zip, the native code can be initialized
a lot later than the java code. The java code needs to be prevented from
accessing rockbox structures (e.g. current_tick, event queues) before they're
ready.

This commit adds wait_rockbox_ready() and fixes dodgy behavior of starting
rockbox via widget play button, headset remote buttons or multimedia keys.
Also fixes wrong small list items before first redraw.

Change-Id: I1caf925e829a9c1c6bb6e0016d5c80574574c91e
firmware/target/hosted/android/button-android.c
firmware/target/hosted/android/lcd-android.c
firmware/target/hosted/android/system-android.c
firmware/target/hosted/android/system-target.h
firmware/target/hosted/android/telephony-android.c