mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
parent
b70b32e3d7
commit
a46864ae1b
@ -834,8 +834,6 @@ public class CallActivity extends AppCompatActivity {
|
||||
userEntity.getToken()), ApiHelper.getUrlForSignaling(userEntity.getBaseUrl()))
|
||||
.subscribeOn(Schedulers.newThread())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.repeatWhen(observable -> observable.delay(1500,
|
||||
TimeUnit.MILLISECONDS))
|
||||
.repeatUntil(booleanSupplier)
|
||||
.retry(3)
|
||||
.subscribe(new Observer<SignalingOverall>() {
|
||||
@ -860,12 +858,10 @@ public class CallActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
dispose(signalingDisposable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
dispose(signalingDisposable);
|
||||
}
|
||||
});
|
||||
|
||||
@ -969,7 +965,8 @@ public class CallActivity extends AppCompatActivity {
|
||||
Set<String> oldSesssions = new HashSet<>();
|
||||
|
||||
for (HashMap<String, String> participant : users) {
|
||||
if (!participant.get("sessionId").equals(callSession)) {
|
||||
if (!participant.get("sessionId").equals(callSession) && !participant.get("userId").equals(userEntity
|
||||
.getUserId())) {
|
||||
Object inCallObject = participant.get("inCall");
|
||||
if ((boolean) inCallObject) {
|
||||
newSessions.add(participant.get("sessionId"));
|
||||
@ -979,7 +976,6 @@ public class CallActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (MagicPeerConnectionWrapper magicPeerConnectionWrapper : magicPeerConnectionWrapperList) {
|
||||
oldSesssions.add(magicPeerConnectionWrapper.getSessionId());
|
||||
}
|
||||
@ -1394,7 +1390,7 @@ public class CallActivity extends AppCompatActivity {
|
||||
|
||||
private void registerNetworkReceiver() {
|
||||
IntentFilter intentFilter = new IntentFilter();
|
||||
intentFilter.addAction("android.net.conn.CONNECTIVITY_CHANGE");
|
||||
intentFilter.addAction("android.net.conn.CONNECTIVITY_CHANxGE");
|
||||
intentFilter.addAction("android.net.wifi.STATE_CHANGE");
|
||||
|
||||
this.registerReceiver(networkBroadcastReceier, intentFilter);
|
||||
|
@ -133,7 +133,7 @@ public class MagicPeerConnectionWrapper {
|
||||
}
|
||||
|
||||
public void sendChannelData(DataChannelMessage dataChannelMessage) {
|
||||
ByteBuffer buffer = null;
|
||||
ByteBuffer buffer;
|
||||
if (magicDataChannel != null) {
|
||||
try {
|
||||
buffer = ByteBuffer.wrap(LoganSquare.serialize(dataChannelMessage).getBytes());
|
||||
@ -245,17 +245,13 @@ public class MagicPeerConnectionWrapper {
|
||||
|
||||
@Override
|
||||
public void onSignalingChange(PeerConnection.SignalingState signalingState) {
|
||||
if (signalingState.equals(PeerConnection.SignalingState.CLOSED)) {
|
||||
EventBus.getDefault().post(new PeerConnectionEvent(PeerConnectionEvent.PeerConnectionEventType
|
||||
.CLOSE_PEER, sessionId, null, null));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onIceConnectionChange(PeerConnection.IceConnectionState iceConnectionState) {
|
||||
if (iceConnectionState.equals(PeerConnection.IceConnectionState.CONNECTED) && hasInitiated) {
|
||||
sendInitialMediaStatus();
|
||||
} else if (iceConnectionState.equals(PeerConnection.IceConnectionState.FAILED)) {
|
||||
} else if (iceConnectionState.equals(PeerConnection.IceConnectionState.CLOSED)) {
|
||||
EventBus.getDefault().post(new PeerConnectionEvent(PeerConnectionEvent.PeerConnectionEventType
|
||||
.CLOSE_PEER, sessionId, null, null));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user