Return updateState to old behavior

This commit is contained in:
Christopher Eby 2010-03-26 22:05:00 -05:00
parent 210e2c5513
commit 001215190e

View File

@ -473,27 +473,25 @@ public class PlaybackService extends Service implements Runnable, MediaPlayer.On
else
cancelNotification = false;
if (mState != oldState) {
if ((state & FLAG_PLAYING) != 0) {
if ((state & FLAG_PLAYING) != 0 && (oldState & FLAG_PLAYING) == 0) {
startForegroundCompat(NOTIFICATION_ID, mNotification);
if (mMediaPlayerInitialized) {
synchronized (mMediaPlayer) {
mMediaPlayer.start();
}
}
} else {
} else if ((state & FLAG_PLAYING) == 0 && (oldState & FLAG_PLAYING) != 0) {
stopForegroundCompat(cancelNotification);
if (mMediaPlayerInitialized) {
synchronized (mMediaPlayer) {
mMediaPlayer.pause();
}
}
}
return true;
} else {
return false;
}
return true;
}
private void retrieveSongs()