Skip to content

Detach a call video renderer before adding it to the call screen - #2253

Merged
mpretty-cyro merged 3 commits into
devfrom
fix/call-video-renderer-reparent
Nov 5, 2026
Merged

mpretty-cyro merged 3 commits into
devfrom
fix/call-video-renderer-reparent

Conversation

@mpretty-cyro

Copy link
Copy Markdown
Collaborator

Contributor checklist

  • I have tested my contribution on these devices:
  • Compiled only; not exercised on a device (see Testing below)
  • My contribution is fully baked and ready to be merged as is
  • I ensure that all the open issues my contribution fixes are mentioned in the commit message of my first commit using the Fixes #1234 syntax

Description

Crash cluster: IllegalStateException: The specified child already has a parent from WebRtcCallActivity.renderVideoState →
addView. The renderers belong to CallManager and outlive the activity, so one can still be attached to a previous instance's
layout. Each renderer is now removed from its current parent before being added.

Testing: compiled. Not exercised on a device; it needs a video call.

The video renderers are owned by CallManager and outlive
WebRtcCallActivity, so when a new instance of the screen rendered its
video state a renderer could still be attached to the previous
instance's layout. addView then threw "The specified child already has a
parent".

@mpretty-cyro mpretty-cyro left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mpretty-cyro
mpretty-cyro marked this pull request as ready for review November 5, 2026 03:16
@mpretty-cyro
mpretty-cyro merged commit 24def20 into dev Nov 5, 2026
8 of 10 checks passed
@mpretty-cyro
mpretty-cyro deleted the fix/call-video-renderer-reparent branch November 5, 2026 03:40
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