diff --git a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java index 9ae44d87b1..d7aba2f321 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java @@ -392,6 +392,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin { } public void saveCurrentTrack(@Nullable final Runnable onComplete, @Nullable Activity activity) { + stopRecording(); final WeakReference activityRef = activity != null ? new WeakReference<>(activity) : null; diff --git a/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java b/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java index dfb955c610..b84640bcfe 100644 --- a/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java +++ b/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java @@ -44,9 +44,6 @@ public class GpxNotification extends OsmandNotification { final OsmandMonitoringPlugin plugin = OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class); if (plugin != null) { plugin.saveCurrentTrack(); - if (!app.getSettings().SAVE_GLOBAL_TRACK_TO_GPX.get()) { - plugin.stopRecording(); - } } } }, new IntentFilter(OSMAND_SAVE_GPX_SERVICE_ACTION));