fix(call): fix native crashes, muted icons and state broadcast in calls#6261
Merged
Conversation
5 tasks
Contributor
|
APK file: https://github.com/nextcloud/talk-android/actions/runs/26644548422/artifacts/7293967270 |
This commit contains the code from #6039 (thank you tareko!) as it needed to be combined with more fixes during it's review. PeerConnectionWrapper — native crash fixes: - Call peerConnection.close() before dataChannel.dispose() so the WebRTC signaling thread stops dispatching callbacks before native objects are freed - Call peerConnection.close() outside the synchronized lock; holding the lock deadlocks because close() blocks waiting for the signaling thread, which itself needs the lock to run its callbacks - Null out peerConnection before calling close() so in-flight callbacks see null and return early instead of NPE-ing on peerConnection.hashCode() in onIceConnectionChange, onCreateFailure, and onSetFailure - Call dataChannel.unregisterObserver() before dispose() in both removePeerConnection() and onDataChannel() to prevent the native observer from calling back into a disposed Java DataChannel object LocalStateBroadcasterNoMcu — initial mute state not sent to peers: - IceConnectionStateObserver.job was never started, so local audio/video/ speaking state was never sent to newly connected participants; only a manual mute+unmute triggered a broadcast - handleCallParticipantAdded now accepts the live StateFlow<ParticipantUiState> and uses first { it.isConnected } to send initial state exactly once when ICE connects; base class gets a concrete StateFlow overload that defaults to the existing snapshot path so MCU behaviour is unchanged - Fix ParticipantHandler initial isConnected = false (was true), which caused retrying when ICE actually connected ParticipantHandler — guest audio not detected (cherry-pick of PR #6039): - handleStreamChange() now sets isAudioEnabled from audio track presence, not only isStreamEnabled from video tracks; guests whose DataChannel never opens were permanently shown as muted despite having an active audio track - handleIceConnectionStateChange() preserves audio/video state during ICE NEW/CHECKING if tracks are still present, rather than resetting to false unconditionally and relying on a DataChannel message to restore it - Add GuestAudioDetectionTest and diagnostic logging AI-assistant: Claude Code v2.1.142 (Claude Sonnet 4.6) Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
016f6d9 to
90e4f08
Compare
Collaborator
Author
|
/backport to stable-24.0 |
Contributor
|
APK file: https://github.com/nextcloud/talk-android/actions/runs/26645620132/artifacts/7294400520 |
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.
This commit contains the code from #6039 (thank you @tareko !) as it needed to be combined with more fixes during it's review.
PeerConnectionWrapper — native crash fixes:
LocalStateBroadcasterNoMcu — initial mute state not sent to peers:
ParticipantHandler — guest audio not detected (cherry-pick of PR #6039):
AI-assistant: Claude Code v2.1.142 (Claude Sonnet 4.6)
🏁 Checklist
/backport to stable-xx.x