Merge pull request #2573 from nextcloud/fix-string-comparison-using-operator-rather-than-equals

Fix String comparison using operator rather than "equals()"
This commit is contained in:
Andy Scherzinger 2022-11-16 14:56:51 +01:00 committed by GitHub
commit b328e68c7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2167,7 +2167,7 @@ public class CallActivity extends CallBaseActivity {
if (peerConnectionEvent.getPeerConnectionEventType() ==
PeerConnectionEvent.PeerConnectionEventType.PEER_CONNECTED) {
if (webSocketClient != null && webSocketClient.getSessionId() == sessionId) {
if (webSocketClient != null && webSocketClient.getSessionId() != null && webSocketClient.getSessionId().equals(sessionId)) {
updateSelfVideoViewConnected(true);
} else if (participantDisplayItems.get(sessionId) != null) {
participantDisplayItems.get(sessionId).setConnected(true);
@ -2175,7 +2175,7 @@ public class CallActivity extends CallBaseActivity {
}
} else if (peerConnectionEvent.getPeerConnectionEventType() ==
PeerConnectionEvent.PeerConnectionEventType.PEER_DISCONNECTED) {
if (webSocketClient != null && webSocketClient.getSessionId() == sessionId) {
if (webSocketClient != null && webSocketClient.getSessionId() != null && webSocketClient.getSessionId().equals(sessionId)) {
updateSelfVideoViewConnected(false);
} else if (participantDisplayItems.get(sessionId) != null) {
participantDisplayItems.get(sessionId).setConnected(false);