Merge pull request #8996 from osmandapp/StopAndSaveGPX
Combine Save GPX with Stop action
This commit is contained in:
commit
4c34cefc12
2 changed files with 1 additions and 3 deletions
|
@ -392,6 +392,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveCurrentTrack(@Nullable final Runnable onComplete, @Nullable Activity activity) {
|
public void saveCurrentTrack(@Nullable final Runnable onComplete, @Nullable Activity activity) {
|
||||||
|
stopRecording();
|
||||||
|
|
||||||
final WeakReference<Activity> activityRef = activity != null ? new WeakReference<>(activity) : null;
|
final WeakReference<Activity> activityRef = activity != null ? new WeakReference<>(activity) : null;
|
||||||
|
|
||||||
|
|
|
@ -44,9 +44,6 @@ public class GpxNotification extends OsmandNotification {
|
||||||
final OsmandMonitoringPlugin plugin = OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class);
|
final OsmandMonitoringPlugin plugin = OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class);
|
||||||
if (plugin != null) {
|
if (plugin != null) {
|
||||||
plugin.saveCurrentTrack();
|
plugin.saveCurrentTrack();
|
||||||
if (!app.getSettings().SAVE_GLOBAL_TRACK_TO_GPX.get()) {
|
|
||||||
plugin.stopRecording();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, new IntentFilter(OSMAND_SAVE_GPX_SERVICE_ACTION));
|
}, new IntentFilter(OSMAND_SAVE_GPX_SERVICE_ACTION));
|
||||||
|
|
Loading…
Reference in a new issue