Restore camera executor after Android view reattachment - #817
Open
zack-dev-cm wants to merge 1 commit into
Open
zack-dev-cm wants to merge 1 commit into
zack-dev-cm wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Detaching a
CKCamerashuts down its camera executor. Reattaching the same view reuses that executor, so submitting analysis work throwsRejectedExecutionException.Create a new single-thread executor during attachment only when the previous executor is shut down. Detachment still lets already-submitted work finish on the old executor while the new attachment accepts work independently.
This addresses the separate reattachment defect noted in #813 and starts independently from upstream. Scanner ownership remains in #813, coordinate mapping in #812, and the iOS CI toolchain correction in #816.
How did you test this change?
Validation against unchanged
a2a81ce:CKCamerafails two Robolectric regressions withRejectedExecutionException; the active-executor control passes.git diff --checkpasses.The tests invoke real view callbacks and executor threads. Camera permission is denied to isolate this lifecycle behavior, so physical-camera recovery is not claimed. iOS source is unchanged. These are contributor-reported results; upstream workflows, including the iOS build, await approval.