if (mShuffleMode == SHUFFLE_AUTO) {
mShuffleMode = SHUFFLE_NORMAL;
}
+ int oldId = getAudioId();
int listlength = list.length;
boolean newlist = true;
if (mPlayListLen == listlength) {
saveBookmarkIfNeeded();
openCurrent();
- if (!newlist && mPlayPos != oldpos) {
- // the queue didn't change, but the position did
+ if (oldId != getAudioId()) {
notifyChange(META_CHANGED);
}
}
*/
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);