Fix spurious sessions created for events after the playlist is cleared
Some events may arrive after the playlist is cleared (e.g. load cancellation). In this case, the DefaultPlaybackSessionManager may create a new session for the already removed item. We already have checks in place that ignore events with old windowSequenceNumbers, but these checks only work if the current session is set (i.e. the playlist is non-empty). The fix is to add the same check for empty playlists by keeping note of the last removed window sequence number. PiperOrigin-RevId: 541870812 (cherry picked from commit 656e0723e51e1bc38d558e77fa2cb0cc17e37054)
Showing
with
144 additions
and
19 deletions
Please
register
or
sign in
to comment