Bugfix: export of images via KMZ is now working.

This commit is contained in:
Dennis Guse
2019-09-14 23:35:28 +02:00
parent 45b13ea813
commit 56685a9dec
7 changed files with 50 additions and 36 deletions
@@ -960,8 +960,7 @@ public class ContentProviderUtilsImpl implements ContentProviderUtils {
@Override
public Uri insertTrackPoint(Location location, long trackId) {
return contentResolver.insert(
TrackPointsColumns.CONTENT_URI, createContentValues(location, trackId));
return contentResolver.insert(TrackPointsColumns.CONTENT_URI, createContentValues(location, trackId));
}
/**
@@ -1071,10 +1070,8 @@ public class ContentProviderUtilsImpl implements ContentProviderUtils {
* @param selectionArgs the selection arguments
* @param sortOrder the sort order
*/
private Cursor getTrackPointCursor(
String[] projection, String selection, String[] selectionArgs, String sortOrder) {
return contentResolver.query(
TrackPointsColumns.CONTENT_URI, projection, selection, selectionArgs, sortOrder);
private Cursor getTrackPointCursor(String[] projection, String selection, String[] selectionArgs, String sortOrder) {
return contentResolver.query(TrackPointsColumns.CONTENT_URI, projection, selection, selectionArgs, sortOrder);
}
/**
@@ -196,7 +196,7 @@ public class ShareContentProvider extends CustomContentProvider implements ICont
@Override
public void writeDataToPipe(@NonNull ParcelFileDescriptor output, @NonNull Uri uri, @NonNull String mimeType, @Nullable Bundle opts, @Nullable String args) {
try (FileOutputStream fileOutputStream = new FileOutputStream(output.getFileDescriptor())) {
trackExporter.writeTrack(fileOutputStream);
trackExporter.writeTrack(getContext(), fileOutputStream);
} catch (IOException e) {
Log.w(TAG, "there occurred an error while sharing a file: " + e);
}