Jelajahi Sumber

Merge pull request #1951 from nextcloud/fix-typo-in-name-of-method-to-check-if-video-should-not-be-received

Fix typo in name of method to check if video should not be received
Marcel Hibbe 3 tahun lalu
induk
melakukan
7c89b15edb

+ 2 - 2
app/src/main/java/com/nextcloud/talk/webrtc/PeerConnectionWrapper.java

@@ -258,7 +258,7 @@ public class PeerConnectionWrapper {
         return isMCUPublisher;
     }
 
-    private boolean shouldReceiveVideo() {
+    private boolean shouldNotReceiveVideo() {
         for (MediaConstraints.KeyValuePair keyValuePair : mediaConstraints.mandatory) {
             if ("OfferToReceiveVideo".equals(keyValuePair.getKey())) {
                 return !Boolean.parseBoolean(keyValuePair.getValue());
@@ -456,7 +456,7 @@ public class PeerConnectionWrapper {
             if (peerConnection != null) {
                 if (peerConnection.getLocalDescription() == null) {
 
-                    if (shouldReceiveVideo()) {
+                    if (shouldNotReceiveVideo()) {
                         for (RtpTransceiver t : peerConnection.getTransceivers()) {
                             if (t.getMediaType().equals(MediaStreamTrack.MediaType.MEDIA_TYPE_VIDEO)) {
                                 t.stop();