mirror of
https://github.com/androidx/media.git
synced 2025-05-12 10:09:55 +08:00

Before this change, media button events are routed from `onStartCommand` of the `MediaSessionService` to the `MediaSessionCompat`, resolved by the legacy library to a session command called on `MediaSessionCompat.Callback` from where the command is delegated back to the Media3 session. With this change the keycode is resolved directly to a Media3 command that is sent to the session through the media notification controller of the session. After this change, a playback or custom command sent to the session from a notification, either as a pending intent (before API 33) or as a legacy session command, look the same and the caller is the media notification controller on all API levels. PiperOrigin-RevId: 568224123