From f880b4f7787d1349e809d3e0847921aaffe346f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Kr=C3=BCger?= Date: Fri, 23 Sep 2022 15:00:41 +0200 Subject: [PATCH] Call toggle media before fetchSignalingSettings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change fix a lateinit excepttion for 'participantPermissions'. Signed-off-by: Tim Krüger --- .../java/com/nextcloud/talk/activities/CallActivity.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 84f84b4bf..9085f6abe 100644 --- a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java +++ b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java @@ -914,13 +914,17 @@ public class CallActivity extends CallBaseActivity { public void onMicrophoneClick() { + if (!canPublishAudioStream) { + microphoneOn = false; + binding.microphoneButton.getHierarchy().setPlaceholderImage(R.drawable.ic_mic_off_white_24px); + toggleMedia(false, false); + } + if (isVoiceOnlyCall && !isConnectionEstablished()) { fetchSignalingSettings(); } if (!canPublishAudioStream) { - microphoneOn = false; - binding.microphoneButton.getHierarchy().setPlaceholderImage(R.drawable.ic_mic_off_white_24px); // In the case no audio stream will be published it's not needed to check microphone permissions return; }