Skip to content

fix(android): cancel stale source initialization - #5057

Open
OskarEichler wants to merge 1 commit into
TheWidlarzGroup:support/6.x.xfrom
OskarEichler:codex/cancel-stale-android-source-init
Open

OskarEichler wants to merge 1 commit into
TheWidlarzGroup:support/6.x.xfrom
OskarEichler:codex/cancel-stale-android-source-init

Conversation

@OskarEichler

Copy link
Copy Markdown

What changed

  • stop pending initialization whenever the view is dropped or its captured source has been superseded
  • repeat that guard before background work and again on the UI-thread handoff
  • shut down the per-initialization executor in finally on success and every early return

Why

The current checks use viewHasDropped && runningSource == source. That only aborts one narrow combination; a changed source explicitly allows the old request to continue. The old request can then initialize media using a mixture of captured and current source fields. Each attempt also creates a newSingleThreadExecutor() without shutting it down, retaining a thread after its one task completes.

Verification

  • yarn build
  • yarn lint
  • yarn check-android
  • git diff --check

The v6 repository has no native unit-test or standalone Android compilation harness; hosted Android CI remains the Java compilation gate.

Breaking changes

None. Only dropped/superseded initialization work is cancelled.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Triage

Development

Successfully merging this pull request may close these issues.

1 participant