Disable default gpx tracking

This commit is contained in:
Victor Shcherb 2013-01-09 23:29:03 +01:00
parent 47385b4805
commit 13b906af52
2 changed files with 2 additions and 3 deletions

View file

@ -34,6 +34,7 @@ import net.osmand.plus.ResourceManager;
import net.osmand.plus.TargetPointsHelper; import net.osmand.plus.TargetPointsHelper;
import net.osmand.plus.Version; import net.osmand.plus.Version;
import net.osmand.plus.activities.search.SearchActivity; 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.RouteProvider.GPXRouteParams;
import net.osmand.plus.routing.RoutingHelper; import net.osmand.plus.routing.RoutingHelper;
import net.osmand.plus.routing.RoutingHelper.RouteCalculationProgressCallback; import net.osmand.plus.routing.RoutingHelper.RouteCalculationProgressCallback;
@ -866,7 +867,7 @@ public class MapActivity extends AccessibleActivity implements IMapLocationListe
long locationTime = System.currentTimeMillis(); long locationTime = System.currentTimeMillis();
// write only with 50 meters accuracy // write only with 50 meters accuracy
if (!location.hasAccuracy() || location.getAccuracy() < ACCURACY_FOR_GPX_AND_ROUTING) { 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(), savingTrackHelper.insertData(location.getLatitude(), location.getLongitude(), location.getAltitude(),
location.getSpeed(), location.getAccuracy(), locationTime, settings); location.getSpeed(), location.getAccuracy(), locationTime, settings);
} }

View file

@ -1,6 +1,5 @@
package net.osmand.plus.api; package net.osmand.plus.api;
import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.util.List; import java.util.List;
@ -11,7 +10,6 @@ import net.osmand.data.Amenity;
import net.osmand.plus.NavigationService; import net.osmand.plus.NavigationService;
import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandApplication;
import net.osmand.plus.PoiFilter; import net.osmand.plus.PoiFilter;
import net.osmand.plus.ResourceManager;
import net.osmand.plus.TargetPointsHelper; import net.osmand.plus.TargetPointsHelper;
import net.osmand.plus.access.AccessibilityMode; import net.osmand.plus.access.AccessibilityMode;
import net.osmand.plus.render.NativeOsmandLibrary; import net.osmand.plus.render.NativeOsmandLibrary;