A more complete fix needs a music service rewrite - I've tried to find a
complete solution that doesn't need a rewrite but cannot figure out a good one
For now this will make all of them but the first one of the next round show up
https://cyanogen.atlassian.net/browse/MUSIC-189
Change-Id: Idd64754001a679cf9a9b16f71d285e0fb4dd1b6d
}
}
- // if we've played each track at least once
- if (minNumPlays > 0) {
- // if we aren't repeating all and we're not forcing a track
- // return no more tracks
- if (mRepeatMode != REPEAT_ALL && !force) {
+ // if we've played each track at least once and all tracks have been played an equal
+ // # of times and we aren't repeating all and we're not forcing a track, then
+ // return no more tracks
+ if (minNumPlays > 0 && numTracksWithMinNumPlays == numTracks
+ && mRepeatMode != REPEAT_ALL && !force) {
return -1;
- }
}
// else pick a track from the least number of played tracks
final AudioPlayerFragment audioPlayerFragment = mReference.get();
final String action = intent.getAction();
if (action.equals(MusicPlaybackService.META_CHANGED)) {
+ // if we are repeating current and the track has changed, re-create the adapter
+ if (MusicUtils.getRepeatMode() == MusicPlaybackService.REPEAT_CURRENT) {
+ mReference.get().createAndSetAdapter();
+ }
+
// Current info
audioPlayerFragment.updateNowPlayingInfo();
audioPlayerFragment.dismissPopupMenu();