From: rikky Date: Sun, 20 Mar 2011 00:09:52 +0000 (+0000) Subject: Fix:android:Added two wrongly deleted functions again X-Git-Tag: navit-0.5.0.5194svn~819 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a32c48683170b834f6cf1792fb72ed411ab2a1b9;p=profile%2Fivi%2Fnavit.git Fix:android:Added two wrongly deleted functions again git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4376 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- diff --git a/navit/navit/android.c b/navit/navit/android.c index 67ca7c0..556b670 100644 --- a/navit/navit/android.c +++ b/navit/navit/android.c @@ -27,6 +27,29 @@ jobject *android_activity; struct callback_list *android_activity_cbl; int android_version; +int +android_find_class_global(char *name, jclass *ret) +{ + *ret=(*jnienv)->FindClass(jnienv, name); + if (! *ret) { + dbg(0,"Failed to get Class %s\n",name); + return 0; + } + (*jnienv)->NewGlobalRef(jnienv, *ret); + return 1; +} + +int +android_find_method(jclass class, char *name, char *args, jmethodID *ret) +{ + *ret = (*jnienv)->GetMethodID(jnienv, class, name, args); + if (*ret == NULL) { + dbg(0,"Failed to get Method %s with signature %s\n",name,args); + return 0; + } + return 1; +} + JNIEXPORT void JNICALL Java_org_navitproject_navit_Navit_NavitMain( JNIEnv* env, jobject thiz, jobject activity, jobject lang, int version, jobject display_density_string) {