From 07ca8c1e2908a93a630f2618b2c7d7bb3559daf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Fri, 22 Apr 2022 15:08:24 +0200 Subject: [PATCH] Fix call flags in video calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The call flags describe the streams provided by the client, so in a video call both audio and video are provided, not just video. Note that as publishing permissions are currently not implemented in the Android app the provided flags do not take into account the available permissions. Nevertheless, the server restricts the flags based on the permissions, so the other participants would see the appropriate flags. In the future it would be better to send the right flags directly from the Android app. Similarly, for now, it is just assumed that both audio and video tracks will be provided by the Android app, but the flags should reflect the actually available tracks (for example, if it was not possible to get a video track for some reason the call flags should not include "WITH_VIDEO"). Signed-off-by: Daniel Calviño Sánchez --- .../main/java/com/nextcloud/talk/activities/CallActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java index 3435ba0b9..f8c83cd7c 100644 --- a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java +++ b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java @@ -1349,7 +1349,8 @@ public class CallActivity extends CallBaseActivity { if (isVoiceOnlyCall) { inCallFlag = Participant.InCallFlags.IN_CALL + Participant.InCallFlags.WITH_AUDIO; } else { - inCallFlag = Participant.InCallFlags.IN_CALL + Participant.InCallFlags.WITH_VIDEO; + inCallFlag = + Participant.InCallFlags.IN_CALL + Participant.InCallFlags.WITH_AUDIO + Participant.InCallFlags.WITH_VIDEO; } int apiVersion = ApiUtils.getCallApiVersion(conversationUser, new int[]{ApiUtils.APIv4, 1});