Allow STATE_NO_MEDIA to be unset

This commit is contained in:
Christopher Eby 2010-02-20 01:52:52 -06:00
parent 8c499cdff2
commit d7f3eaa442

@ -281,8 +281,12 @@ public class MusicPlayer implements Runnable, MediaPlayer.OnCompletionListener,
private void retrieveSongs()
{
mSongs = Song.getAllSongs();
if (mSongs == null && mState != STATE_NO_MEDIA)
if (mSongs == null) {
setState(STATE_NO_MEDIA);
} else {
if (mState == STATE_NO_MEDIA)
setState(STATE_NORMAL);
}
}
private Notification createNotfication()