Track is now a record.

Create Track directly.
This commit is contained in:
Dennis Guse
2025-11-27 20:34:51 +01:00
parent 21404fed50
commit 12d1a50995
6 changed files with 65 additions and 101 deletions
@@ -128,7 +128,7 @@ public class ContentProviderUtils {
null,
null
);
return new Track(
new Track.Id(cursor.getLong(idIndex)),
UUIDUtils.fromBytes(cursor.getBlob(uuidIndex)),
@@ -251,6 +251,7 @@ public class ContentProviderUtils {
* @return the content provider URI of the inserted track.
*/
public Track.Id insertTrack(Track track) {
//TODO Unset trackId
Uri uri = contentResolver.insert(TracksColumns.CONTENT_URI, createContentValues(track));
return new Track.Id(ContentUris.parseId(uri));
}