Export: implement export to one file.

Fixes #1318
This commit is contained in:
Dennis Guse
2022-07-03 18:23:50 +02:00
parent 442e23b106
commit 2f2679c775
15 changed files with 307 additions and 144 deletions
@@ -213,7 +213,7 @@ public class ShareContentProvider extends CustomContentProvider {
PipeDataWriter<String> pipeDataWriter = (output, uri1, mimeType, opts, args) -> {
try (FileOutputStream fileOutputStream = new FileOutputStream(output.getFileDescriptor())) {
// TODO handle failure (i.e., do not export an empty file)
trackExporter.writeTrack(tracks.toArray(new Track[0]), fileOutputStream);
trackExporter.writeTrack(tracks, fileOutputStream);
} catch (IOException e) {
Log.w(TAG, "there occurred an error while sharing a file: " + e);
}