summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--android/src/org/rockbox/RockboxFramebuffer.java3
-rw-r--r--firmware/target/hosted/android/lcd-android.c4
2 files changed, 2 insertions, 5 deletions
diff --git a/android/src/org/rockbox/RockboxFramebuffer.java b/android/src/org/rockbox/RockboxFramebuffer.java
index 20311a8790..0daeffe265 100644
--- a/android/src/org/rockbox/RockboxFramebuffer.java
+++ b/android/src/org/rockbox/RockboxFramebuffer.java
@@ -40,7 +40,6 @@ public class RockboxFramebuffer extends View
int lcd_height, ByteBuffer native_fb)
{
super(c);
-
/* Needed so we can catch KeyEvents */
setFocusable(true);
setFocusableInTouchMode(true);
@@ -48,6 +47,8 @@ public class RockboxFramebuffer extends View
btm = Bitmap.createBitmap(lcd_width, lcd_height, Bitmap.Config.RGB_565);
native_buf = native_fb;
requestFocus();
+ /* the service needs to know the about us */
+ ((RockboxService)c).set_fb(this);
}
public void onDraw(Canvas c)
diff --git a/firmware/target/hosted/android/lcd-android.c b/firmware/target/hosted/android/lcd-android.c
index 75bf7a6d1d..78b1f12f7f 100644
--- a/firmware/target/hosted/android/lcd-android.c
+++ b/firmware/target/hosted/android/lcd-android.c
@@ -77,10 +77,6 @@ void lcd_init_device(void)
RockboxFramebuffer_class,
"java_lcd_update_rect",
"(IIII)V");
-
- jmethodID fbsetter = e->GetMethodID(env_ptr,RockboxService_class,
- "set_fb", "(Lorg/rockbox/RockboxFramebuffer;)V");
- e->CallVoidMethod(env_ptr, RockboxService_instance, fbsetter, RockboxFramebuffer_instance);
display_on = true;
}