Skip to content

fix(android): clean up pending camera temp files on cancel/stop - #970

Open
GitToTheHub wants to merge 1 commit into
masterfrom
pr-android-cleanup-files-after-cancel-stop
Open

fix(android): clean up pending camera temp files on cancel/stop#970
GitToTheHub wants to merge 1 commit into
masterfrom
pr-android-cleanup-files-after-cancel-stop

Conversation

@GitToTheHub

@GitToTheHub GitToTheHub commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Platforms affected

Android

Motivation and Context

Follow up of PR #873.

@erisu noticed after PR #873 was merged, if there should be any cleanup procedures after stop was called. For example when takePicture is executed this.imageUri is set and gets not cleared. After checking this, it turned out, that this is the case, but this was also true, when an Activity was canceled by the user. This fixes both cases.

Description

  • delete pending image and cropped temp files when camera flow is stopped
  • run cleanup when image selection/capture is canceled
  • reset pending URI and file path state after best-effort cleanup

Generated-By: GPT-5.3-Codex

Testing

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

- delete pending image and cropped temp files when camera flow is stopped
- run cleanup when image selection/capture is canceled
- reset pending URI and file path state after best-effort cleanup

Generated-By: GPT-5.3-Codex
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