media/libraries
bachinger eb322b7c2e Precedence for app provided media button receiver
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 e54a934398)
2023-04-18 15:16:46 +01:00
..
cast Fix javadoc links in media README files 2023-03-31 13:35:43 +01:00
common Temporarily use exoplayer2-hosted SVGs in media3 javadoc 2023-04-18 14:56:45 +01:00
database Fix javadoc links in media README files 2023-03-31 13:35:43 +01:00
datasource Remove remaining references to exoplayer.dev 2023-04-18 14:56:45 +01:00
datasource_cronet Fix javadoc links in media README files 2023-03-31 13:35:43 +01:00
datasource_okhttp Fix javadoc links in media README files 2023-03-31 13:35:43 +01:00
datasource_rtmp Fix javadoc links in media README files 2023-03-31 13:35:43 +01:00
decoder Fix javadoc links in media README files 2023-03-31 13:35:43 +01:00
decoder_av1 Remove Javadoc TODO from README of decoder extensions 2023-04-18 14:56:46 +01:00
decoder_ffmpeg Remove Javadoc TODO from README of decoder extensions 2023-04-18 14:56:46 +01:00
decoder_flac Remove Javadoc TODO from README of decoder extensions 2023-04-18 14:56:46 +01:00
decoder_opus Remove Javadoc TODO from README of decoder extensions 2023-04-18 14:56:46 +01:00
decoder_vp9 Remove Javadoc TODO from README of decoder extensions 2023-04-18 14:56:46 +01:00
effect Fix javadoc links in media README files 2023-03-31 13:35:43 +01:00
exoplayer Change format logged when AudioSink throws InitializationException 2023-04-18 14:59:20 +01:00
exoplayer_dash Make DefaultDashChunkSource more robust against empty segment timelines 2023-04-18 14:54:30 +01:00
exoplayer_hls Add media3 guide entries in README files 2023-03-31 13:36:24 +01:00
exoplayer_ima Remove remaining references to exoplayer.dev 2023-04-18 14:56:45 +01:00
exoplayer_rtsp Retry RTSP Setup with TCP if response with UDP is UnsupportedTransport 2023-04-18 14:55:46 +01:00
exoplayer_smoothstreaming Add media3 guide entries in README files 2023-03-31 13:36:24 +01:00
exoplayer_workmanager Fix javadoc links in media README files 2023-03-31 13:35:43 +01:00
extractor Merge pull request #11064 from haixia-meta:release-v2 2023-04-18 14:54:34 +01:00
session Precedence for app provided media button receiver 2023-04-18 15:16:46 +01:00
test_data Merge pull request #10793 from fraunhoferfokus:dash-thumbnail-support 2023-02-02 16:47:09 +00:00
test_exoplayer_playback Fix instrumentation tests not working via Gradle 2022-09-20 15:25:38 +00:00
test_session_common Update available commands when setting a new player in MediaSession 2023-04-18 15:00:09 +01:00
test_session_current Update available commands when setting a new player in MediaSession 2023-04-18 15:00:09 +01:00
test_utils Fix javadoc links in media README files 2023-03-31 13:35:43 +01:00
test_utils_robolectric Fix javadoc links in media README files 2023-03-31 13:35:43 +01:00
transformer Add media3 guide entries in README files 2023-03-31 13:36:24 +01:00
ui Add media3 guide entries in README files 2023-03-31 13:36:24 +01:00
ui_leanback Fix (another) LeanbackPlayerAdapter param name mismatch 2023-02-02 13:22:39 +00:00