mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00

The AnalyticsCollector releases listeners lazily so that listener callbacks triggered on the application looper after SimpleExoPlayer.release() are still handled. The change in ListenerSet to post the onEvents callback on the front of the application looper changed (correctly) how onEvents are propagated, however this made the AnalyticsCollector deliver onEvents with out-of-order EventTimes. This change fixes AnalyticsCollector to trigger onPlayerReleased() and the matching onEvents() event in the correct order. #minor-release PiperOrigin-RevId: 388668739