diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java index 9101b939a..fd5c4c9af 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnectionManager.java @@ -1,5 +1,6 @@ package eu.siacs.conversations.xmpp.jingle; +import android.telecom.VideoProfile; import android.util.Base64; import android.util.Log; @@ -732,6 +733,10 @@ public class JingleConnectionManager extends AbstractConnectionManager { } final CallIntegration callIntegration = new CallIntegration(mXmppConnectionService.getApplicationContext()); + callIntegration.setVideoState( + Media.audioOnly(media) + ? VideoProfile.STATE_AUDIO_ONLY + : VideoProfile.STATE_BIDIRECTIONAL); callIntegration.setInitialAudioDevice(CallIntegration.initialAudioDevice(media)); final RtpSessionProposal proposal = RtpSessionProposal.of(account, with.asBareJid(), media, callIntegration); @@ -1111,13 +1116,9 @@ public class JingleConnectionManager extends AbstractConnectionManager { Set availableAudioDevices) {} @Override - public void onCallIntegrationReject() { - - } + public void onCallIntegrationReject() {} @Override - public void onCallIntegrationAnswer() { - - } + public void onCallIntegrationAnswer() {} } } diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java index 2ecd91253..dc0980e1b 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java @@ -2,6 +2,7 @@ package eu.siacs.conversations.xmpp.jingle; import android.content.Intent; import android.telecom.TelecomManager; +import android.telecom.VideoProfile; import android.util.Log; import androidx.annotation.NonNull; @@ -2838,6 +2839,10 @@ public class JingleRtpConnection extends AbstractJingleConnection void setProposedMedia(final Set media) { this.proposedMedia = media; + this.callIntegration.setVideoState( + Media.audioOnly(media) + ? VideoProfile.STATE_AUDIO_ONLY + : VideoProfile.STATE_BIDIRECTIONAL); this.callIntegration.setInitialAudioDevice(CallIntegration.initialAudioDevice(media)); }