This change selects the best suited media button receiver component and pending intent when creating the legacy session. This is important to ensure that a service can be started with a media button event from BT headsets after the app has been terminated. The `MediaSessionLegacyStub` selects the best suited receiver to be passed to the `MediaSessionCompat` constructor. 1. When the app has declared a broadcast receiver for `ACTION_MEDIA_BUTTON` in the manifest, this broadcast receiver is used. 2. When the session is housed in a service, the service component is used as a fallback. 3. As a last resort a receiver is created at runtime. When the `MediaSessionLegacyStub` is released, the media button receiver is removed unless the app has provided a media button receiver in the manifest. In this case we assume the app supports resuming when the BT play intent arrives at `MediaSessionService.onStartCommand`. Issue: androidx/media#167 Issue: androidx/media#27 Issue: androidx/media#314 PiperOrigin-RevId: 523638051 (cherry picked from commit e54a9343)
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| cast | Loading commit data... | |
| common | Loading commit data... | |
| database | Loading commit data... | |
| datasource | Loading commit data... | |
| datasource_cronet | Loading commit data... | |
| datasource_okhttp | Loading commit data... | |
| datasource_rtmp | Loading commit data... | |
| decoder | Loading commit data... | |
| decoder_av1 | Loading commit data... | |
| decoder_ffmpeg | Loading commit data... | |
| decoder_flac | Loading commit data... | |
| decoder_opus | Loading commit data... | |
| decoder_vp9 | Loading commit data... | |
| effect | Loading commit data... | |
| exoplayer | Loading commit data... | |
| exoplayer_dash | Loading commit data... | |
| exoplayer_hls | Loading commit data... | |
| exoplayer_ima | Loading commit data... | |
| exoplayer_rtsp | Loading commit data... | |
| exoplayer_smoothstreaming | Loading commit data... | |
| exoplayer_workmanager | Loading commit data... | |
| extractor | Loading commit data... | |
| session | Loading commit data... | |
| test_data | Loading commit data... | |
| test_exoplayer_playback | Loading commit data... | |
| test_session_common | Loading commit data... | |
| test_session_current | Loading commit data... | |
| test_utils | Loading commit data... | |
| test_utils_robolectric | Loading commit data... | |
| transformer | Loading commit data... | |
| ui | Loading commit data... | |
| ui_leanback | Loading commit data... |