Update RingRTC to v2.66.0

This commit is contained in:
adel-signal
2026-03-09 11:57:22 -07:00
committed by jeffrey-signal
parent 04813fe345
commit d06febd5b5
9 changed files with 54 additions and 27 deletions

View File

@@ -20,6 +20,7 @@ import org.thoughtcrime.securesms.keyvalue.SignalStore
import org.thoughtcrime.securesms.ringrtc.RemotePeer
import org.thoughtcrime.securesms.service.webrtc.state.WebRtcServiceState
import org.thoughtcrime.securesms.util.NetworkUtil
import org.thoughtcrime.securesms.util.RemoteConfig
import java.io.IOException
/**
@@ -65,6 +66,8 @@ class CallLinkPreJoinActionProcessor(
.groupsV2Authorization
.getCallLinkAuthorizationForToday(genericServerPublicParams, callLinkSecretParams)
val dredDuration: Byte = RemoteConfig.dredDuration.toByte()
webRtcInteractor.callManager.createCallLinkCall(
SignalStore.internal.groupCallingServer,
serverPublicParams.endorsementPublicKey,
@@ -73,6 +76,7 @@ class CallLinkPreJoinActionProcessor(
callLink.credentials.adminPassBytes,
ByteArray(0),
AUDIO_LEVELS_INTERVAL,
dredDuration,
RingRtcDynamicConfiguration.getAudioConfig(),
webRtcInteractor.groupCallObserver
)

View File

@@ -14,6 +14,7 @@ import org.thoughtcrime.securesms.events.WebRtcViewModel;
import org.thoughtcrime.securesms.keyvalue.SignalStore;
import org.thoughtcrime.securesms.ringrtc.RemotePeer;
import org.thoughtcrime.securesms.service.webrtc.state.WebRtcServiceState;
import org.thoughtcrime.securesms.util.RemoteConfig;
/**
* Processor which is utilized when the network becomes unavailable during a group call. In general,
@@ -48,13 +49,15 @@ public class GroupNetworkUnavailableActionProcessor extends WebRtcActionProcesso
return processor.handlePreJoinCall(currentState.builder().actionProcessor(processor).build(), remotePeer);
}
byte[] groupId = currentState.getCallInfoState().getCallRecipient().requireGroupId().getDecodedId();
GroupCall groupCall = webRtcInteractor.getCallManager().createGroupCall(groupId,
SignalStore.internal().getGroupCallingServer(),
new byte[0],
null,
RingRtcDynamicConfiguration.getAudioConfig(),
webRtcInteractor.getGroupCallObserver());
byte dredDuration = (byte) RemoteConfig.dredDuration();
byte[] groupId = currentState.getCallInfoState().getCallRecipient().requireGroupId().getDecodedId();
GroupCall groupCall = webRtcInteractor.getCallManager().createGroupCall(groupId,
SignalStore.internal().getGroupCallingServer(),
new byte[0],
AUDIO_LEVELS_INTERVAL,
dredDuration,
RingRtcDynamicConfiguration.getAudioConfig(),
webRtcInteractor.getGroupCallObserver());
if (groupCall == null) {
return groupCallFailure(currentState, "RingRTC did not create a group call", null);

View File

@@ -20,6 +20,7 @@ import org.thoughtcrime.securesms.ringrtc.RemotePeer;
import org.thoughtcrime.securesms.service.webrtc.state.WebRtcServiceState;
import org.thoughtcrime.securesms.service.webrtc.state.WebRtcServiceStateBuilder;
import org.thoughtcrime.securesms.util.NetworkUtil;
import org.thoughtcrime.securesms.util.RemoteConfig;
import org.whispersystems.signalservice.api.messages.calls.OfferMessage;
import org.signal.core.models.ServiceId.ACI;
@@ -46,13 +47,15 @@ public class GroupPreJoinActionProcessor extends GroupActionProcessor {
protected @NonNull WebRtcServiceState handlePreJoinCall(@NonNull WebRtcServiceState currentState, @NonNull RemotePeer remotePeer) {
Log.i(tag, "handlePreJoinCall():");
byte[] groupId = currentState.getCallInfoState().getCallRecipient().requireGroupId().getDecodedId();
GroupCall groupCall = webRtcInteractor.getCallManager().createGroupCall(groupId,
SignalStore.internal().getGroupCallingServer(),
new byte[0],
AUDIO_LEVELS_INTERVAL,
RingRtcDynamicConfiguration.getAudioConfig(),
webRtcInteractor.getGroupCallObserver());
byte dredDuration = (byte) RemoteConfig.dredDuration();
byte[] groupId = currentState.getCallInfoState().getCallRecipient().requireGroupId().getDecodedId();
GroupCall groupCall = webRtcInteractor.getCallManager().createGroupCall(groupId,
SignalStore.internal().getGroupCallingServer(),
new byte[0],
AUDIO_LEVELS_INTERVAL,
dredDuration,
RingRtcDynamicConfiguration.getAudioConfig(),
webRtcInteractor.getGroupCallObserver());
if (groupCall == null) {
return groupCallFailure(currentState, "RingRTC did not create a group call", null);

View File

@@ -30,6 +30,7 @@ import org.thoughtcrime.securesms.service.webrtc.state.WebRtcServiceState;
import org.thoughtcrime.securesms.util.AppForegroundObserver;
import org.thoughtcrime.securesms.util.NetworkUtil;
import org.signal.core.util.Util;
import org.thoughtcrime.securesms.util.RemoteConfig;
import org.thoughtcrime.securesms.webrtc.locks.LockManager;
import org.webrtc.PeerConnection;
@@ -96,6 +97,7 @@ public class IncomingCallActionProcessor extends DeviceAwareActionProcessor {
return currentState;
}
byte dredDuration = (byte) RemoteConfig.dredDuration();
boolean hideIp = !activePeer.getRecipient().isProfileSharing() || callSetupState.isAlwaysTurnServers();
VideoState videoState = currentState.getVideoState();
CallParticipant callParticipant = Objects.requireNonNull(currentState.getCallInfoState().getRemoteCallParticipant(activePeer.getRecipient()));
@@ -112,6 +114,7 @@ public class IncomingCallActionProcessor extends DeviceAwareActionProcessor {
hideIp,
NetworkUtil.getCallingDataMode(context),
AUDIO_LEVELS_INTERVAL,
dredDuration,
false);
} catch (CallException e) {
return callFailure(currentState, "Unable to proceed with call: ", e);

View File

@@ -27,6 +27,7 @@ import org.thoughtcrime.securesms.ringrtc.RemotePeer;
import org.thoughtcrime.securesms.service.webrtc.state.WebRtcServiceState;
import org.thoughtcrime.securesms.util.AppForegroundObserver;
import org.thoughtcrime.securesms.util.NetworkUtil;
import org.thoughtcrime.securesms.util.RemoteConfig;
import org.thoughtcrime.securesms.webrtc.locks.LockManager;
import java.util.Optional;
@@ -218,13 +219,15 @@ public final class IncomingGroupCallActionProcessor extends DeviceAwareActionPro
protected @NonNull WebRtcServiceState handleAcceptCall(@NonNull WebRtcServiceState currentState, boolean answerWithVideo) {
currentState = WebRtcVideoUtil.reinitializeCamera(context, webRtcInteractor.getCameraEventListener(), currentState);
byte[] groupId = currentState.getCallInfoState().getCallRecipient().requireGroupId().getDecodedId();
GroupCall groupCall = webRtcInteractor.getCallManager().createGroupCall(groupId,
SignalStore.internal().getGroupCallingServer(),
new byte[0],
AUDIO_LEVELS_INTERVAL,
RingRtcDynamicConfiguration.getAudioConfig(),
webRtcInteractor.getGroupCallObserver());
byte dredDuration = (byte) RemoteConfig.dredDuration();
byte[] groupId = currentState.getCallInfoState().getCallRecipient().requireGroupId().getDecodedId();
GroupCall groupCall = webRtcInteractor.getCallManager().createGroupCall(groupId,
SignalStore.internal().getGroupCallingServer(),
new byte[0],
AUDIO_LEVELS_INTERVAL,
dredDuration,
RingRtcDynamicConfiguration.getAudioConfig(),
webRtcInteractor.getGroupCallObserver());
if (groupCall == null) {
return groupCallFailure(currentState, "RingRTC did not create a group call", null);

View File

@@ -27,6 +27,7 @@ import org.thoughtcrime.securesms.service.webrtc.state.WebRtcServiceState;
import org.thoughtcrime.securesms.service.webrtc.state.WebRtcServiceStateBuilder;
import org.thoughtcrime.securesms.util.NetworkUtil;
import org.signal.core.util.Util;
import org.thoughtcrime.securesms.util.RemoteConfig;
import org.thoughtcrime.securesms.webrtc.audio.SignalAudioManager;
import org.webrtc.PeerConnection;
import org.whispersystems.signalservice.api.messages.calls.OfferMessage;
@@ -144,6 +145,7 @@ public class OutgoingCallActionProcessor extends DeviceAwareActionProcessor {
return currentState;
}
byte dredDuration = (byte) RemoteConfig.dredDuration();
boolean hideIp = !activePeer.getRecipient().isProfileSharing() || callSetupState.isAlwaysTurnServers();
VideoState videoState = currentState.getVideoState();
CallParticipant callParticipant = Objects.requireNonNull(currentState.getCallInfoState().getRemoteCallParticipant(activePeer.getRecipient()));
@@ -160,6 +162,7 @@ public class OutgoingCallActionProcessor extends DeviceAwareActionProcessor {
hideIp,
NetworkUtil.getCallingDataMode(context),
AUDIO_LEVELS_INTERVAL,
dredDuration,
currentState.getCallSetupState(activePeer).isEnableVideoOnCreate());
} catch (CallException e) {
return callFailure(currentState, "Unable to proceed with call: ", e);

View File

@@ -1339,5 +1339,13 @@ object RemoteConfig {
defaultValue = 1.days.inWholeSeconds,
hotSwappable = true
)
@JvmStatic
@get:JvmName("dredDuration")
val dredDuration: Int by remoteInt(
key = "global.calling.dredDuration",
defaultValue = 0,
hotSwappable = true
)
// endregion
}