summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2012-03-29 08:12:44 +0200
committerThomas Martitz <kugel@rockbox.org>2012-03-30 11:23:07 +0200
commit72988f3c0ca39e3ec627b8ebcb1638bdb4926d4c (patch)
treeb6083c3907e3441c76446ab57ba9f2bbe2205466
parent148a80e1d110047c3d3fb3c819cde080094341da (diff)
downloadrockbox-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
-rw-r--r--firmware/target/hosted/android/system-android.c14
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;
40extern int main(void); 42extern int main(void);
41extern void telephony_init_device(void); 43extern void telephony_init_device(void);
42 44
43void system_exception_wait(void) { } 45void system_exception_wait(void)
44void system_reboot(void) { } 46{
47 intptr_t dummy = 0;
48 while(button_read_device(&dummy) != BUTTON_BACK);
49}
50
51void 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. */
47static jmp_buf poweroff_buf; 57static jmp_buf poweroff_buf;