Close empty cursors for SongTimeline.addSongs
This commit is contained in:
parent
16d8f56764
commit
2569247cbf
@ -1149,7 +1149,13 @@ public final class PlaybackService extends Service
|
||||
*/
|
||||
public void runQuery(int mode, QueryTask query, int jumpTo)
|
||||
{
|
||||
int count = mTimeline.addSongs(mode, query.runQuery(getContentResolver()), jumpTo, query.getExtra());
|
||||
Cursor cursor = query.runQuery(getContentResolver());
|
||||
if (cursor == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
int count = mTimeline.addSongs(mode, cursor, jumpTo, query.getExtra());
|
||||
cursor.close();
|
||||
|
||||
int text;
|
||||
|
||||
|
@ -614,8 +614,6 @@ public final class SongTimeline {
|
||||
broadcastChangedSongs();
|
||||
}
|
||||
|
||||
cursor.close();
|
||||
|
||||
changed();
|
||||
|
||||
return count;
|
||||
|
Loading…
x
Reference in New Issue
Block a user