Skip to content

app: reset install method when file picker or download dialog is cancelled - #9822

Merged
topjohnwu merged 3 commits into
topjohnwu:masterfrom
fulvius31:radio-fix
Aug 18, 2026
Merged

app: reset install method when file picker or download dialog is cancelled#9822
topjohnwu merged 3 commits into
topjohnwu:masterfrom
fulvius31:radio-fix

Conversation

@fulvius31

Copy link
Copy Markdown
Contributor

Problem

Tapping Patch or Download selects the radio and opens the picker/dialog.
If the user cancels, the radio stays selected but no Uri is captured, and re-tapping the same option is a no-op. the picker can't be reopened.

Fix

  • core/BaseActivity.kt: add onActivityCancel() to ContentResultCallback.
  • apk/InstallViewModel.kt: clear the radio on cancel.
  • apk/DownloadDialog.kt: invoke onCancel on dismiss without a valid URL.

- Reset selected installation method when file picking or URL entry is cancelled.
- Fix a bug where `RadioGroup` would trigger spurious selection events when clearing the selection programmatically.
- Use a static `LiveData` to safely communicate file selection results across `ViewModel` instances after process death.
- Add `onActivityCancel` to `ContentResultCallback` to properly handle activity results with no data.
@topjohnwu
topjohnwu merged commit a5bca88 into topjohnwu:master Aug 18, 2026
73 of 75 checks passed
@fulvius31
fulvius31 deleted the radio-fix branch August 19, 2026 19:07
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.

2 participants