Integrate RingRTC v2.0.1

This commit is contained in:
Alex Hart
2020-05-08 14:39:32 -03:00
parent ee9270845a
commit 26e582d806
13 changed files with 493 additions and 214 deletions

View File

@@ -37,6 +37,7 @@ import org.thoughtcrime.securesms.util.AvatarUtil;
import org.thoughtcrime.securesms.util.ViewUtil;
import org.webrtc.RendererCommon;
import org.webrtc.SurfaceViewRenderer;
import org.whispersystems.signalservice.api.messages.calls.HangupMessage;
public class WebRtcCallView extends FrameLayout {
@@ -290,6 +291,25 @@ public class WebRtcCallView extends FrameLayout {
this.status.setText(status);
}
public void setStatusFromHangupType(@NonNull HangupMessage.Type hangupType) {
switch (hangupType) {
case NORMAL:
status.setText(R.string.RedPhone_ending_call);
break;
case ACCEPTED:
status.setText(R.string.WebRtcCallActivity__answered_on_a_linked_device);
break;
case DECLINED:
status.setText(R.string.WebRtcCallActivity__declined_on_a_linked_device);
break;
case BUSY:
status.setText(R.string.WebRtcCallActivity__busy_on_a_linked_device);
break;
default:
throw new IllegalStateException("Unknown hangup type: " + hangupType);
}
}
public void setWebRtcControls(WebRtcControls webRtcControls) {
answerWithVoiceGroup.setVisibility(View.GONE);