OSDN Git Service

Merge commit 'remotes/korg/cupcake' into merge
authorJean-Baptiste Queru <jbq@google.com>
Tue, 17 Mar 2009 23:08:48 +0000 (16:08 -0700)
committerJean-Baptiste Queru <jbq@google.com>
Tue, 17 Mar 2009 23:08:48 +0000 (16:08 -0700)
1  2 
src/com/android/music/MediaPlaybackService.java

@@@ -905,15 -977,8 +977,14 @@@ public class MediaPlaybackService exten
       */
      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);
-             mWasPlaying = true;
  
              NotificationManager nm = (NotificationManager)
              getSystemService(Context.NOTIFICATION_SERVICE);