mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-26 11:51:10 +01:00
Integrate RingRTC v2.0.1
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user