Delay loaded() call a little
Now called when it should be more reasonable to switch songs
This commit is contained in:
parent
c7e01fc0fe
commit
5d38771c5d
@ -363,15 +363,6 @@ public class PlaybackService extends Service implements Runnable, MediaPlayer.On
|
||||
broadcastSongChange(getSong(0));
|
||||
}
|
||||
|
||||
int i = mWatchers.beginBroadcast();
|
||||
while (--i != -1) {
|
||||
try {
|
||||
mWatchers.getBroadcastItem(i).loaded();
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
}
|
||||
mWatchers.finishBroadcast();
|
||||
|
||||
if (stateLoaded)
|
||||
retrieveSongs();
|
||||
|
||||
@ -417,6 +408,15 @@ public class PlaybackService extends Service implements Runnable, MediaPlayer.On
|
||||
if (mPendingSeek != 0)
|
||||
mMediaPlayer.seekTo(mPendingSeek);
|
||||
|
||||
int i = mWatchers.beginBroadcast();
|
||||
while (--i != -1) {
|
||||
try {
|
||||
mWatchers.getBroadcastItem(i).loaded();
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
}
|
||||
mWatchers.finishBroadcast();
|
||||
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.addAction(Intent.ACTION_HEADSET_PLUG);
|
||||
filter.addAction(Intent.ACTION_MEDIA_SCANNER_FINISHED);
|
||||
|
Loading…
x
Reference in New Issue
Block a user