Refactoring: move TrackPointDataSet directly into TrackPoint.

This commit is contained in:
Dennis Guse
2020-04-24 23:32:12 +02:00
parent ddb17f61cb
commit 3408ea97f4
15 changed files with 166 additions and 256 deletions
@@ -331,7 +331,7 @@ public class TrackRecordingServiceTest {
addTrack(dummyTrack, isRecording);
}
static void insertLocation(TrackRecordingServiceInterface trackRecordingService) throws InterruptedException {
private static void insertLocation(TrackRecordingServiceInterface trackRecordingService) throws InterruptedException {
insertLocation(trackRecordingService, 45.0f, 35f, 5, 10, System.currentTimeMillis());
}
@@ -342,7 +342,7 @@ public class TrackRecordingServiceTest {
/**
* Inserts a location and waits for 200ms.
*/
static void insertLocation(TrackRecordingServiceInterface trackRecordingService, double latitude, double longitude, float accuracy, long speed, long time) throws InterruptedException {
private static void insertLocation(TrackRecordingServiceInterface trackRecordingService, double latitude, double longitude, float accuracy, long speed, long time) throws InterruptedException {
Location location = new Location("gps");
location.setLongitude(longitude);
location.setLatitude(latitude);
@@ -27,6 +27,7 @@ import de.dennisguse.opentracks.content.data.TrackPoint;
import de.dennisguse.opentracks.content.data.TrackPointsColumns;
import de.dennisguse.opentracks.content.provider.ContentProviderUtils;
import de.dennisguse.opentracks.content.provider.CustomContentProvider;
import de.dennisguse.opentracks.content.sensor.SensorDataHeartRate;
import de.dennisguse.opentracks.content.sensor.SensorDataSet;
import de.dennisguse.opentracks.services.sensors.BluetoothRemoteSensorManager;
import de.dennisguse.opentracks.util.PreferencesUtils;
@@ -245,7 +246,9 @@ public class TrackRecordingServiceTestLocation {
@Override
public SensorDataSet getSensorData() {
return new SensorDataSet();
SensorDataSet sensorDataSet = new SensorDataSet();
sensorDataSet.set(new SensorDataHeartRate("sensorName", "sensorAddress", 5f));
return sensorDataSet;
}
});