media/libraries
bachinger dee83cc7db Update session position info on timeline change
This fixes an inconsistent state of the `PlayerInfo` when the index of the playing
media item is changed by a playlist modification. In this inconsistent state,
calling `Playerinfo.getCurrentMediaItem` can produce an
`ArrayIndexOutOfBoundException` (see stack trace in GH issue).

This change takes the following measurements:

- always update sessionPosition and timeline of the PlayerInfo together in
  `MediaSessionImpl.PlayerListener` where the PlayerInfo originates from
- add an assertion to avoid building a `PlayerInfo` instance in an inconsistent
  state
- reduce the window of opportunity for concurrent access to
  `mediaSessionImpl.playerInfo` when dispatching player info changes in
  `MediaSessionImpl`

Issue: androidx/media#51
PiperOrigin-RevId: 444812661
2022-05-09 10:16:33 +01:00
..
cast Rename Player.COMMAND_GET_TRACK_INFOS to COMMAND_GET_TRACKS 2022-04-26 14:41:41 +01:00
common Don't use API 26 SurfaceTexture constructor in frame processor tests. 2022-04-26 14:53:31 +01:00
database Mark all non-public IntDefs as only TYPE_USE 2022-02-21 16:56:36 +00:00
datasource Stabilise HttpDataSource and its nested exceptions 2022-04-06 11:36:53 +01:00
datasource_cronet Remove references to deprecated DefaultDataSourceFactory from dev guide 2022-03-24 15:13:09 +00:00
datasource_okhttp Allow stable API users to customise the DataSource used 2022-03-23 10:05:27 +00:00
datasource_rtmp Remove references to deprecated DefaultDataSourceFactory from dev guide 2022-03-24 15:13:09 +00:00
decoder Expect PresentationTime Discontinuity During Stream Transitions 2022-04-26 14:21:36 +01:00
decoder_av1 Make sure native library loads use correct class loader 2022-02-22 11:25:44 +00:00
decoder_ffmpeg Force CMake version 3.21.0+ for the FFMPEG extension 2022-03-14 13:42:31 +00:00
decoder_flac Make sure native library loads use correct class loader 2022-02-22 11:25:44 +00:00
decoder_opus Make sure native library loads use correct class loader 2022-02-22 11:25:44 +00:00
decoder_vp9 Make sure native library loads use correct class loader 2022-02-22 11:25:44 +00:00
exoplayer Revert of a29206d891 2022-04-25 20:59:35 +01:00
exoplayer_dash Merge pull request #10214 from cedricxperi:dev-v2 2022-05-09 10:14:11 +01:00
exoplayer_hls Fix non-inclusive language in class names. 2022-04-06 11:28:30 +01:00
exoplayer_ima Rename TracksInfo and TrackGroupInfo 2022-04-26 14:30:14 +01:00
exoplayer_rtsp Catch unchecked exception in RtspSessionTiming parsing. 2022-04-26 15:01:29 +01:00
exoplayer_smoothstreaming Fix non-inclusive language in class names. 2022-04-06 11:28:30 +01:00
exoplayer_workmanager Reformat some javadoc 2022-02-18 14:54:02 +00:00
extractor Merge pull request #10150 from egor-n:dev-v2-8435-outlinecolour 2022-05-09 10:15:05 +01:00
session Update session position info on timeline change 2022-05-09 10:16:33 +01:00
test_data Merge pull request #10150 from egor-n:dev-v2-8435-outlinecolour 2022-05-09 10:15:05 +01:00
test_exoplayer_playback Move TrackGroupArray back to ExoPlayer 2022-03-17 13:08:56 +00:00
test_session_common Update error state of legacy playback state if authentication fails 2022-04-06 11:25:27 +01:00
test_session_current Fix incorrect format variable 2022-04-26 13:30:27 +01:00
test_utils Rename TracksInfo and TrackGroupInfo 2022-04-26 14:30:14 +01:00
test_utils_robolectric Fix the position of IntDefs to match TYPE_USE 2022-02-21 17:04:12 +00:00
transformer Transformer GL: Add support for pixelWidthHeightRatio. 2022-05-09 10:11:18 +01:00
ui Rename Player.COMMAND_GET_TRACK_INFOS to COMMAND_GET_TRACKS 2022-04-26 14:41:41 +01:00
ui_leanback