use of net.osmand.plus.track.helpers.GpxSelectionHelper.SelectedGpxFile in project Osmand by osmandapp.
the class FileUtils method removeGpxFile.
public static boolean removeGpxFile(@NonNull OsmandApplication app, @NonNull File file) {
if (file.exists()) {
GpxSelectionHelper helper = app.getSelectedGpxHelper();
SelectedGpxFile selected = helper.getSelectedFileByPath(file.getAbsolutePath());
file.delete();
app.getGpxDbHelper().remove(file);
if (selected != null && selected.getGpxFile() != null) {
helper.selectGpxFile(selected.getGpxFile(), false, false);
}
return true;
}
return false;
}
Aggregations