mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 04:53:36 +00:00
[android] Use separate function to check for MapTooOldToEdit
Signed-off-by: map-per <map-per@gmx.de>
This commit is contained in:
@@ -587,4 +587,11 @@ JNIEXPORT jstring JNICALL Java_app_organicmaps_sdk_downloader_MapManager_nativeG
|
||||
storage::CountryId const & res = g_framework->GetPlacePageInfo().GetCountryId();
|
||||
return (res == storage::kInvalidCountryId ? nullptr : jni::ToJavaString(env, res));
|
||||
}
|
||||
|
||||
// static native boolean nativeIsMapTooOldToEdit(String countryId);
|
||||
JNIEXPORT jboolean JNICALL Java_app_organicmaps_sdk_downloader_MapManager_nativeIsMapTooOldToEdit(JNIEnv *env, jclass clazz,
|
||||
jstring country_id)
|
||||
{
|
||||
return GetStorage().IsMapTooOldToEdit(jni::ToNativeString(env, country_id));
|
||||
}
|
||||
} // extern "C"
|
||||
|
||||
@@ -261,4 +261,9 @@ public final class MapManager
|
||||
* Returns country ID which the current PP object points to, or {@code null}.
|
||||
*/
|
||||
public static native @Nullable String nativeGetSelectedCountry();
|
||||
|
||||
/**
|
||||
* Returns true when the map exists and is too old for map editing.
|
||||
*/
|
||||
public static native boolean nativeIsMapTooOldToEdit(String countryId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user