forked from len0rd/rockbox
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
This commit is contained in:
parent
83c60a1012
commit
9dd0158ffb
10 changed files with 74 additions and 136 deletions
|
@ -26,8 +26,8 @@
|
|||
#include "lcd.h"
|
||||
|
||||
extern JNIEnv *env_ptr;
|
||||
extern jclass RockboxActivity_class;
|
||||
extern jobject RockboxActivity_instance;
|
||||
extern jclass RockboxService_class;
|
||||
extern jobject RockboxService_instance;
|
||||
|
||||
static jobject Framebuffer_instance;
|
||||
static jmethodID java_lcd_update;
|
||||
|
@ -35,13 +35,13 @@ static jmethodID java_lcd_update;
|
|||
void lcd_init_device(void)
|
||||
{
|
||||
/* get the RockboxFramebuffer instance allocated by the activity */
|
||||
jfieldID id = (*env_ptr)->GetFieldID(env_ptr,
|
||||
RockboxActivity_class,
|
||||
jfieldID id = (*env_ptr)->GetStaticFieldID(env_ptr,
|
||||
RockboxService_class,
|
||||
"fb",
|
||||
"Lorg/rockbox/RockboxFramebuffer;");
|
||||
|
||||
Framebuffer_instance = (*env_ptr)->GetObjectField(env_ptr,
|
||||
RockboxActivity_instance,
|
||||
Framebuffer_instance = (*env_ptr)->GetStaticObjectField(env_ptr,
|
||||
RockboxService_class,
|
||||
id);
|
||||
|
||||
jclass Framebuffer_class = (*env_ptr)->GetObjectClass(env_ptr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue