Fixed some of the apps most common FCs according to its fabric.io statistics

This commit is contained in:
Karim Abou Zeid 2015-04-19 23:07:37 +02:00
commit 5a25738993
3 changed files with 34 additions and 21 deletions

View file

@ -231,8 +231,10 @@ public class MusicPlayerRemote {
public static void shuffleAllSongs(final Context context) {
ArrayList<Song> songs = SongLoader.getAllSongs(context);
MusicPlayerRemote.openQueue(songs, new Random().nextInt(songs.size()), true);
forceSetShuffleMode(context, MusicService.SHUFFLE_MODE_SHUFFLE);
if (!songs.isEmpty()) {
MusicPlayerRemote.openQueue(songs, new Random().nextInt(songs.size()), true);
forceSetShuffleMode(context, MusicService.SHUFFLE_MODE_SHUFFLE);
}
}
public static void playNext(Song song) {