浏览代码

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

Fix String comparison using operator rather than "equals()"
Andy Scherzinger 2 年之前
父节点
当前提交
b328e68c7a
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/src/main/java/com/nextcloud/talk/activities/CallActivity.java

+ 2 - 2
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java

@@ -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);