summaryrefslogtreecommitdiffstats
path: root/apps/hosted/android/yesno.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/yesno.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/yesno.c')
-rw-r--r--apps/hosted/android/yesno.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/apps/hosted/android/yesno.c b/apps/hosted/android/yesno.c
index de6ec99a3c..2e85ea2bc1 100644
--- a/apps/hosted/android/yesno.c
+++ b/apps/hosted/android/yesno.c
@@ -52,21 +52,20 @@ static void yesno_init(JNIEnv *env_ptr)
{
semaphore_init(&yesno_done, 1, 0);
/* get the class and its constructor */
- jclass yesno_class = e->FindClass(env_ptr,
- "org/rockbox/RockboxYesno");
+ jclass RockboxYesno_class = e->FindClass(env_ptr,
+ "org/rockbox/RockboxYesno");
jmethodID constructor = e->GetMethodID(env_ptr,
- yesno_class,
+ RockboxYesno_class,
"<init>", "()V");
- jobject yesno_instance = e->NewObject(env_ptr,
- yesno_class,
- constructor);
- RockboxYesno_instance = e->NewGlobalRef(env_ptr, yesno_instance);
- yesno_func = e->GetMethodID(env_ptr, yesno_class,
+ RockboxYesno_instance = e->NewObject(env_ptr,
+ RockboxYesno_class,
+ constructor);
+ yesno_func = e->GetMethodID(env_ptr, RockboxYesno_class,
"yesno_display",
"(Ljava/lang/String;"
"Ljava/lang/String;"
"Ljava/lang/String;)V");
- yesno_is_usable = e->GetMethodID(env_ptr, yesno_class,
+ yesno_is_usable = e->GetMethodID(env_ptr, RockboxYesno_class,
"is_usable", "()Z");
}
/* need to get it every time incase the activity died/restarted */