Implement Track.Id and Waypoint.Id (with tests).

Fixes #276.
This commit is contained in:
Dennis Guse
2020-08-19 18:10:13 +02:00
parent bcbaf4985a
commit 0ab14e0f3d
20 changed files with 124 additions and 58 deletions
@@ -86,7 +86,7 @@ public class ShareContentProvider extends CustomContentProvider implements ICont
StringBuilder trackIdBuilder = new StringBuilder();
for (Track.Id trackId : trackIds) {
trackIdBuilder.append(trackId).append(TRACKID_DELIMITER);
trackIdBuilder.append(trackId.getId()).append(TRACKID_DELIMITER);
}
trackIdBuilder.deleteCharAt(trackIdBuilder.lastIndexOf(TRACKID_DELIMITER));
@@ -221,7 +221,7 @@ public class ShareContentProvider extends CustomContentProvider implements ICont
PipeDataWriter<String> pipeDataWriter = (output, uri1, mimeType, opts, args) -> {
try (FileOutputStream fileOutputStream = new FileOutputStream(output.getFileDescriptor())) {
trackExporter.writeTrack(tracks, fileOutputStream);
trackExporter.writeTrack(tracks.toArray(new Track[0]), fileOutputStream);
} catch (IOException e) {
Log.w(TAG, "there occurred an error while sharing a file: " + e);
}