diff options
author | Thomas Martitz <kugel@rockbox.org> | 2012-03-29 08:12:44 +0200 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2012-03-30 11:23:07 +0200 |
commit | 72988f3c0ca39e3ec627b8ebcb1638bdb4926d4c (patch) | |
tree | b6083c3907e3441c76446ab57ba9f2bbe2205466 /firmware/target/hosted | |
parent | 148a80e1d110047c3d3fb3c819cde080094341da (diff) | |
download | rockbox-72988f3c0ca39e3ec627b8ebcb1638bdb4926d4c.tar.gz rockbox-72988f3c0ca39e3ec627b8ebcb1638bdb4926d4c.zip |
android: implement system_exception_wait and system_reboot, so that the panicf() screen can be exited.
Change-Id: I1fb095a7ae01a99c84722eeec199b1007b0f6088
Diffstat (limited to 'firmware/target/hosted')
-rw-r--r-- | firmware/target/hosted/android/system-android.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/firmware/target/hosted/android/system-android.c b/firmware/target/hosted/android/system-android.c index 614d89bfd1..d96edcd637 100644 --- a/firmware/target/hosted/android/system-android.c +++ b/firmware/target/hosted/android/system-android.c @@ -25,6 +25,8 @@ #include <pthread.h> #include "config.h" #include "system.h" +#include "power.h" +#include "button.h" @@ -40,8 +42,16 @@ uintptr_t *stackend; extern int main(void); extern void telephony_init_device(void); -void system_exception_wait(void) { } -void system_reboot(void) { } +void system_exception_wait(void) +{ + intptr_t dummy = 0; + while(button_read_device(&dummy) != BUTTON_BACK); +} + +void system_reboot(void) +{ + power_off(); +} /* this is used to return from the entry point of the native library. */ static jmp_buf poweroff_buf; |