Call toggle media before fetchSignalingSettings

This change fix a lateinit excepttion for 'participantPermissions'.

Signed-off-by: Tim Krüger <t@timkrueger.me>
This commit is contained in:
Tim Krüger 2022-09-23 15:00:41 +02:00
parent 4c0aa6a235
commit f880b4f778
No known key found for this signature in database
GPG key ID: FECE3A7222C52A4E

View file

@ -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;
}