From 046cec3aa7fd58a9519cad8d693b47a2400e1742 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Wed, 16 Mar 2011 14:33:55 +0000 Subject: Android: Partly revert r29569 and only call the new getJavaEnvironment() when needed. The environment is fine to share in general, just not across OS threads, so it's only needed for functions which are possibly called from multiple OS threads (only 1 currently). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29601 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/hosted/android/telephony-android.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'firmware/target/hosted/android/telephony-android.c') diff --git a/firmware/target/hosted/android/telephony-android.c b/firmware/target/hosted/android/telephony-android.c index fb2dc37623..64ad436ca7 100644 --- a/firmware/target/hosted/android/telephony-android.c +++ b/firmware/target/hosted/android/telephony-android.c @@ -22,16 +22,14 @@ #include #include "kernel.h" -#include "system.h" +extern JNIEnv *env_ptr; extern jobject RockboxService_instance; void telephony_init_device(void) { - JNIEnv *env_ptr = getJavaEnvironment(); JNIEnv e = *env_ptr; - jclass class = e->FindClass(env_ptr, "org/rockbox/RockboxTelephony"); jmethodID constructor = e->GetMethodID(env_ptr, class, "", "(Landroid/content/Context;)V"); -- cgit v1.2.3