summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Muesch <muesch@fb.com>2019-01-14 11:58:07 -0500
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-01-17 14:02:12 +0200
commit2a17d368ff8b1ca1b3894942985e5a48084e1a7f (patch)
treee12213509f534ac8c8c10596bc08525303e0e5b4
parent6e856ebb675340d2935ca6bf3148fa94e4fdd19f (diff)
downloadqtlocation-mapboxgl-2a17d368ff8b1ca1b3894942985e5a48084e1a7f.tar.gz
[Android] Allow offline and snapshotter to be disabled.
-rwxr-xr-xplatform/android/src/jni.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/platform/android/src/jni.cpp b/platform/android/src/jni.cpp
index bd66ca3b18..696b8799fb 100755
--- a/platform/android/src/jni.cpp
+++ b/platform/android/src/jni.cpp
@@ -35,19 +35,23 @@
#include "map_renderer.hpp"
#include "map_renderer_runnable.hpp"
#include "native_map_view.hpp"
+#ifndef MODULE_OFFLINE_DISABLE
#include "offline/offline_manager.hpp"
#include "offline/offline_region.hpp"
#include "offline/offline_region_definition.hpp"
#include "offline/offline_region_error.hpp"
#include "offline/offline_region_status.hpp"
+#endif
#include "style/transition_options.hpp"
#include "style/layers/layer_manager.hpp"
#include "style/sources/source.hpp"
#include "style/light.hpp"
#include "style/formatted.hpp"
#include "style/formatted_section.hpp"
+#ifndef MODULE_SNAPSHOT_DISABLE
#include "snapshotter/map_snapshotter.hpp"
#include "snapshotter/map_snapshot.hpp"
+#endif
#include "text/collator_jni.hpp"
#include "text/local_glyph_rasterizer_jni.hpp"
#include "logger.hpp"
@@ -177,6 +181,7 @@ void registerNatives(JavaVM *vm) {
ConnectivityListener::registerNative(env);
// Offline
+#ifndef MODULE_OFFLINE_DISABLE
OfflineManager::registerNative(env);
OfflineRegion::registerNative(env);
OfflineRegionDefinition::registerNative(env);
@@ -184,10 +189,13 @@ void registerNatives(JavaVM *vm) {
OfflineGeometryRegionDefinition::registerNative(env);
OfflineRegionError::registerNative(env);
OfflineRegionStatus::registerNative(env);
+#endif
// Snapshotter
+#ifndef MODULE_SNAPSHOT_DISABLE
MapSnapshotter::registerNative(env);
MapSnapshot::registerNative(env);
+#endif
// text
LocalGlyphRasterizer::registerNative(env);