Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08db4650 authored by Raj Yengisetty's avatar Raj Yengisetty Committed by linus_lee
Browse files

Eleven: Fix cursor finalized prior to close warning messages

https://cyanogen.atlassian.net/browse/MUSIC-152

Change-Id: I7b3425621700fcb334ff4d4e0cc54c9994fda420
parent e4fb5611
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1172,8 +1172,11 @@ public final class MusicUtils {
                MediaStore.Audio.Playlists.Members.getContentUri("external", playlistId),
                new String[]{BaseColumns._ID}, MusicUtils.MUSIC_ONLY_SELECTION, null, null);

        if (c != null && c.moveToFirst()) {
            int count = c.getCount();
        if (c != null) {
            int count = 0;
            if (c.moveToFirst()) {
                count = c.getCount();
            }
            c.close();
            c = null;
            return count;