*/
public void play() {
if (mPlayer.isInitialized()) {
+ // if we are at the end of the song, go to the next song first
+ if (mRepeatMode != REPEAT_CURRENT &&
+ mPlayer.position() >= mPlayer.duration() - 1) {
+ next(true);
+ }
+
mPlayer.start();
setForeground(true);