media/libraries/common
bachinger 011ed909c0 Sync and map fatal and non-fatal errors from and to the legacy session
A fatal `PlaybackException` is mapped to a legacy playback state
in state `STATE_ERROR` with error code, message and extras. A
non-fatal error sent to controllers with `MediaSession.sendError`
is synced to the legacy session by setting error code and message
and merging the extras while preserving the rest of the state in
sync with the session player.

Vice versa, a `MediaController` connected to a legacy session receives
fatal errors through `Player.onPlayerErrorChanged()` and non-fatal errors
through `MediaController.Listener.onError()`.

Error codes are mapped in `LegacyConversions`. Values of error codes
in `@SessionError.ErrorCode` come from `@PlaybackExceptino.ErrorCode`
with the exception of `@SessionError.ERROR_IO` and
`@SessionError.ERROR_UNKNOWN`. These already exist in
`@PlaybackException.ErrorCode` and are mapped accordingly to avoid
semantic duplicates.

PiperOrigin-RevId: 642595517
2024-06-12 06:26:00 -07:00
..
src Sync and map fatal and non-fatal errors from and to the legacy session 2024-06-12 06:26:00 -07:00
build.gradle Replace deprecated NullableType from checkerframework with our own one 2023-06-19 16:08:20 +01:00
lint-baseline.xml Add lint base to make gradle lint run without errors 2022-06-15 15:27:34 +00:00
proguard-rules.txt Update to androidx.media3 2021-10-27 09:12:46 +01:00
README.md Fix javadoc links in media README files 2023-03-30 17:26:40 +00:00

Common module

Provides common code and utilities used by other media modules. Application code will not normally need to depend on this module directly.