media/library/core/src
andrewlewis f9055396b8 Post errors before calling stopInternal
When an error occurs we call stopInternal, and this clears the MediaPeriodQueue,
which in turn releases media period holders and notifies that media periods have
been released. AnalyticsCollector updates its information about media periods
using the media period release events, which means that if we post the source
error after stopInternal posts its events we can't determine what media period
the source error corresponds to.

Move error notifications before calling stopInternal, so that
AnalyticsCollector's model of the media period queue contains the loading period
at the point when it handles the error.

For consistency also move the other (non-source) error notifications to match
the new ordering.

PiperOrigin-RevId: 238559324
2019-03-15 04:54:22 +00:00
..
androidTest Use androidx.test and extensions. 2019-03-15 04:53:12 +00:00
main Post errors before calling stopInternal 2019-03-15 04:54:22 +00:00
test Post errors before calling stopInternal 2019-03-15 04:54:22 +00:00