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

FakeClock currently doesn't work well with Espresso and Compose UI tests because view interactions in both frameworks intentionally idle the main looper to handle pending UI effects. However, this also advances playback progress even though we want to deterministically trigger progress from the test itself. To solve this problem, we can detect the idling Robolectric call and postpone any further updates until we leave this state. PiperOrigin-RevId: 541831050