do not call setDataSource() if we are going to destroy the object anyway
This commit is contained in:
parent
e60be1af0e
commit
b14299e6da
@ -1104,8 +1104,6 @@ public final class PlaybackService extends Service
|
||||
try {
|
||||
mMediaPlayerInitialized = false;
|
||||
mMediaPlayer.reset();
|
||||
mMediaPlayer.setDataSource(song.path);
|
||||
mMediaPlayer.prepare();
|
||||
|
||||
if(mPreparedMediaPlayer != null &&
|
||||
mPreparedMediaPlayer.isPlaying()) {
|
||||
@ -1114,6 +1112,10 @@ public final class PlaybackService extends Service
|
||||
mMediaPlayer = mPreparedMediaPlayer;
|
||||
mPreparedMediaPlayer = null;
|
||||
}
|
||||
else {
|
||||
mMediaPlayer.setDataSource(song.path);
|
||||
mMediaPlayer.prepare();
|
||||
}
|
||||
|
||||
mMediaPlayerInitialized = true;
|
||||
triggerGaplessUpdate();
|
||||
|
Loading…
x
Reference in New Issue
Block a user