mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 10:20:25 +01:00
Fix improper glare handling.
This commit is contained in:
committed by
Greyson Parrelli
parent
09dd2583b9
commit
49270e677e
@@ -116,6 +116,7 @@ public class WebRtcCallView extends ConstraintLayout {
|
||||
private View foldParticipantCountWrapper;
|
||||
private TextView foldParticipantCount;
|
||||
private AvatarImageView largeHeaderAvatar;
|
||||
private ConstraintSet largeHeaderConstraints;
|
||||
private ConstraintSet smallHeaderConstraints;
|
||||
private Guideline statusBarGuideline;
|
||||
private View fullScreenShade;
|
||||
@@ -293,6 +294,9 @@ public class WebRtcCallView extends ConstraintLayout {
|
||||
rotatableControls.add(smallLocalRender.findViewById(R.id.call_participant_mic_muted));
|
||||
rotatableControls.add(ringToggle);
|
||||
|
||||
largeHeaderConstraints = new ConstraintSet();
|
||||
largeHeaderConstraints.clone(getContext(), R.layout.webrtc_call_view_header_large);
|
||||
|
||||
smallHeaderConstraints = new ConstraintSet();
|
||||
smallHeaderConstraints.clone(getContext(), R.layout.webrtc_call_view_header_small);
|
||||
}
|
||||
@@ -689,6 +693,7 @@ public class WebRtcCallView extends ConstraintLayout {
|
||||
if (!visibleViewSet.equals(lastVisibleSet) ||
|
||||
!controls.isFadeOutEnabled() ||
|
||||
(webRtcControls.showSmallHeader() && largeHeaderAvatar.getVisibility() == View.VISIBLE) ||
|
||||
(!webRtcControls.showSmallHeader() && largeHeaderAvatar.getVisibility() == View.GONE) ||
|
||||
forceUpdate)
|
||||
{
|
||||
|
||||
@@ -930,6 +935,8 @@ public class WebRtcCallView extends ConstraintLayout {
|
||||
|
||||
if (showSmallHeader) {
|
||||
smallHeaderConstraints.applyTo(toolbar);
|
||||
} else {
|
||||
largeHeaderConstraints.applyTo(toolbar);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -343,6 +343,9 @@ public class WebRtcCallViewModel extends ViewModel {
|
||||
case CALL_DISCONNECTED:
|
||||
callState = WebRtcControls.CallState.ENDING;
|
||||
break;
|
||||
case CALL_DISCONNECTED_GLARE:
|
||||
callState = WebRtcControls.CallState.INCOMING;
|
||||
break;
|
||||
case NETWORK_FAILURE:
|
||||
callState = WebRtcControls.CallState.ERROR;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user