This commit is contained in:
Dennis Guse
2021-07-01 22:37:18 +02:00
parent 5899235b2b
commit c289fd174d
10 changed files with 9 additions and 27 deletions
@@ -416,21 +416,6 @@ public class ContentProviderUtils {
return markers;
}
//TODO Move to testing package
@Deprecated
public int getMarkerCount(Track.Id trackId) {
String[] projection = new String[]{"count(*) AS count"};
String selection = MarkerColumns.TRACKID + "=?";
String[] selectionArgs = new String[]{Long.toString(trackId.getId())};
try (Cursor cursor = contentResolver.query(MarkerColumns.CONTENT_URI, projection, selection, selectionArgs, MarkerColumns._ID)) {
if (cursor == null) {
return 0;
}
cursor.moveToFirst();
return cursor.getInt(0);
}
}
/**
* @return the content provider URI of the inserted marker.
*/
@@ -77,7 +77,7 @@ public class ShareContentProvider extends CustomContentProvider {
}
public static Pair<Uri, String> createURI(Set<Track.Id> trackIds, String trackName, @NonNull TrackFileFormat trackFileFormat) {
if (trackIds.size() == 0) {
if (trackIds.isEmpty()) {
throw new UnsupportedOperationException();
}