media/libraries
tonihei c5e071e556 Align PlaybackStateCompat states with logic in MediaSessionConnector
Creating the PlaybackStateCompat from a media3 Player state is done
already by the MediaSessionConnector (and used widely). The media3
session module should set the same states under the same circumstances
to ensure compatiblity and consistency.

PlaybackStateCompat changes made in media3 session:
 - Use STATE_STOPPED when player is ended instead of STATE_PAUSED
 - Use STATE_PLAYING when playback is suppressed temporarily.
 - Set the playback speed to 0 if the player is not playing.
 - Add extras for mediaId and user-set playback speed.

Part of the problem was that Player.isPlaying() was used to check
the state. Unfortunately, MockPlayer.isPlaying() is implemented in
a way that makes it hard to test these changes, because the value
is set independently of playbackState, playWhenReady and suppression
reason. To be able to write consistent, logical tests, this change
also removes the independent setting of isPlaying in MockPlayer to
align it better with a real player. This requires to update some
other tests to use alternative methods.

PiperOrigin-RevId: 487500859
2022-11-10 14:58:06 +00:00
..
cast Add 'Player.getVideoSurfaceSize' that returns the size of the surface 2022-11-08 11:25:43 +00:00
common Add 'Player.getVideoSurfaceSize' that returns the size of the surface 2022-11-08 11:25:43 +00:00
database Mark all non-public IntDefs as only TYPE_USE 2022-02-21 16:56:36 +00:00
datasource Fix instrumentation tests not working via Gradle 2022-09-30 18:03:11 +00:00
datasource_cronet Fix instrumentation tests not working via Gradle 2022-09-30 18:03:11 +00:00
datasource_okhttp Annotate methods that always return this with @CanIgnoreReturnValue 2022-08-08 07:55:25 +00:00
datasource_rtmp Annotate methods that always return this with @CanIgnoreReturnValue 2022-08-08 07:55:25 +00:00
decoder Expect PresentationTime Discontinuity During Stream Transitions 2022-04-26 14:21:36 +01:00
decoder_av1 Fix Dackka parameter name error in Gav1Decoder and VpxDecoder 2022-11-10 14:48:37 +00:00
decoder_ffmpeg Fix Dackka/Metalava errors in av1, flac, ffmpeg, midi, and opus modules 2022-11-10 14:44:16 +00:00
decoder_flac Fix Dackka/Metalava errors in av1, flac, ffmpeg, midi, and opus modules 2022-11-10 14:44:16 +00:00
decoder_opus Fix Dackka/Metalava errors in av1, flac, ffmpeg, midi, and opus modules 2022-11-10 14:44:16 +00:00
decoder_vp9 Fix Dackka parameter name error in Gav1Decoder and VpxDecoder 2022-11-10 14:48:37 +00:00
effect Fix Dackka/Metalava errors in the effects module 2022-11-08 11:21:11 +00:00
exoplayer Add missing IntDef on MediaSource.Factory.getSupportedTypes overrides 2022-11-10 14:56:54 +00:00
exoplayer_dash Add missing IntDef on MediaSource.Factory.getSupportedTypes overrides 2022-11-10 14:56:54 +00:00
exoplayer_hls Add missing IntDef on MediaSource.Factory.getSupportedTypes overrides 2022-11-10 14:56:54 +00:00
exoplayer_ima Add missing IntDef on MediaSource.Factory.getSupportedTypes overrides 2022-11-10 14:56:54 +00:00
exoplayer_rtsp Add missing IntDef on MediaSource.Factory.getSupportedTypes overrides 2022-11-10 14:56:54 +00:00
exoplayer_smoothstreaming Add missing IntDef on MediaSource.Factory.getSupportedTypes overrides 2022-11-10 14:56:54 +00:00
exoplayer_workmanager Reformat some javadoc 2022-02-18 14:54:02 +00:00
extractor Fix Dackka javadoc errors in protected methods 2022-11-08 11:23:25 +00:00
session Align PlaybackStateCompat states with logic in MediaSessionConnector 2022-11-10 14:58:06 +00:00
test_data Load bitmaps for MediaMetadataCompat and handle the metadata updates. 2022-11-08 11:19:04 +00:00
test_exoplayer_playback Fix instrumentation tests not working via Gradle 2022-09-30 18:03:11 +00:00
test_session_common Align PlaybackStateCompat states with logic in MediaSessionConnector 2022-11-10 14:58:06 +00:00
test_session_current Align PlaybackStateCompat states with logic in MediaSessionConnector 2022-11-10 14:58:06 +00:00
test_utils Add missing IntDef on MediaSource.Factory.getSupportedTypes overrides 2022-11-10 14:56:54 +00:00
test_utils_robolectric Add timestamp to Metadata 2022-07-04 19:36:57 +00:00
transformer Remove dependency on muxer from ExoPlayerAssetLoader 2022-11-10 14:51:53 +00:00
ui Remove ForwardingPlayer special case from PlayerControlView.setPlayer 2022-10-24 10:37:05 +00:00
ui_leanback Update Leanback library 2022-08-02 19:01:58 +00:00