summaryrefslogtreecommitdiff
path: root/firmware/target/hosted
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/hosted')
-rw-r--r--firmware/target/hosted/android/kernel-android.c2
-rw-r--r--firmware/target/hosted/android/lcd-android.c12
-rw-r--r--firmware/target/hosted/android/pcm-android.c2
-rw-r--r--firmware/target/hosted/android/system-android.c10
4 files changed, 11 insertions, 15 deletions
diff --git a/firmware/target/hosted/android/kernel-android.c b/firmware/target/hosted/android/kernel-android.c
index 9594516460..1a9b97b419 100644
--- a/firmware/target/hosted/android/kernel-android.c
+++ b/firmware/target/hosted/android/kernel-android.c
@@ -25,8 +25,6 @@
#include "system.h"
extern JNIEnv *env_ptr;
-extern jclass RockboxActivity_class;
-extern jobject RockboxActivity_instance;
static jclass RockboxTimer_class;
static jobject RockboxTimer_instance;
diff --git a/firmware/target/hosted/android/lcd-android.c b/firmware/target/hosted/android/lcd-android.c
index ef4004ef2a..efe68cdd71 100644
--- a/firmware/target/hosted/android/lcd-android.c
+++ b/firmware/target/hosted/android/lcd-android.c
@@ -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,
diff --git a/firmware/target/hosted/android/pcm-android.c b/firmware/target/hosted/android/pcm-android.c
index 91978f422b..8c5d2597c4 100644
--- a/firmware/target/hosted/android/pcm-android.c
+++ b/firmware/target/hosted/android/pcm-android.c
@@ -25,8 +25,6 @@
#include "pcm.h"
extern JNIEnv *env_ptr;
-extern jclass RockboxActivity_class;
-extern jobject RockboxActivity_instance;
/* infos about our pcm chunks */
static size_t pcm_data_size;
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) { }
/* global fields for use with various JNI calls */
JNIEnv *env_ptr;
-jobject RockboxActivity_instance;
-jclass RockboxActivity_class;
+jobject RockboxService_instance;
+jclass RockboxService_class;
uintptr_t *stackbegin;
uintptr_t *stackend;
@@ -41,7 +41,7 @@ uintptr_t *stackend;
extern int main(void);
/* this is the entry point of the android app initially called by jni */
JNIEXPORT void JNICALL
-Java_org_rockbox_RockboxActivity_main(JNIEnv *env, jobject this)
+Java_org_rockbox_RockboxService_main(JNIEnv *env, jobject this)
{
/* hack!!! we can't have a valid stack pointer otherwise.
* 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)
volatile uintptr_t stack = 0;
stackbegin = stackend = (uintptr_t*) &stack;
env_ptr = env;
- RockboxActivity_instance = this;
- RockboxActivity_class = (*env)->GetObjectClass(env, this);
+ RockboxService_instance = this;
+ RockboxService_class = (*env)->GetObjectClass(env, this);
main();
}