mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 04:28:35 +00:00
Fix pip offset.
This commit is contained in:
committed by
Cody Henthorne
parent
bba8b8be56
commit
cd9a160cae
@@ -375,12 +375,10 @@ public class WebRtcCallView extends ConstraintLayout {
|
||||
|
||||
@Override
|
||||
public WindowInsets onApplyWindowInsets(WindowInsets insets) {
|
||||
if (android.os.Build.VERSION.SDK_INT >= 20) {
|
||||
navBarBottomInset = WindowInsetsCompat.toWindowInsetsCompat(insets).getInsets(WindowInsetsCompat.Type.navigationBars()).bottom;
|
||||
navBarBottomInset = WindowInsetsCompat.toWindowInsetsCompat(insets).getInsets(WindowInsetsCompat.Type.navigationBars()).bottom;
|
||||
|
||||
if (lastState != null) {
|
||||
updateCallParticipants(lastState);
|
||||
}
|
||||
if (lastState != null) {
|
||||
updateCallParticipants(lastState);
|
||||
}
|
||||
|
||||
return super.onApplyWindowInsets(insets);
|
||||
@@ -391,9 +389,9 @@ public class WebRtcCallView extends ConstraintLayout {
|
||||
if ((visible & SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0) {
|
||||
if (controls.adjustForFold()) {
|
||||
pictureInPictureGestureHelper.clearVerticalBoundaries();
|
||||
pictureInPictureGestureHelper.setTopVerticalBoundary(largeHeader.getTop());
|
||||
pictureInPictureGestureHelper.setTopVerticalBoundary(getPipBarrier().getTop());
|
||||
} else {
|
||||
pictureInPictureGestureHelper.setTopVerticalBoundary(largeHeader.getBottom());
|
||||
pictureInPictureGestureHelper.setTopVerticalBoundary(getPipBarrier().getBottom());
|
||||
pictureInPictureGestureHelper.setBottomVerticalBoundary(videoToggle.getTop());
|
||||
}
|
||||
} else {
|
||||
@@ -579,6 +577,14 @@ public class WebRtcCallView extends ConstraintLayout {
|
||||
setStatus(getContext().getString(statusRes));
|
||||
}
|
||||
|
||||
private @NonNull View getPipBarrier() {
|
||||
if (collapsedToolbar.isEnabled()) {
|
||||
return collapsedToolbar;
|
||||
} else {
|
||||
return largeHeader;
|
||||
}
|
||||
}
|
||||
|
||||
public void setStatusFromHangupType(@NonNull HangupMessage.Type hangupType) {
|
||||
switch (hangupType) {
|
||||
case NORMAL:
|
||||
|
||||
Reference in New Issue
Block a user