Ported playback service to DB* classes

This commit is contained in:
daniel oeh 2013-08-04 15:35:18 +02:00
parent 9ba3dc0d82
commit e28229a29c
3 changed files with 1560 additions and 1479 deletions

File diff suppressed because it is too large Load Diff

View File

@ -381,9 +381,11 @@ public final class DBTasks {
}
public static FeedItem getQueueSuccessorOfItem(Context context,
final long itemId) {
final long itemId, List<FeedItem> queue) {
FeedItem result = null;
List<FeedItem> queue = DBReader.getQueue(context);
if (queue == null) {
queue = DBReader.getQueue(context);
}
if (queue != null) {
Iterator<FeedItem> iterator = queue.iterator();
while (iterator.hasNext()) {

View File

@ -48,6 +48,9 @@ public abstract class QueueAccess {
return new QueueAccess() {
@Override
public boolean contains(long id) {
if (items == null) {
return false;
}
Iterator<FeedItem> it = items.iterator();
for (FeedItem i = it.next(); it.hasNext(); i = it.next()) {
if (i.getId() == id) {