summaryrefslogtreecommitdiff
path: root/apps/hosted/android/keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/hosted/android/keyboard.c')
-rw-r--r--apps/hosted/android/keyboard.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/apps/hosted/android/keyboard.c b/apps/hosted/android/keyboard.c
index f9bbcbb261..9407d970fd 100644
--- a/apps/hosted/android/keyboard.c
+++ b/apps/hosted/android/keyboard.c
@@ -26,8 +26,8 @@
26#include "string-extra.h" 26#include "string-extra.h"
27#include "kernel.h" 27#include "kernel.h"
28#include "lang.h" 28#include "lang.h"
29#include "system.h"
30 29
30extern JNIEnv *env_ptr;
31static jclass RockboxKeyboardInput_class; 31static jclass RockboxKeyboardInput_class;
32static jobject RockboxKeyboardInput_instance; 32static jobject RockboxKeyboardInput_instance;
33static jmethodID kbd_inputfunc; 33static jmethodID kbd_inputfunc;
@@ -53,9 +53,7 @@ Java_org_rockbox_RockboxKeyboardInput_put_1result(JNIEnv *env, jobject this,
53 53
54static void kdb_init(void) 54static void kdb_init(void)
55{ 55{
56 JNIEnv *env_ptr = getJavaEnvironment();
57 JNIEnv e = *env_ptr; 56 JNIEnv e = *env_ptr;
58
59 static jmethodID kbd_is_usable; 57 static jmethodID kbd_is_usable;
60 if (RockboxKeyboardInput_class == NULL) 58 if (RockboxKeyboardInput_class == NULL)
61 { 59 {
@@ -86,7 +84,6 @@ static void kdb_init(void)
86 84
87int kbd_input(char* text, int buflen) 85int kbd_input(char* text, int buflen)
88{ 86{
89 JNIEnv *env_ptr = getJavaEnvironment();
90 JNIEnv e = *env_ptr; 87 JNIEnv e = *env_ptr;
91 jstring str = e->NewStringUTF(env_ptr, text); 88 jstring str = e->NewStringUTF(env_ptr, text);
92 jstring ok_text = e->NewStringUTF(env_ptr, str(LANG_KBD_OK)); 89 jstring ok_text = e->NewStringUTF(env_ptr, str(LANG_KBD_OK));