diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 6984349329..345cde9a3f 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -11,6 +11,7 @@ Thx - Hardy --> + Are you sure you want to clear recorded data? Custom profile Angle: %s° Angle diff --git a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java index 1009ea771e..8ed174678e 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java @@ -288,7 +288,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin { public void controlDialog(final Activity activity, final boolean showTrackSelection) { final boolean wasTrackMonitored = settings.SAVE_GLOBAL_TRACK_TO_GPX.get(); - boolean nightMode; + final boolean nightMode; if (activity instanceof MapActivity) { nightMode = app.getDaynightHelper().isNightModeForMapControls(); } else { @@ -328,7 +328,16 @@ public class OsmandMonitoringPlugin extends OsmandPlugin { startGPXMonitoring(activity, showTrackSelection); } } else if (item == R.string.clear_recorded_data) { - app.getSavingTrackHelper().clearRecordedData(true); + AlertDialog.Builder builder = new AlertDialog.Builder(UiUtilities.getThemedContext(activity, nightMode)); + builder.setTitle(R.string.clear_recorded_data_warning); + builder.setNegativeButton(R.string.shared_string_no, null).setPositiveButton( + R.string.shared_string_clear, new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + app.getSavingTrackHelper().clearRecordedData(true); + } + }); + builder.show(); } else if(item == R.string.gpx_monitoring_stop) { stopRecording(); } else if(item == R.string.gpx_start_new_segment) {