StatisticsRecordingFragment: set speed=0 when TrackPoint is outdated.
@@ -111,6 +111,12 @@ public class StatisticsRecordingFragment extends Fragment implements TrackDataLi
public void run() {
if (isResumed() && isSelectedTrackRecording()) {
if (!isSelectedTrackPaused() && lastTrackStatistics != null) {
+ synchronized (this) {
+ if (lastTrackPoint != null && lastTrackPoint.hasLocation() && !lastTrackPoint.isRecent()) {
+ lastTrackPoint = null;
+ setLocationValues();
+ }
+ }
updateTotalTime();
updateSensorDataUI();
}
@@ -222,6 +228,7 @@ public class StatisticsRecordingFragment extends Fragment implements TrackDataLi
if (isResumed()) {
getActivity().runOnUiThread(() -> {
if (isResumed()) {
+ synchronized (this) {
this.lastTrackPoint = newLastTrackPoint;
if (!isSelectedTrackRecording() || isSelectedTrackPaused()) {
@@ -233,6 +240,7 @@ public class StatisticsRecordingFragment extends Fragment implements TrackDataLi
}
setLocationValues();
}
+ }
});
}
}
