forked from upstream-mirrors/OpenTracks
Make track import behavior on duplicate UUID configurable (default: import with a new UUID).
This commit is contained in:
@@ -30,7 +30,6 @@ import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import de.dennisguse.opentracks.BuildConfig;
|
||||
import de.dennisguse.opentracks.android.ContentResolverWrapper;
|
||||
@@ -245,18 +244,6 @@ public class ContentProviderUtils {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param uuid the UUID of a track.
|
||||
*/
|
||||
public Track getTrack(UUID uuid) {
|
||||
try (Cursor cursor = getTrackCursor(TracksColumns.UUID + "=?", new String[]{uuid.toString()}, TracksColumns._ID)) {
|
||||
if (cursor != null && cursor.moveToNext()) {
|
||||
return createTrack(cursor);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a track cursor.
|
||||
* The caller owns the returned cursor and is responsible for closing it.
|
||||
|
||||
Reference in New Issue
Block a user