From 5f32490116bee882f100fed81835c2aa68123e6c Mon Sep 17 00:00:00 2001 From: Dmitry Yunitsky Date: Wed, 8 Jul 2015 13:41:32 +0300 Subject: [PATCH] Changed jni callback for routes building listener. --- android/jni/com/mapswithme/maps/Framework.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/android/jni/com/mapswithme/maps/Framework.cpp b/android/jni/com/mapswithme/maps/Framework.cpp index 6e9f751f5d..9e77c90f5a 100644 --- a/android/jni/com/mapswithme/maps/Framework.cpp +++ b/android/jni/com/mapswithme/maps/Framework.cpp @@ -1008,11 +1008,12 @@ extern "C" env->CallVoidMethod(*obj.get(), methodId); } - void CallRoutingListener(shared_ptr obj, int errorCode, vector const & absentCountries) + void CallRoutingListener(shared_ptr obj, int errorCode, vector const & absentCountries, vector const & absentRoutes) { JNIEnv * env = jni::GetEnv(); // cache methodID - it cannot change after class is loaded. // http://developer.android.com/training/articles/perf-jni.html#jclass_jmethodID_and_jfieldID more details here + // TODO pass & process second vector of absentRoutes static jmethodID const methodId = jni::GetJavaMethodID(env, *obj.get(), "onRoutingEvent", "(I[Lcom/mapswithme/maps/MapStorage$Index;)V"); ASSERT(methodId, ()); @@ -1435,7 +1436,7 @@ extern "C" JNIEXPORT void JNICALL Java_com_mapswithme_maps_Framework_nativeSetRoutingListener(JNIEnv * env, jobject thiz, jobject listener) { - frm()->SetRouteBuildingListener(bind(&CallRoutingListener, jni::make_global_ref(listener), _1, _2)); + frm()->SetRouteBuildingListener(bind(&CallRoutingListener, jni::make_global_ref(listener), _1, _2, _3)); } JNIEXPORT void JNICALL