Skip to content

ADFA-4895 feat(install): resume a held download when a validated network returns - #440

Merged
luisguzman-adfa merged 1 commit into
mainfrom
fix/ADFA-4895-network-change-resume
Aug 20, 2026
Merged

luisguzman-adfa merged 1 commit into
mainfrom
fix/ADFA-4895-network-change-resume

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

A SOFTFAILED rootfs download waited for the user to tap Retry, or expired after the 60 s held window when unattended. InstallService now also resumes on its own when the precondition that stopped it changes: a validated network comes back.

InstallService observes NetworkStateLiveData with observeForever for the life of the service (removed in onDestroy). On a default-network change it resumes only when the transfer stopped on its own and can continue (SOFTFAILED, never PAUSED) and only onto a VALIDATED network, then reuses doResume() — the existing single re-drive path that continues from the .aria2 control file. One guard covers both held cases: the 60 s unattended window and the indefinite user-present hold.

Consistent with ADR-4893: resume on a changed precondition, not on a timer against unchanged conditions.

…ork returns

A SOFTFAILED rootfs download waited for the user to tap Retry, or expired
after the 60 s held window when unattended. InstallService now also resumes
on its own when the precondition that stopped it changes: a validated
network comes back.

InstallService observes NetworkStateLiveData with observeForever for the life
of the service (removed in onDestroy). On a default-network change it resumes
only when the transfer stopped on its own and can continue (SOFTFAILED, never
PAUSED) and only onto a VALIDATED network, then reuses doResume() — the
existing single re-drive path that continues from the .aria2 control file.
One guard covers both held cases: the 60 s unattended window and the
indefinite user-present hold.

Consistent with ADR-4893: resume on a changed precondition, not on a timer
against unchanged conditions.
@luisguzman-adfa
luisguzman-adfa merged commit 5925389 into main Aug 20, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the fix/ADFA-4895-network-change-resume branch August 20, 2026 13:11
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