media/libraries
bachinger f2cf43ccd5 Use MediaSessionImpl.onMediaButtonEvent() to dispatch key events
This change moves the handling of any media button event into
`MediaSessionImpl.onMediaButtonEvent(intent)`. This includes
the double click handling from `MediaSessionLegacyStub`.

The advantage is that everything is in one place which allows
to offer `MediaSession.Callback.onMediaButtonEvent` with which
an app can override the default implementation and handle media
buttons in a custom way.

Media button events can originate from various places:

- Delivered to `MediaSessionService.onStartCommand(Intent)`
  - A `PendingIntent` from the notification below API 33
  - An `Intent` sent to the `MediaButtonReceiver` by the system dispatched
    to the service
- Delivered to `MediaSessionCompat.Callback.onMediaButtonEvent(Intent)`
  implemented by `MediaSessionLegacyStub` during the session is active
  - Bluetooth (headset/remote control)
  - Apps/system using `AudioManager.dispatchKeyEvent(KeyEvent)`
  - Apps/system using `MediaControllerCompat.dispatchKeyEvent(keyEvent)`

Issue: androidx/media#12
Issue: androidx/media#159
Issue: androidx/media#216
Issue: androidx/media#249

#minor-release

PiperOrigin-RevId: 575231251
(cherry picked from commit a79d44edc5)
2023-10-20 08:52:55 -07:00
..
cast Move setAudioAttributes from ExoPlayer to Player 2023-09-19 06:08:37 -07:00
common Rollback of 4ebe630a80 2023-10-23 13:15:17 +01:00
container Merge pull request #491 from v-novaltd:dsparano-exo128 2023-10-23 13:15:17 +01:00
database Do not trim audio samples by changing their timestamp 2023-06-29 22:50:04 +00:00
datasource Add formatting to scheme list in DefaultDataSource javadoc 2023-10-23 13:15:17 +01:00
datasource_cronet Do not trim audio samples by changing their timestamp 2023-06-29 22:50:04 +00:00
datasource_okhttp Remove exoplayer2-only javadoc machinery from media3 2023-06-05 09:47:58 +00:00
datasource_rtmp Remove exoplayer2-only javadoc machinery from media3 2023-06-05 09:47:58 +00:00
decoder Deprecate decode-only flag. 2023-10-06 15:57:25 +01:00
decoder_av1 Add Decoder.setOutputStartTimeUs and use it in extension decoders 2023-10-06 15:57:25 +01:00
decoder_ffmpeg Explicitly mark DecoderOutputBuffer as shouldBeSkipped if needed 2023-10-06 15:57:24 +01:00
decoder_flac Add more data to e2etest dumps 2023-07-13 15:33:33 +01:00
decoder_midi Fix MIDI decoder build.gradle 2023-10-23 13:15:17 +01:00
decoder_opus Explicitly mark DecoderOutputBuffer as shouldBeSkipped if needed 2023-10-06 15:57:24 +01:00
decoder_vp9 Add Decoder.setOutputStartTimeUs and use it in extension decoders 2023-10-06 15:57:25 +01:00
effect Merge pull request #491 from v-novaltd:dsparano-exo128 2023-10-23 13:15:17 +01:00
exoplayer Merge pull request #728 from lawadr:audio-capabilities-fix 2023-10-19 05:18:21 -07:00
exoplayer_dash Add experimental opt-in to parse DASH subtitles during extraction 2023-10-23 13:14:41 +01:00
exoplayer_hls Calculate HLS live playlist refresh interval accurately 2023-10-23 13:15:16 +01:00
exoplayer_ima Bump IMA SDK version to 3.31.0 2023-09-21 05:54:13 -07:00
exoplayer_rtsp Merge pull request #491 from v-novaltd:dsparano-exo128 2023-10-23 13:15:17 +01:00
exoplayer_smoothstreaming Add functionality to transmit CMCD data using query parameters 2023-08-31 02:11:12 -07:00
exoplayer_workmanager Remove exoplayer2-only javadoc machinery from media3 2023-06-05 09:47:58 +00:00
extractor Merge pull request #491 from v-novaltd:dsparano-exo128 2023-10-23 13:15:17 +01:00
muxer Make sure the mdat box is not extended by more than 1 GB at a time. 2023-09-08 04:07:13 -07:00
session Use MediaSessionImpl.onMediaButtonEvent() to dispatch key events 2023-10-20 08:52:55 -07:00
test_data Send decode-only Opus samples in bypass mode for seekPreRoll skip 2023-10-23 13:15:17 +01:00
test_exoplayer_playback Add android.namespace to all build.gradle files 2023-05-19 17:19:15 +01:00
test_session_common Only set the queue when COMMAND_GET_TIMELINE is available 2023-10-23 13:15:17 +01:00
test_session_current Use MediaSessionImpl.onMediaButtonEvent() to dispatch key events 2023-10-20 08:52:55 -07:00
test_utils Merge pull request #491 from v-novaltd:dsparano-exo128 2023-10-23 13:15:17 +01:00
test_utils_robolectric Enable offload scheduling by default for audio-only offload playback 2023-09-13 06:46:50 -07:00
transformer Merge pull request #491 from v-novaltd:dsparano-exo128 2023-10-23 13:15:17 +01:00
ui Update translations in the ui module 2023-10-20 02:49:23 -07:00
ui_leanback Prevent forwarding of zero video size to Leanback 2023-08-30 12:20:51 -07:00