diff options
Diffstat (limited to 'apps/hosted/yesno.c')
-rw-r--r-- | apps/hosted/yesno.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/apps/hosted/yesno.c b/apps/hosted/yesno.c index 2a8c02edd5..d00cb063af 100644 --- a/apps/hosted/yesno.c +++ b/apps/hosted/yesno.c | |||
@@ -62,7 +62,10 @@ static void yesno_init(void) | |||
62 | RockboxYesno_class, | 62 | RockboxYesno_class, |
63 | constructor); | 63 | constructor); |
64 | yesno_func = e->GetMethodID(env_ptr, RockboxYesno_class, | 64 | yesno_func = e->GetMethodID(env_ptr, RockboxYesno_class, |
65 | "yesno_display", "(Ljava/lang/String;)V"); | 65 | "yesno_display", |
66 | "(Ljava/lang/String;" | ||
67 | "Ljava/lang/String;" | ||
68 | "Ljava/lang/String;)V"); | ||
66 | yesno_is_usable = e->GetMethodID(env_ptr, RockboxYesno_class, | 69 | yesno_is_usable = e->GetMethodID(env_ptr, RockboxYesno_class, |
67 | "is_usable", "()Z"); | 70 | "is_usable", "()Z"); |
68 | } | 71 | } |
@@ -100,12 +103,17 @@ enum yesno_res gui_syncyesno_run(const struct text_message * main_message, | |||
100 | 103 | ||
101 | JNIEnv e = *env_ptr; | 104 | JNIEnv e = *env_ptr; |
102 | jstring message = build_message(main_message); | 105 | jstring message = build_message(main_message); |
103 | 106 | jstring yes = (*env_ptr)->NewStringUTF(env_ptr, str(LANG_SET_BOOL_YES)); | |
104 | e->CallVoidMethod(env_ptr, RockboxYesno_instance, yesno_func, message); | 107 | jstring no = (*env_ptr)->NewStringUTF(env_ptr, str(LANG_SET_BOOL_NO)); |
108 | |||
109 | e->CallVoidMethod(env_ptr, RockboxYesno_instance, yesno_func, | ||
110 | message, yes, no); | ||
105 | 111 | ||
106 | wakeup_wait(&yesno_wakeup, TIMEOUT_BLOCK); | 112 | wakeup_wait(&yesno_wakeup, TIMEOUT_BLOCK); |
107 | 113 | ||
108 | e->DeleteLocalRef(env_ptr, message); | 114 | e->DeleteLocalRef(env_ptr, message); |
115 | e->DeleteLocalRef(env_ptr, yes); | ||
116 | e->DeleteLocalRef(env_ptr, no); | ||
109 | 117 | ||
110 | return ret ? YESNO_YES : YESNO_NO; | 118 | return ret ? YESNO_YES : YESNO_NO; |
111 | } | 119 | } |