OSDN Git Service

Merge commit 'korg/cupcake'
authorThe Android Open Source Project <initial-contribution@android.com>
Fri, 27 Mar 2009 22:31:12 +0000 (15:31 -0700)
committerThe Android Open Source Project <initial-contribution@android.com>
Fri, 27 Mar 2009 22:31:12 +0000 (15:31 -0700)
1  2 
src/com/android/music/MediaPlaybackService.java

@@@ -760,6 -760,7 +760,7 @@@ public class MediaPlaybackService exten
              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);