Some cleanup on DBReader:
- Taking more care of closing adapter and cursors. - Dropping unneeded MoveToFirst where we manage the cursor. - Better feed association implementation. - Dropping one of getFeedItems() methods that looks unused.
This commit is contained in:
parent
98001b51d9
commit
6eba46a7ba
File diff suppressed because it is too large
Load Diff
|
@ -1156,7 +1156,9 @@ public class PodDBAdapter {
|
|||
+ TABLE_NAME_FEED_IMAGES + " WHERE " + KEY_ID + " IN "
|
||||
+ buildInOperator(neededLength), parts);
|
||||
}
|
||||
return new MergeCursor(cursors);
|
||||
Cursor result = new MergeCursor(cursors);
|
||||
result.moveToFirst();
|
||||
return result;
|
||||
} else {
|
||||
return db.query(TABLE_NAME_FEED_IMAGES, null, KEY_ID + " IN "
|
||||
+ buildInOperator(length), imageIds, null, null, null);
|
||||
|
@ -1341,7 +1343,9 @@ public class PodDBAdapter {
|
|||
+ TABLE_NAME_FEED_MEDIA + " WHERE " + KEY_FEEDITEM + " IN "
|
||||
+ buildInOperator(neededLength), parts);
|
||||
}
|
||||
return new MergeCursor(cursors);
|
||||
Cursor result = new MergeCursor(cursors);
|
||||
result.moveToFirst();
|
||||
return result;
|
||||
} else {
|
||||
return db.query(TABLE_NAME_FEED_MEDIA, null, KEY_FEEDITEM + " IN "
|
||||
+ buildInOperator(length), itemIds, null, null, null);
|
||||
|
|
Loading…
Reference in New Issue