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 | |
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')
-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 @@ | |||
25 | #include <pthread.h> | 25 | #include <pthread.h> |
26 | #include "config.h" | 26 | #include "config.h" |
27 | #include "system.h" | 27 | #include "system.h" |
28 | #include "power.h" | ||
29 | #include "button.h" | ||
28 | 30 | ||
29 | 31 | ||
30 | 32 | ||
@@ -40,8 +42,16 @@ uintptr_t *stackend; | |||
40 | extern int main(void); | 42 | extern int main(void); |
41 | extern void telephony_init_device(void); | 43 | extern void telephony_init_device(void); |
42 | 44 | ||
43 | void system_exception_wait(void) { } | 45 | void system_exception_wait(void) |
44 | void system_reboot(void) { } | 46 | { |
47 | intptr_t dummy = 0; | ||
48 | while(button_read_device(&dummy) != BUTTON_BACK); | ||
49 | } | ||
50 | |||
51 | void system_reboot(void) | ||
52 | { | ||
53 | power_off(); | ||
54 | } | ||
45 | 55 | ||
46 | /* this is used to return from the entry point of the native library. */ | 56 | /* this is used to return from the entry point of the native library. */ |
47 | static jmp_buf poweroff_buf; | 57 | static jmp_buf poweroff_buf; |