Remove unused fields remoteVideoOn and remoteAudioOn

Signed-off-by: Tim Krüger <t@timkrueger.me>
This commit is contained in:
Tim Krüger 2022-02-17 15:33:28 +01:00
parent 844cf09a2b
commit 0ea29ee0cd
No known key found for this signature in database
GPG Key ID: FECE3A7222C52A4E

View File

@ -64,6 +64,9 @@ import javax.inject.Inject;
import androidx.annotation.Nullable;
import autodagger.AutoInjector;
import static java.lang.Boolean.FALSE;
import static java.lang.Boolean.TRUE;
@AutoInjector(NextcloudTalkApplication.class)
public class MagicPeerConnectionWrapper {
@ -78,9 +81,6 @@ public class MagicPeerConnectionWrapper {
private final MagicSdpObserver magicSdpObserver;
private MediaStream remoteStream;
private boolean remoteVideoOn;
private boolean remoteAudioOn;
private final boolean hasInitiated;
private final MediaStream localStream;
@ -303,23 +303,18 @@ public class MagicPeerConnectionWrapper {
.NICK_CHANGE, sessionId, payloadHashMap.get("name"), null, videoStreamType));
}
}
} else if ("audioOn".equals(dataChannelMessage.getType())) {
remoteAudioOn = true;
EventBus.getDefault().post(new PeerConnectionEvent(PeerConnectionEvent.PeerConnectionEventType
.AUDIO_CHANGE, sessionId, null, remoteAudioOn, videoStreamType));
.AUDIO_CHANGE, sessionId, null, TRUE, videoStreamType));
} else if ("audioOff".equals(dataChannelMessage.getType())) {
remoteAudioOn = false;
EventBus.getDefault().post(new PeerConnectionEvent(PeerConnectionEvent.PeerConnectionEventType
.AUDIO_CHANGE, sessionId, null, remoteAudioOn, videoStreamType));
.AUDIO_CHANGE, sessionId, null, FALSE, videoStreamType));
} else if ("videoOn".equals(dataChannelMessage.getType())) {
remoteVideoOn = true;
EventBus.getDefault().post(new PeerConnectionEvent(PeerConnectionEvent.PeerConnectionEventType
.VIDEO_CHANGE, sessionId, null, remoteVideoOn, videoStreamType));
.VIDEO_CHANGE, sessionId, null, TRUE, videoStreamType));
} else if ("videoOff".equals(dataChannelMessage.getType())) {
remoteVideoOn = false;
EventBus.getDefault().post(new PeerConnectionEvent(PeerConnectionEvent.PeerConnectionEventType
.VIDEO_CHANGE, sessionId, null, remoteVideoOn, videoStreamType));
.VIDEO_CHANGE, sessionId, null, FALSE, videoStreamType));
}
} catch (IOException e) {
Log.d(TAG, "Failed to parse data channel message");