summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/android/system-android.c
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2011-03-11 19:23:00 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2011-03-11 19:23:00 +0000
commitc2ee32b22aa50101fc092f610927cfbdd9a2d8f1 (patch)
tree9104a62064dda0643c9604c63dee83a74c489d91 /firmware/target/hosted/android/system-android.c
parent66f2a08f8a37933b9eff79ceabdc2cb42706e48c (diff)
downloadrockbox-c2ee32b22aa50101fc092f610927cfbdd9a2d8f1.zip
rockbox-c2ee32b22aa50101fc092f610927cfbdd9a2d8f1.tar.gz
rockbox-c2ee32b22aa50101fc092f610927cfbdd9a2d8f1.tar.bz2
rockbox-c2ee32b22aa50101fc092f610927cfbdd9a2d8f1.tar.xz
Partly revert "Android: use NewGlobalRef for references that are used globally"
The added complexity wasn't needed for most subsystems, as main() never returns so local references can't be freed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29570 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/hosted/android/system-android.c')
-rw-r--r--firmware/target/hosted/android/system-android.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/firmware/target/hosted/android/system-android.c b/firmware/target/hosted/android/system-android.c
index f9f0605..c499631 100644
--- a/firmware/target/hosted/android/system-android.c
+++ b/firmware/target/hosted/android/system-android.c
@@ -37,19 +37,13 @@ uintptr_t *stackend;
extern int main(void);
extern void telephony_init_device(void);
extern void lcd_deinit(void);
-extern void pcm_deinit(void);
void system_exception_wait(void) { }
void system_reboot(void) { }
void power_off(void)
{
- JNIEnv *env_ptr = getJavaEnvironment();
-
lcd_deinit();
- pcm_deinit();
-
- (*env_ptr)->DeleteGlobalRef(env_ptr, RockboxService_class);
}
void system_init(void)
@@ -62,8 +56,6 @@ void system_init(void)
JNIEXPORT void JNICALL
Java_org_rockbox_RockboxService_main(JNIEnv *env, jobject this)
{
- jclass class = (*env)->GetObjectClass(env, this);
-
/* hack!!! we can't have a valid stack pointer otherwise.
* but we don't really need it anyway, thread.c only needs it
* for overflow detection which doesn't apply for the main thread
@@ -73,8 +65,8 @@ Java_org_rockbox_RockboxService_main(JNIEnv *env, jobject this)
stackbegin = stackend = (uintptr_t*) &stack;
(*env)->GetJavaVM(env, &vm_ptr);
- RockboxService_instance = (*env)->NewGlobalRef(env, this);
- RockboxService_class = (*env)->NewGlobalRef(env, class);
+ RockboxService_instance = this;
+ RockboxService_class = (*env)->GetObjectClass(env, this);
main();
}