Ported playback service to DB* classes
This commit is contained in:
parent
9ba3dc0d82
commit
e28229a29c
File diff suppressed because it is too large
Load Diff
|
@ -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()) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue