forked from upstream-mirrors/OpenTracks
Cleanup: ContentProviderUtils.getMarkerCursor() has an optional parameter.
This commit is contained in:
@@ -238,7 +238,7 @@ public class GPXTrackExporter implements TrackExporter {
|
||||
}
|
||||
|
||||
private void writeMarkers(Track track) throws InterruptedException {
|
||||
try (Cursor cursor = contentProviderUtils.getMarkerCursor(track.getId(), -1)) {
|
||||
try (Cursor cursor = contentProviderUtils.getMarkerCursor(track.getId())) {
|
||||
if (cursor != null && cursor.moveToFirst()) {
|
||||
for (int i = 0; i < cursor.getCount(); i++) {
|
||||
if (Thread.interrupted()) {
|
||||
|
||||
@@ -136,7 +136,7 @@ public class KMLTrackExporter implements TrackExporter {
|
||||
|
||||
private void writeMarkers(Track track) throws InterruptedException {
|
||||
boolean hasMarkers = false;
|
||||
try (Cursor cursor = contentProviderUtils.getMarkerCursor(track.getId(), -1)) {
|
||||
try (Cursor cursor = contentProviderUtils.getMarkerCursor(track.getId())) {
|
||||
if (cursor != null && cursor.moveToFirst()) {
|
||||
for (int i = 0; i < cursor.getCount(); i++) {
|
||||
if (Thread.interrupted()) {
|
||||
|
||||
@@ -89,7 +89,7 @@ public class KMZTrackExporter implements TrackExporter {
|
||||
|
||||
private void addImages(Context context, List<Track> tracks, ZipOutputStream zipOutputStream) throws InterruptedException, IOException {
|
||||
for (Track track : tracks) {
|
||||
try (Cursor cursor = contentProviderUtils.getMarkerCursor(track.getId(), -1)) {
|
||||
try (Cursor cursor = contentProviderUtils.getMarkerCursor(track.getId())) {
|
||||
if (cursor != null && cursor.moveToFirst()) {
|
||||
for (int i = 0; i < cursor.getCount(); i++) {
|
||||
if (Thread.interrupted()) {
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package de.dennisguse.opentracks.io.file.importer;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
Reference in New Issue
Block a user