Skip to content

K2GO-515 fix(library): consume cancelled-install state so Copy from a phone opens Clone - #711

Merged
luisguzman-adfa merged 1 commit into
mainfrom
fix/K2GO-515-copy-from-phone-cancelled-redirect
Oct 30, 2026
Merged

luisguzman-adfa merged 1 commit into
mainfrom
fix/K2GO-515-copy-from-phone-cancelled-redirect

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

Fixes K2GO-515. After a cancelled or interrupted "Internet download", tapping
"Copy from a phone" opened the download chooser instead of the Clone/Receive scan
flow, and kept doing so until the app was restarted.

Cause: the terminal CANCELLED install state is an in-memory process-singleton set
on cancel and never cleared. LibraryActivity's observer redirected to
SetupLibraryActivity on it for ANY open, so a stale CANCELLED hijacked the
Clone-tab navigation. Regression from ADFA-5119, whose redirect was not scoped to
the install monitor.

Fix (LibraryActivity only): consume the one-shot (postIdle) when the observer
handles CANCELLED, and route back to the chooser only when this instance was the
install monitor (the "installing" field), mirroring the FAILED branch's existing
InstallGuard.isLive guard. A normal cancel still routes back; any other open just
clears the stale signal and keeps its tab.

Verification: standard-debug Java compiles; form + depth code review passed.
Device E2E (induce a cancelled install, then Copy from a phone opens Clone)
pending a build.

… phone opens Clone

The terminal CANCELLED install state (an in-memory singleton, set on cancel) was
never cleared, so LibraryActivity's observer bounced ANY open to the download
chooser, including "Copy from a phone". Now it consumes the one-shot (postIdle)
and routes back only when this instance was the install monitor (the installing
field), matching the FAILED branch's own-install guard.
@luisguzman-adfa
luisguzman-adfa merged commit 0d761dc into main Oct 30, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the fix/K2GO-515-copy-from-phone-cancelled-redirect branch October 30, 2026 13:36
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