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,13 +375,11 @@ public class WebRtcCallView extends ConstraintLayout {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WindowInsets onApplyWindowInsets(WindowInsets insets) {
|
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) {
|
if (lastState != null) {
|
||||||
updateCallParticipants(lastState);
|
updateCallParticipants(lastState);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return super.onApplyWindowInsets(insets);
|
return super.onApplyWindowInsets(insets);
|
||||||
}
|
}
|
||||||
@@ -391,9 +389,9 @@ public class WebRtcCallView extends ConstraintLayout {
|
|||||||
if ((visible & SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0) {
|
if ((visible & SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0) {
|
||||||
if (controls.adjustForFold()) {
|
if (controls.adjustForFold()) {
|
||||||
pictureInPictureGestureHelper.clearVerticalBoundaries();
|
pictureInPictureGestureHelper.clearVerticalBoundaries();
|
||||||
pictureInPictureGestureHelper.setTopVerticalBoundary(largeHeader.getTop());
|
pictureInPictureGestureHelper.setTopVerticalBoundary(getPipBarrier().getTop());
|
||||||
} else {
|
} else {
|
||||||
pictureInPictureGestureHelper.setTopVerticalBoundary(largeHeader.getBottom());
|
pictureInPictureGestureHelper.setTopVerticalBoundary(getPipBarrier().getBottom());
|
||||||
pictureInPictureGestureHelper.setBottomVerticalBoundary(videoToggle.getTop());
|
pictureInPictureGestureHelper.setBottomVerticalBoundary(videoToggle.getTop());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -579,6 +577,14 @@ public class WebRtcCallView extends ConstraintLayout {
|
|||||||
setStatus(getContext().getString(statusRes));
|
setStatus(getContext().getString(statusRes));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private @NonNull View getPipBarrier() {
|
||||||
|
if (collapsedToolbar.isEnabled()) {
|
||||||
|
return collapsedToolbar;
|
||||||
|
} else {
|
||||||
|
return largeHeader;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setStatusFromHangupType(@NonNull HangupMessage.Type hangupType) {
|
public void setStatusFromHangupType(@NonNull HangupMessage.Type hangupType) {
|
||||||
switch (hangupType) {
|
switch (hangupType) {
|
||||||
case NORMAL:
|
case NORMAL:
|
||||||
|
|||||||
Reference in New Issue
Block a user