Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladiMihaylenko <vxmihaylenko@gmail.com>2019-05-15 17:57:21 +0300
committerVladimir Byko-Ianko <bykoianko@gmail.com>2019-05-17 16:45:03 +0300
commit9171567414303416e3d2801711b8fd1e4e268565 (patch)
tree96550a8b510499dce5a8a39e8bd8c7f1b2d6f555 /android
parent448e9fb4c6ab5beb7125db29a7ec5b9bfcc73503 (diff)
[routing] Fixed duplicate names in absent list.
Diffstat (limited to 'android')
-rw-r--r--android/jni/com/mapswithme/core/jni_helper.cpp9
-rw-r--r--android/jni/com/mapswithme/core/jni_helper.hpp10
-rw-r--r--android/jni/com/mapswithme/maps/Framework.cpp7
3 files changed, 13 insertions, 13 deletions
diff --git a/android/jni/com/mapswithme/core/jni_helper.cpp b/android/jni/com/mapswithme/core/jni_helper.cpp
index 71306d1622..bb831a1230 100644
--- a/android/jni/com/mapswithme/core/jni_helper.cpp
+++ b/android/jni/com/mapswithme/core/jni_helper.cpp
@@ -167,15 +167,6 @@ jstring ToJavaString(JNIEnv * env, char const * s)
return env->NewStringUTF(s);
}
-jobjectArray ToJavaStringArray(JNIEnv * env, std::vector<std::string> const & src)
-{
- return ToJavaArray(env, GetStringClass(env), src,
- [](JNIEnv * env, std::string const & item)
- {
- return ToJavaString(env, item.c_str());
- });
-}
-
jclass GetStringClass(JNIEnv * env)
{
return env->FindClass(GetStringClassName());
diff --git a/android/jni/com/mapswithme/core/jni_helper.hpp b/android/jni/com/mapswithme/core/jni_helper.hpp
index 9a68e28109..5fca25e76e 100644
--- a/android/jni/com/mapswithme/core/jni_helper.hpp
+++ b/android/jni/com/mapswithme/core/jni_helper.hpp
@@ -96,7 +96,15 @@ jobjectArray ToJavaArray(JNIEnv * env, jclass clazz, TContainer const & src, TTo
std::forward<TToJavaFn>(toJavaFn));
}
-jobjectArray ToJavaStringArray(JNIEnv * env, std::vector<std::string> const & src);
+template <typename Cont>
+jobjectArray ToJavaStringArray(JNIEnv * env, Cont const & src)
+{
+ return ToJavaArray(env, GetStringClass(env), src,
+ [](JNIEnv * env, std::string const & item)
+ {
+ return ToJavaString(env, item.c_str());
+ });
+}
void DumpDalvikReferenceTables();
diff --git a/android/jni/com/mapswithme/maps/Framework.cpp b/android/jni/com/mapswithme/maps/Framework.cpp
index 5402eeaeb9..62b8dca754 100644
--- a/android/jni/com/mapswithme/maps/Framework.cpp
+++ b/android/jni/com/mapswithme/maps/Framework.cpp
@@ -17,6 +17,7 @@
#include "partners_api/mopub_ads.hpp"
#include "partners_api/megafon_countries.hpp"
+#include "storage/storage_defines.hpp"
#include "storage/storage_helpers.hpp"
#include "drape_frontend/user_event_stream.hpp"
@@ -837,7 +838,7 @@ void Framework::OnPowerSchemeChanged(power_management::Scheme const actualScheme
extern "C"
{
void CallRoutingListener(shared_ptr<jobject> listener, int errorCode,
- vector<storage::CountryId> const & absentMaps)
+ storage::CountriesSet const & absentMaps)
{
JNIEnv * env = jni::GetEnv();
jmethodID const method = jni::GetMethodID(env, *listener, "onRoutingEvent", "(I[Ljava/lang/String;)V");
@@ -1414,8 +1415,8 @@ Java_com_mapswithme_maps_Framework_nativeSetRoutingListener(JNIEnv * env, jclass
CHECK(g_framework, ("Framework isn't created yet!"));
auto rf = jni::make_global_ref(listener);
frm()->GetRoutingManager().SetRouteBuildingListener(
- [rf](routing::RouterResultCode e, storage::CountriesVec const & v) {
- CallRoutingListener(rf, static_cast<int>(e), v);
+ [rf](routing::RouterResultCode e, storage::CountriesSet const & countries) {
+ CallRoutingListener(rf, static_cast<int>(e), countries);
});
}