From ae05d79336f0bd430cdbf0cc4c91d8317631f23e Mon Sep 17 00:00:00 2001 From: Dmitry Yunitsky Date: Mon, 8 Feb 2016 13:12:50 +0300 Subject: [PATCH] [android] Added method to clear edits. --- android/jni/com/mapswithme/maps/editor/Editor.cpp | 6 ++++++ android/src/com/mapswithme/maps/editor/Editor.java | 2 ++ 2 files changed, 8 insertions(+) diff --git a/android/jni/com/mapswithme/maps/editor/Editor.cpp b/android/jni/com/mapswithme/maps/editor/Editor.cpp index baf0db3203..af37d16d73 100644 --- a/android/jni/com/mapswithme/maps/editor/Editor.cpp +++ b/android/jni/com/mapswithme/maps/editor/Editor.cpp @@ -118,4 +118,10 @@ Java_com_mapswithme_maps_editor_Editor_nativeGetStats(JNIEnv * env, jclass clazz env->SetLongArrayRegion(result, 0, 3, buf); return result; } + +JNIEXPORT void JNICALL +Java_com_mapswithme_maps_editor_Editor_nativeClearLocalEdits(JNIEnv * env, jclass clazz) +{ + Editor::Instance().ClearAllLocalEdits(); +} } // extern "C" diff --git a/android/src/com/mapswithme/maps/editor/Editor.java b/android/src/com/mapswithme/maps/editor/Editor.java index 2ed6c73eb4..328a78b81b 100644 --- a/android/src/com/mapswithme/maps/editor/Editor.java +++ b/android/src/com/mapswithme/maps/editor/Editor.java @@ -77,4 +77,6 @@ public final class Editor * @return array [total edits count, uploaded edits count, last upload timestamp] */ public static native long[] nativeGetStats(); + + public static native void nativeClearLocalEdits(); }