From 96d60e11b00ccc7e56d46e5e7d6670aa42575388 Mon Sep 17 00:00:00 2001 From: Cody Henthorne Date: Tue, 11 Oct 2022 16:59:02 -0400 Subject: [PATCH] Fix call participants button showing under status bar after returning from PIP. --- .../securesms/components/webrtc/WebRtcCallView.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/WebRtcCallView.java b/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/WebRtcCallView.java index f782cf4008..f127000cc2 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/WebRtcCallView.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/WebRtcCallView.java @@ -124,6 +124,7 @@ public class WebRtcCallView extends ConstraintLayout { private ConstraintSet largeHeaderConstraints; private ConstraintSet smallHeaderConstraints; private Guideline statusBarGuideline; + private Guideline navigationBarGuideline; private int navBarBottomInset; private View fullScreenShade; @@ -205,6 +206,7 @@ public class WebRtcCallView extends ConstraintLayout { foldParticipantCount = findViewById(R.id.fold_show_participants_menu_counter); largeHeaderAvatar = findViewById(R.id.call_screen_header_avatar); statusBarGuideline = findViewById(R.id.call_screen_status_bar_guideline); + navigationBarGuideline = findViewById(R.id.call_screen_navigation_bar_guideline); fullScreenShade = findViewById(R.id.call_screen_full_shade); View decline = findViewById(R.id.call_screen_decline_call); @@ -330,9 +332,9 @@ public class WebRtcCallView extends ConstraintLayout { @Override protected boolean fitSystemWindows(Rect insets) { - Guideline navigationBarGuideline = findViewById(R.id.call_screen_navigation_bar_guideline); - - statusBarGuideline.setGuidelineBegin(insets.top); + if (insets.top != 0) { + statusBarGuideline.setGuidelineBegin(insets.top); + } navigationBarGuideline.setGuidelineEnd(insets.bottom); return true;