diff --git a/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java b/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java index 4fae499777..464c2626fd 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java +++ b/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java @@ -6,6 +6,7 @@ import android.database.sqlite.SQLiteOpenHelper; import android.text.format.DateFormat; import net.osmand.PlatformUtil; import net.osmand.data.LatLon; +import net.osmand.plus.GPXDatabase.GpxDataItem; import net.osmand.plus.GPXUtilities; import net.osmand.plus.GPXUtilities.GPXFile; import net.osmand.plus.GPXUtilities.GPXTrackAnalysis; @@ -226,6 +227,11 @@ public class SavingTrackHelper extends SQLiteOpenHelper { warnings.add(warn); return warnings; } + + GPXFile gpx = data.get(f); + GPXTrackAnalysis analysis = gpx.getAnalysis(fout.lastModified()); + GpxDataItem item = new GpxDataItem(fout, analysis); + ctx.getGpxDatabase().add(item); } } } diff --git a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java index 85e8bdb963..0e25d29d7c 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java @@ -467,7 +467,7 @@ public class GpxUiHelper { final ContextMenuItem item = adapter.getItem(position); GPXInfo info = list.get(position); - udpateGpxInfoView(v, item, info, getDataItem(info), showCurrentGpx && position == 0, app); + updateGpxInfoView(v, item, info, getDataItem(info), showCurrentGpx && position == 0, app); if (item.getSelected() == null) { v.findViewById(R.id.check_item).setVisibility(View.GONE); @@ -704,7 +704,7 @@ public class GpxUiHelper { return dlg; } - public static void udpateGpxInfoView(View v, ContextMenuItem item, GPXInfo info, GpxDataItem dataItem, boolean currentlyRecordingTrack, OsmandApplication app) { + public static void updateGpxInfoView(View v, ContextMenuItem item, GPXInfo info, GpxDataItem dataItem, boolean currentlyRecordingTrack, OsmandApplication app) { TextView viewName = ((TextView) v.findViewById(R.id.name)); viewName.setText(item.getTitle().replace("/", " • ").trim()); ImageView icon = (ImageView) v.findViewById(R.id.icon);