Update the notification properly when the song changes

Clearly I don't look at the notification very often :)
This commit is contained in:
Christopher Eby 2010-03-21 17:41:45 -05:00
parent f19927e97e
commit 1d629c7fa2

View File

@ -451,10 +451,11 @@ public class PlaybackService extends Service implements Runnable, MediaPlayer.On
int oldState = mState;
mState = state;
Song lastBroadcast = mLastSongBroadcast;
broadcastChange(oldState, state, song);
boolean cancelNotification;
if (state != oldState || song != mLastSongBroadcast)
if (state != oldState || song != lastBroadcast)
cancelNotification = updateNotification(song);
else
cancelNotification = false;