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

Media button event coming from the `MediaSessionService` are delegated to the `MediaSessionImpl` and then sent to the session by using the `MediaSessionStub` directly instead of using the `MediaController` API. Splitting the `MediaController.Listener` and `Player.Listener` in `MediaNotificationManager` got reverted, and both listener are set to the controller as before. This reverts the change that introduced a different timing behaviour. It still holds, that a listener registered on a `MediaController` that calls a method like `play()` is called immediately and before the call has arrived at the player. This change works around this behaviour from the library side by calling `MediaSessionStub` directly with a `ControllerInfo`. #minor-release PiperOrigin-RevId: 573918850
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