Fixed crash when losing audio focus
This commit is contained in:
parent
b3c3e04fd9
commit
119892f6b5
|
@ -325,6 +325,9 @@ public class PlaybackService extends Service {
|
|||
if (player.isPlaying()) {
|
||||
Log.d(TAG, "Pausing playback.");
|
||||
player.pause();
|
||||
if (positionSaver != null) {
|
||||
positionSaver.cancel(true);
|
||||
}
|
||||
saveCurrentPosition();
|
||||
setStatus(PlayerStatus.PAUSED);
|
||||
stopForeground(true);
|
||||
|
|
Loading…
Reference in New Issue