media/testutils/src
tonihei ae6907e1f5 Don't rely on events after player release in ExoHostedTest
ExoHostedTest was calculating the total play time by solely listening
to onIsPlayingChanged. The last update to false (when playback ends) was relying
on a callback that was always called after the player has already been released.
This happened because of a now fixed bug where callbacks were still issued if
player.release() is called from within another callback (as in ExoHostedTest).

Fix the currently broken test by posting the release call so that all pending
events are still delivered first.

PiperOrigin-RevId: 339438863
2020-11-02 22:58:15 +00:00
..
main Don't rely on events after player release in ExoHostedTest 2020-11-02 22:58:15 +00:00
test Move Robolectric-related test utils methods to robolectricutils module 2020-10-13 16:29:50 +01:00