Track MediaItems set neither isPlayable nor isBrowsable, which Media3
turns into Auto's item flags, so every song in an album/playlist/
download/search list reached the car as an inert row. Both are now set,
along with duration and track number.
Artwork used the in-app http://localhost placeholder URL, which only
the app's signed OkHttpClient can resolve. Auto and System UI fetch
artwork themselves from their own processes, so it never loaded (logcat:
"Invalid album art uri"). Adds CoverArtProvider, an exported
content:// provider that fetches art through the signed client and
caches it, and uses that URI on all MediaItems. The session's bitmap
loader now goes through the same DefaultDataSource + OkHttp factory as
playback. Coil in the phone UI reads the same content:// URI.
BrowseTree:
- Tapping one track in the car now queues the whole album/playlist/
downloads/search list from that track (onSetMediaItems), keyed by
browser package so the phone's own queues are untouched.
- Artists/albums/playlists lay out as a cover grid.
- Honours page/pageSize; fixes an Int overflow in the paging helper.
- Failures return LibraryResult errors instead of failed futures, and
cancelled requests cancel their work.
- The logged-out placeholder is no longer a browsable empty folder.
Tests: unit tests for paging and cover-art id validation, plus an
instrumented test that drives the service as an external MediaBrowser
(skips itself when logged out). Verified on an emulator against a live
server: playback, system media card and Now Playing artwork, no crashes.
Not verified over a real Android Auto / Desktop Head Unit connection.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>