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

Once a service is started as a foreground service, it must be started into the foreground. This means an app can not suppress a play command arriving from the `MediaButtonReceiver` once the receiver has started the service. This change adds a method to the `MediaButtonReceiver` that allows app to suppress starting the service to not get into this situation of wanting to suppress the play command after the service is already started. Issue: androidx/media#1528 PiperOrigin-RevId: 650280025