diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index f91e8a79e0..784a42649f 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -34,6 +34,7 @@ import net.osmand.plus.ResourceManager; import net.osmand.plus.TargetPointsHelper; import net.osmand.plus.Version; import net.osmand.plus.activities.search.SearchActivity; +import net.osmand.plus.monitoring.OsmandMonitoringPlugin; import net.osmand.plus.routing.RouteProvider.GPXRouteParams; import net.osmand.plus.routing.RoutingHelper; import net.osmand.plus.routing.RoutingHelper.RouteCalculationProgressCallback; @@ -866,7 +867,7 @@ public class MapActivity extends AccessibleActivity implements IMapLocationListe long locationTime = System.currentTimeMillis(); // write only with 50 meters accuracy if (!location.hasAccuracy() || location.getAccuracy() < ACCURACY_FOR_GPX_AND_ROUTING) { - if (settings.SAVE_TRACK_TO_GPX.get()) { + if (settings.SAVE_TRACK_TO_GPX.get() && OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class) != null) { savingTrackHelper.insertData(location.getLatitude(), location.getLongitude(), location.getAltitude(), location.getSpeed(), location.getAccuracy(), locationTime, settings); } diff --git a/OsmAnd/src/net/osmand/plus/api/InternalOsmAndAPIImpl.java b/OsmAnd/src/net/osmand/plus/api/InternalOsmAndAPIImpl.java index c959ad80bb..53f8f0eef6 100644 --- a/OsmAnd/src/net/osmand/plus/api/InternalOsmAndAPIImpl.java +++ b/OsmAnd/src/net/osmand/plus/api/InternalOsmAndAPIImpl.java @@ -1,6 +1,5 @@ package net.osmand.plus.api; -import java.io.File; import java.io.IOException; import java.io.InputStream; import java.util.List; @@ -11,7 +10,6 @@ import net.osmand.data.Amenity; import net.osmand.plus.NavigationService; import net.osmand.plus.OsmandApplication; import net.osmand.plus.PoiFilter; -import net.osmand.plus.ResourceManager; import net.osmand.plus.TargetPointsHelper; import net.osmand.plus.access.AccessibilityMode; import net.osmand.plus.render.NativeOsmandLibrary;