
We currently clear all pending messages, including the one that flushes pending commands to the MediaSession. To ensure all commands that have been called before controller.release() are still sent, we can manually trigger the flush message from the release call. Related to handling the final flush because disconnecting the controller, MediaSessionStub didn't post the removal of the controller to the session thread, creating a race condition between removing the controller and actually handling the flush. Issue: androidx/media#99 PiperOrigin-RevId: 462342860
Session test module
Tests cross-process use of the session module. To run the tests:
- Prepare a device (either an emulator or a real device) to run the tests on.
- Run
./gradlew :test-session-current:cAT