playback: check for init before applying state
Check if the playback state still has not been initialized once we restore. This prevents one from playing a song while the restore task is on-going and then having it overwritten by the restored state.
This commit is contained in:
parent
304fccf0f9
commit
79637f7603
1 changed files with 1 additions and 1 deletions
|
@ -363,7 +363,7 @@ class PlaybackStateManager private constructor() {
|
|||
|
||||
synchronized(this) {
|
||||
val exists =
|
||||
if (state != null) {
|
||||
if (state != null && !isInitialized) {
|
||||
// Continuing playback while also possibly doing drastic state updates is
|
||||
// a bad idea, so pause.
|
||||
isPlaying = false
|
||||
|
|
Loading…
Reference in a new issue