diff --git a/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java b/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java index 9473e93d06..5d29aa5b1f 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java +++ b/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java @@ -71,6 +71,7 @@ public class SavingTrackHelper extends SQLiteOpenHelper { private long duration = 0; private SelectedGpxFile currentTrack; private int points; + private int trkPoints = 0; public SavingTrackHelper(OsmandApplication ctx){ super(ctx, DATABASE_NAME, null, DATABASE_VERSION); @@ -250,6 +251,7 @@ public class SavingTrackHelper extends SQLiteOpenHelper { distance = 0; points = 0; duration = 0; + trkPoints = 0; ctx.getSelectedGpxHelper().clearPoints(currentTrack.getModifiableGpxFile()); currentTrack.getModifiableGpxFile().tracks.clear(); currentTrack.getModifiablePointsToDisplay().clear(); @@ -457,6 +459,7 @@ public class SavingTrackHelper extends SQLiteOpenHelper { lastTimeUpdated = time; WptPt pt = new GPXUtilities.WptPt(lat, lon, time, alt, speed, hdop); addTrackPoint(pt, newSegment, time); + trkPoints++; } private void addTrackPoint(WptPt pt, boolean newSegment, long time) { @@ -632,6 +635,7 @@ public class SavingTrackHelper extends SQLiteOpenHelper { distance = analysis.totalDistance; points = analysis.wptPoints; duration = analysis.timeSpan; + trkPoints = analysis.points; } private void prepareCurrentTrackForRecording() { @@ -666,6 +670,10 @@ public class SavingTrackHelper extends SQLiteOpenHelper { return points; } + public int getTrkPoints() { + return trkPoints; + } + public long getLastTimeUpdated() { return lastTimeUpdated; } diff --git a/OsmAnd/src/net/osmand/plus/myplaces/SplitSegmentDialogFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/SplitSegmentDialogFragment.java index c78d07c49a..4fb9d1ef90 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/SplitSegmentDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/SplitSegmentDialogFragment.java @@ -446,6 +446,8 @@ public class SplitSegmentDialogFragment extends DialogFragment { overviewTextView.setTextColor(defaultTextColor); overviewTextView.setText(app.getString(R.string.shared_string_overview)); if (currentGpxDisplayItem != null) { + overviewTextView.setText(app.getString(R.string.shared_string_overview) + + " (" + currentGpxDisplayItem.analysis.points + ")"); ((TextView) convertView.findViewById(R.id.fragment_count_text)).setText(app.getString(R.string.shared_string_time_span) + ": " + Algorithms.formatDuration((int) (currentGpxDisplayItem.analysis.timeSpan / 1000), app.accessibilityEnabled())); } } else { @@ -458,6 +460,7 @@ public class SplitSegmentDialogFragment extends DialogFragment { overviewTextView.append(OsmAndFormatter.getFormattedDistance((float) metricStart, app)); overviewTextView.append(" - "); overviewTextView.append(OsmAndFormatter.getFormattedDistance((float) currentGpxDisplayItem.analysis.metricEnd, app)); + overviewTextView.append(" (" + currentGpxDisplayItem.analysis.points + ")"); } else if (currentGpxDisplayItem.group.isSplitTime()) { overviewImageView.setImageDrawable(ic.getIcon(R.drawable.ic_action_time_span_16, app.getSettings().isLightContent() ? R.color.gpx_split_overview_light : R.color.gpx_split_overview_dark)); overviewTextView.setText(""); @@ -465,6 +468,7 @@ public class SplitSegmentDialogFragment extends DialogFragment { overviewTextView.append(OsmAndFormatter.getFormattedDuration((int) metricStart, app)); overviewTextView.append(" - "); overviewTextView.append(OsmAndFormatter.getFormattedDuration((int) currentGpxDisplayItem.analysis.metricEnd, app)); + overviewTextView.append(" (" + currentGpxDisplayItem.analysis.points + ")"); } ((TextView) convertView.findViewById(R.id.fragment_count_text)).setText(app.getString(R.string.of, position, adapter.getCount() - 1)); } diff --git a/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java b/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java index 8e92748937..ad41f6d13f 100644 --- a/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java +++ b/OsmAnd/src/net/osmand/plus/notifications/GpxNotification.java @@ -136,6 +136,7 @@ public class GpxNotification extends OsmandNotification { lastBuiltNoData = true; } } + notificationText = notificationText + " (" + app.getSavingTrackHelper().getTrkPoints() + ")"; if ((wasNoDataDismissed || !app.getSettings().SHOW_TRIP_REC_NOTIFICATION.get()) && !ongoing) { return null;