mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-22 13:05:31 +03:00
Do not handle connection state changes to "closed"
The connection state changes to "closed" only when the connection is closed. However, closing a connection does not fire any event (not even the "iceConnectionStateChanged" event), so the event handler can be removed as it will never be executed. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
534bbddc88
commit
6728e3f063
1 changed files with 2 additions and 10 deletions
|
@ -1971,7 +1971,7 @@ public class CallActivity extends CallBaseActivity {
|
|||
peerConnectionWrapperList.add(peerConnectionWrapper);
|
||||
|
||||
PeerConnectionWrapper.PeerConnectionObserver peerConnectionObserver =
|
||||
new CallActivityPeerConnectionObserver(sessionId, type);
|
||||
new CallActivityPeerConnectionObserver(sessionId);
|
||||
peerConnectionObservers.put(sessionId + "-" + type, peerConnectionObserver);
|
||||
peerConnectionWrapper.addObserver(peerConnectionObserver);
|
||||
|
||||
|
@ -2566,11 +2566,9 @@ public class CallActivity extends CallBaseActivity {
|
|||
private class CallActivityPeerConnectionObserver implements PeerConnectionWrapper.PeerConnectionObserver {
|
||||
|
||||
private final String sessionId;
|
||||
private final String videoStreamType;
|
||||
|
||||
private CallActivityPeerConnectionObserver(String sessionId, String videoStreamType) {
|
||||
private CallActivityPeerConnectionObserver(String sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
this.videoStreamType = videoStreamType;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -2588,12 +2586,6 @@ public class CallActivity extends CallBaseActivity {
|
|||
updateSelfVideoViewIceConnectionState(iceConnectionState);
|
||||
}
|
||||
|
||||
if (iceConnectionState == PeerConnection.IceConnectionState.CLOSED) {
|
||||
endPeerConnection(sessionId, VIDEO_STREAM_TYPE_SCREEN.equals(videoStreamType));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (iceConnectionState == PeerConnection.IceConnectionState.FAILED) {
|
||||
if (webSocketClient != null && webSocketClient.getSessionId() != null && webSocketClient.getSessionId().equals(sessionId)) {
|
||||
setCallState(CallStatus.PUBLISHER_FAILED);
|
||||
|
|
Loading…
Reference in a new issue