summaryrefslogtreecommitdiffstats
path: root/apps/hosted/android/keyboard.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 /apps/hosted/android/keyboard.c
parent66f2a08f8a37933b9eff79ceabdc2cb42706e48c (diff)
downloadrockbox-c2ee32b22aa50101fc092f610927cfbdd9a2d8f1.tar.gz
rockbox-c2ee32b22aa50101fc092f610927cfbdd9a2d8f1.tar.bz2
rockbox-c2ee32b22aa50101fc092f610927cfbdd9a2d8f1.zip
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 'apps/hosted/android/keyboard.c')
-rw-r--r--apps/hosted/android/keyboard.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/apps/hosted/android/keyboard.c b/apps/hosted/android/keyboard.c
index 460011c4f7..f9bbcbb261 100644
--- a/apps/hosted/android/keyboard.c
+++ b/apps/hosted/android/keyboard.c
@@ -61,17 +61,14 @@ static void kdb_init(void)
{
semaphore_init(&kbd_wakeup, 1, 0);
/* get the class and its constructor */
- jclass kbInput_class = e->FindClass(env_ptr,
+ RockboxKeyboardInput_class = e->FindClass(env_ptr,
"org/rockbox/RockboxKeyboardInput");
- RockboxKeyboardInput_class = e->NewGlobalRef(env_ptr, kbInput_class);
jmethodID constructor = e->GetMethodID(env_ptr,
RockboxKeyboardInput_class,
"<init>", "()V");
- jobject kbInput_instance = e->NewObject(env_ptr,
- RockboxKeyboardInput_class,
- constructor);
- RockboxKeyboardInput_instance = e->NewGlobalRef(env_ptr,
- kbInput_instance);
+ RockboxKeyboardInput_instance = e->NewObject(env_ptr,
+ RockboxKeyboardInput_class,
+ constructor);
kbd_inputfunc = e->GetMethodID(env_ptr, RockboxKeyboardInput_class,
"kbd_input",
"(Ljava/lang/String;"