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

This adds the API surface for media button preferences in MediaSession and MediaController. It closely mimics the existing custom layout infrastructure (which it will replace eventually). Compat logic: - Session: - When converting to platform custom actions, prefer to use media button preferences if both are set. - When connecting to an older Media3 controller, send the media button preferences as custom layout instead. - Controller: - Maintain a single resolved media button preferences field. - For Media3 controller receiving both values, prefer media button preferences over custom layouts. Missing functionality: - The conversion from/to custom layout and platform custom actions does not take the slot preferences into account yet. PiperOrigin-RevId: 686950100
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