do not pass complete track data to exporter factory method just to knwo if there is more then one track to export

This commit is contained in:
thrillfall
2020-08-11 17:23:56 +02:00
committed by Dennis Guse
parent 47c259fa9a
commit f4b585b830
4 changed files with 31 additions and 26 deletions
@@ -208,7 +208,8 @@ public class ShareContentProvider extends CustomContentProvider implements ICont
tracks[i] = contentProviderUtils.getTrack(trackIds[i]);
}
final TrackExporter trackExporter = getTrackFileFormat(uri).newTrackExporter(getContext(), tracks);
boolean hasMultipleTracks = tracks.length > 1;
final TrackExporter trackExporter = getTrackFileFormat(uri).newTrackExporter(getContext(), hasMultipleTracks);
PipeDataWriter<String> pipeDataWriter = (output, uri1, mimeType, opts, args) -> {
try (FileOutputStream fileOutputStream = new FileOutputStream(output.getFileDescriptor())) {