Fix boot network error skip chain#29
Merged
Merged
Conversation
onPlayerError previously advanced to the next item on every playback error and, at the end of the queue, stopped and cleared it. During a cold boot the car has no connectivity for the first minutes, so a resumed queue would fail track by track and end up wiped, leaving the session empty until the user manually rebuilt a queue. Network connection failed/timeout errors now retry the current item in place every 5 seconds (up to ~2 minutes) and retry immediately when the network callback reports connectivity, falling back to the old skip behaviour only after the retry budget is exhausted. Other error codes (bad HTTP status, decode failures, missing files) keep the existing skip-to-next recovery. Co-Authored-By: Claude Fable 5 <[email protected]>
More reliable playback resume when the car starts without an internet connection Full release notes: - Fix the restored play queue being skipped through and wiped when the car starts before its internet connection is up — the app now keeps retrying the current track and resumes automatically as soon as connectivity returns (for up to ~2 minutes) - Tracks that genuinely fail to play (server errors, unplayable files) are still skipped as before
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the "Something went wrong — Check that Google Play is enabled…" dialog that appeared repeatedly at infotainment boot on Volvo XC40 (firmware 5.1.17), and the half-broken media state it left behind. Two separate problems were involved; this PR carries the code fix and the release that also ships the Play Console fix.
Fix 1 — Google Play automatic integrity protection (Play Console, no code)
The dialog itself is not produced by DashTune or the car's Media Center: the exact wording matches the dialog injected into Play-delivered APKs by Google Play's automatic protection ("Installer check"). At infotainment boot, the car's
CarMediaServicespawns DashTune's process in the background to restore the last media source. The injected check runs at process start, can't reach Play (no connectivity yet, stale Play state after the car has been parked), fails, shows the dialog, and blocks the app. The car retries the reconnect a few times — hence the repeated prompts — then gives up, leaving the media card broken until the app is opened manually.Release v1.2.8(24)commit in this PR.Fix 2 — Don't skip-chain the queue on transient network errors (code)
Separately,
onPlayerErroradvanced to the next item on every playback error and, at the end of the queue, calledstop()+clearMediaItems(). During a cold boot with no connectivity, a resumed queue would fail track by track and end up wiped — contributing to the same "half broken until I manually play something" state.Changes in
DashTuneMusicService:ERROR_CODE_IO_NETWORK_CONNECTION_FAILED/_TIMEOUTnow retry the current item in place every 5 s, up to 24 attempts (~2 min, covering the head unit bringing up its data connection), before falling back to the old skip/stop behaviour.ConnectivityManagercallback triggers an immediate retry the moment the network comes back, so playback resumes without waiting out the poll interval. The retry runnable is guarded (STATE_IDLE+playerError != null) so it no-ops in any other state.onDestroy.Testing
isTransientNetworkError(retry-worthy vs skip-worthy error codes) and a guard that the retry window stays ≥ 2 minutes.Release
Includes
Release v1.2.8(24)so the unprotected, fixed build can roll out immediately after merge.🤖 Generated with Claude Code