diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-08-03 22:56:24 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-08-03 22:56:24 +0000 |
commit | 9dd0158ffb98ddbd5bef0e45a9b561294ce50264 (patch) | |
tree | 7df364f01c95c6f9b9b0a831aa802670eb4a0933 /firmware/target/hosted/android/system-android.c | |
parent | 83c60a1012f2db6c21c5779f7e11b2f3e479df85 (diff) | |
download | rockbox-9dd0158ffb98ddbd5bef0e45a9b561294ce50264.tar.gz rockbox-9dd0158ffb98ddbd5bef0e45a9b561294ce50264.zip |
Run Rockbox as a service, which allows for music decoding&playback in the background,
the activity only attaches to the framebuffer for displaying it. An icon
in the notification area is displayed (it could be prettier I guess).
Note: Some HTC phones won't, includng mine, get enough CPU time to do background decoding
fluently, see: http://code.google.com/p/android/issues/detail?id=9663
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27686 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/hosted/android/system-android.c')
-rw-r--r-- | firmware/target/hosted/android/system-android.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/target/hosted/android/system-android.c b/firmware/target/hosted/android/system-android.c index 16c6973474..1fb69b3465 100644 --- a/firmware/target/hosted/android/system-android.c +++ b/firmware/target/hosted/android/system-android.c | |||
@@ -32,8 +32,8 @@ void system_init(void) { } | |||
32 | 32 | ||
33 | /* global fields for use with various JNI calls */ | 33 | /* global fields for use with various JNI calls */ |
34 | JNIEnv *env_ptr; | 34 | JNIEnv *env_ptr; |
35 | jobject RockboxActivity_instance; | 35 | jobject RockboxService_instance; |
36 | jclass RockboxActivity_class; | 36 | jclass RockboxService_class; |
37 | 37 | ||
38 | uintptr_t *stackbegin; | 38 | uintptr_t *stackbegin; |
39 | uintptr_t *stackend; | 39 | uintptr_t *stackend; |
@@ -41,7 +41,7 @@ uintptr_t *stackend; | |||
41 | extern int main(void); | 41 | extern int main(void); |
42 | /* this is the entry point of the android app initially called by jni */ | 42 | /* this is the entry point of the android app initially called by jni */ |
43 | JNIEXPORT void JNICALL | 43 | JNIEXPORT void JNICALL |
44 | Java_org_rockbox_RockboxActivity_main(JNIEnv *env, jobject this) | 44 | Java_org_rockbox_RockboxService_main(JNIEnv *env, jobject this) |
45 | { | 45 | { |
46 | /* hack!!! we can't have a valid stack pointer otherwise. | 46 | /* hack!!! we can't have a valid stack pointer otherwise. |
47 | * but we don't really need it anyway, thread.c only needs it | 47 | * but we don't really need it anyway, thread.c only needs it |
@@ -53,7 +53,7 @@ Java_org_rockbox_RockboxActivity_main(JNIEnv *env, jobject this) | |||
53 | volatile uintptr_t stack = 0; | 53 | volatile uintptr_t stack = 0; |
54 | stackbegin = stackend = (uintptr_t*) &stack; | 54 | stackbegin = stackend = (uintptr_t*) &stack; |
55 | env_ptr = env; | 55 | env_ptr = env; |
56 | RockboxActivity_instance = this; | 56 | RockboxService_instance = this; |
57 | RockboxActivity_class = (*env)->GetObjectClass(env, this); | 57 | RockboxService_class = (*env)->GetObjectClass(env, this); |
58 | main(); | 58 | main(); |
59 | } | 59 | } |