diff --git a/android/jni/com/mapswithme/maps/editor/Editor.cpp b/android/jni/com/mapswithme/maps/editor/Editor.cpp index cab55b0b08..f86aed9589 100644 --- a/android/jni/com/mapswithme/maps/editor/Editor.cpp +++ b/android/jni/com/mapswithme/maps/editor/Editor.cpp @@ -356,7 +356,14 @@ Java_com_mapswithme_maps_editor_Editor_nativeGetMwmVersion(JNIEnv * env, jclass JNIEXPORT void JNICALL Java_com_mapswithme_maps_editor_Editor_nativeCreateNote(JNIEnv * env, jclass clazz, jdouble lat, jdouble lon, jstring text) { - Editor::Instance().CreateNote(ms::LatLon(lat, lon), jni::ToNativeString(env, text)); + Editor::Instance().CreateNote(ms::LatLon(lat, lon), g_editableMapObject.GetID(), jni::ToNativeString(env, text)); +} + +// static void nativePlaceDoesNotExist(double lat, double lon); +JNIEXPORT void JNICALL +Java_com_mapswithme_maps_editor_Editor_nativePlaceDoesNotExist(JNIEnv * env, jclass clazz, jdouble lat, jdouble lon) +{ + Editor::Instance().CreateNote(ms::LatLon(lat, lon), g_editableMapObject.GetID(), osm::Editor::kPlaceDoesNotExistMessage); } // static boolean nativeIsHouseValid(String houseNumber); diff --git a/android/src/com/mapswithme/maps/editor/Editor.java b/android/src/com/mapswithme/maps/editor/Editor.java index 0ef7cf97db..d66171b6b2 100644 --- a/android/src/com/mapswithme/maps/editor/Editor.java +++ b/android/src/com/mapswithme/maps/editor/Editor.java @@ -141,6 +141,7 @@ public final class Editor public static native long nativeGetMwmVersion(); public static native void nativeCreateNote(double lat, double lon, String text); + public static native void nativePlaceDoesNotExist(double lat, double lon); public static native boolean nativeIsHouseValid(String houseNumber); } diff --git a/android/src/com/mapswithme/maps/editor/ReportFragment.java b/android/src/com/mapswithme/maps/editor/ReportFragment.java index 09c7cd5a7b..571e6de454 100644 --- a/android/src/com/mapswithme/maps/editor/ReportFragment.java +++ b/android/src/com/mapswithme/maps/editor/ReportFragment.java @@ -71,6 +71,12 @@ public class ReportFragment extends BaseMwmToolbarFragment implements View.OnCli mToolbarController.onUpClick(); } + private void sendNotExist() + { + Editor.nativePlaceDoesNotExist(mLat, mLon); + mToolbarController.onUpClick(); + } + @Override public void onClick(View v) { @@ -79,7 +85,7 @@ public class ReportFragment extends BaseMwmToolbarFragment implements View.OnCli case R.id.problem_not_exist: // case R.id.problem_closed_repair: // case R.id.problem_duplicated_place: - send((String)v.getTag()); + sendNotExist(); break; case R.id.problem_other: