From 6a6fd45285ffdf6e4d74a5cf178e236d75700b99 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 20 Jan 2016 23:26:54 +0100 Subject: [PATCH] clear the songs list before filling it to be prevent duplicating --- .../java/musicplayer/simplemobiletools/com/MusicService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/musicplayer/simplemobiletools/com/MusicService.java b/app/src/main/java/musicplayer/simplemobiletools/com/MusicService.java index 0b84fed1..bacde4bd 100644 --- a/app/src/main/java/musicplayer/simplemobiletools/com/MusicService.java +++ b/app/src/main/java/musicplayer/simplemobiletools/com/MusicService.java @@ -70,6 +70,7 @@ public class MusicService extends Service } private void fillPlaylist() { + songs.clear(); final ContentResolver musicResolver = getContentResolver(); final Uri musicUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI; final Cursor musicCursor = musicResolver.query(musicUri, null, null, null, null);