mirror of
https://github.com/androidx/media.git
synced 2025-05-09 16:40:55 +08:00

Before this change a timeline update of a live content source has produced a timeline refresh before passing the timeline to the ads loader. When in such a case the ads loader updates the ad playback state, a second timeline refresh is trigger that then includes the updated ad data also. This can result in a timeline being pulished with stale ad information. This change prevents this by introducing a boolean return value that requires the ads loader to signal whether the ad playback state has been passed back to the source. This ensures that an update of timeline and ad playback state produces a single timeline update and is published in sync. PiperOrigin-RevId: 748288650