From 08f27ddcf840385d3a02264e4782cecbe246212d Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 26 Mar 2021 14:04:36 +0100 Subject: [PATCH] =?UTF-8?q?don=E2=80=99t=20show=20video=20call=20button=20?= =?UTF-8?q?if=20no=20camera=20is=20available?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/eu/siacs/conversations/ui/ConversationFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 8fb894fa4..31105cac5 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -994,8 +994,9 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke } else { menuOngoingCall.setVisible(false); final RtpCapability.Capability rtpCapability = RtpCapability.check(conversation.getContact()); + final boolean cameraAvailable = activity != null && activity.isCameraFeatureAvailable(); menuCall.setVisible(rtpCapability != RtpCapability.Capability.NONE); - menuVideoCall.setVisible(rtpCapability == RtpCapability.Capability.VIDEO); + menuVideoCall.setVisible(rtpCapability == RtpCapability.Capability.VIDEO && cameraAvailable); } menuContactDetails.setVisible(!this.conversation.withSelf()); menuMucDetails.setVisible(false);