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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user