Skip to content

Fix misleading "Check Google Play" dialog when offline#23

Open
chamika wants to merge 3 commits into
mainfrom
fix-offline-player-error
Open

Fix misleading "Check Google Play" dialog when offline#23
chamika wants to merge 3 commits into
mainfrom
fix-offline-player-error

Conversation

@chamika
Copy link
Copy Markdown
Owner

@chamika chamika commented May 24, 2026

Summary

  • The AAOS "Something went wrong / Check Google Play" dialog seen over the Now Playing screen offline is the system's generic error template, not a real GMS check (Firebase/GMS was already removed). It fires when the media session publishes a PlaybackException with no handler.
  • Adds Player.Listener.onPlayerError to recover into a clean IDLE state (skip to next, or stop + clear), which prevents the dialog.
  • onPlaybackResumption now filters out saved tracks that can't actually play (offline + not in the ExoPlayer download cache), so we don't hand the player a known-broken queue.
  • AlbumArtContentProvider.openFile now catches IOException, throws the documented FileNotFoundException when no file lands on disk, and uses 10s OkHttp timeouts so the ContentProvider thread can't hang offline.

Test plan

  • ./gradlew :automotive:assembleDebug — builds clean
  • ./gradlew :automotive:testDebugUnitTest — all existing tests pass
  • Manual: sync library online → force-stop → airplane mode → relaunch. Browse renders from Room cache; Now Playing stays idle; no system dialog.
  • Manual: start uncached track online → toggle airplane mode mid-playback. onPlayerError fires; player skips to a cached next item if any, otherwise stops cleanly.
  • Manual: browse offline to a folder whose album art was never cached. Items render with placeholder art; no exceptions in logcat from AlbumArtContentProvider.

🤖 Generated with Claude Code

chamika and others added 3 commits May 25, 2026 00:23
The AAOS generic error dialog appeared over the Now Playing screen
whenever ExoPlayer entered an error state with no handler. With Firebase
and Google Play Services already removed, the dialog text is just the
system's hardcoded template — the trigger was an unhandled
PlaybackException, not a real GMS check.

- Override Player.Listener.onPlayerError in DashTuneMusicService to
  recover gracefully: skip to the next item if available, otherwise
  stop and clear, so the session stops publishing an error state.
- Filter onPlaybackResumption to drop saved tracks that aren't cached
  when offline, avoiding a known-broken queue on cold offline launch.
- Harden AlbumArtContentProvider.openFile against network failures:
  catch IOException, throw the documented FileNotFoundException when
  no file ends up on disk, and add 10s OkHttp timeouts.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Returning LibraryResult.ofError from onGetLibraryRoot makes the Media3 to
legacy MediaBrowserService bridge deliver a null root to AAOS Media
Center, which responds with onConnectFailed and a blank screen — the
sign-in PendingIntent in the error's extras never fires. Always return a
valid root with the auth extras on the params instead; the existing
auth check in onGetChildren still launches SignInActivity via the same
PendingIntent.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Fix blank screen on fresh install plus offline error dialog and auto-resume crash

Full release notes:

- Fix blank Media Center screen when opening the app while signed out — the sign-in prompt now appears correctly again
- Fix the "Something went wrong / Check Google Play" dialog that appeared on the Now Playing screen when the car had no internet
- Skip auto-resuming previously played tracks that aren't cached on the device when offline, instead of getting stuck on "Loading content…"
- Album art now falls back to a placeholder when offline instead of failing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant