Skip to content

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

Open
fulvius31 wants to merge 3 commits into
topjohnwu:masterfrom
fulvius31:radio-fix
Open

app: reset install method when file picker or download dialog is cancelled#9822
fulvius31 wants to merge 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.
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