Update to RingRTC v2.28.0

Co-authored-by: Jordan Rose <jrose@signal.org>
This commit is contained in:
Jim Gustafson
2023-06-01 07:25:54 -07:00
committed by Cody Henthorne
parent cd9a160cae
commit c08e108fc3
23 changed files with 67 additions and 72 deletions

View File

@@ -73,7 +73,7 @@ public class GroupJoiningActionProcessor extends GroupActionProcessor {
try {
groupCall.setOutgoingVideoMuted(!currentState.getLocalDeviceState().getCameraState().isEnabled());
groupCall.setOutgoingAudioMuted(!currentState.getLocalDeviceState().isMicrophoneEnabled());
groupCall.setBandwidthMode(NetworkUtil.getCallingBandwidthMode(context, device.getNetworkRoute().getLocalAdapterType()));
groupCall.setDataMode(NetworkUtil.getCallingDataMode(context, device.getNetworkRoute().getLocalAdapterType()));
} catch (CallException e) {
Log.e(tag, e);
throw new RuntimeException(e);

View File

@@ -52,7 +52,7 @@ public class GroupPreJoinActionProcessor extends GroupActionProcessor {
try {
groupCall.setOutgoingAudioMuted(true);
groupCall.setOutgoingVideoMuted(true);
groupCall.setBandwidthMode(NetworkUtil.getCallingBandwidthMode(context, groupCall.getLocalDeviceState().getNetworkRoute().getLocalAdapterType()));
groupCall.setDataMode(NetworkUtil.getCallingDataMode(context, groupCall.getLocalDeviceState().getNetworkRoute().getLocalAdapterType()));
Log.i(TAG, "Connecting to group call: " + currentState.getCallInfoState().getCallRecipient().getId());
groupCall.connect();
@@ -162,7 +162,7 @@ public class GroupPreJoinActionProcessor extends GroupActionProcessor {
groupCall.setOutgoingVideoSource(currentState.getVideoState().requireLocalSink(), currentState.getVideoState().requireCamera());
groupCall.setOutgoingVideoMuted(!currentState.getLocalDeviceState().getCameraState().isEnabled());
groupCall.setOutgoingAudioMuted(!currentState.getLocalDeviceState().isMicrophoneEnabled());
groupCall.setBandwidthMode(NetworkUtil.getCallingBandwidthMode(context, groupCall.getLocalDeviceState().getNetworkRoute().getLocalAdapterType()));
groupCall.setDataMode(NetworkUtil.getCallingDataMode(context, groupCall.getLocalDeviceState().getNetworkRoute().getLocalAdapterType()));
groupCall.join();
} catch (CallException e) {

View File

@@ -107,7 +107,7 @@ public class IncomingCallActionProcessor extends DeviceAwareActionProcessor {
videoState.requireCamera(),
callSetupState.getIceServers(),
hideIp,
NetworkUtil.getCallingBandwidthMode(context),
NetworkUtil.getCallingDataMode(context),
AUDIO_LEVELS_INTERVAL,
false);
} catch (CallException e) {

View File

@@ -189,7 +189,7 @@ public final class IncomingGroupCallActionProcessor extends DeviceAwareActionPro
try {
groupCall.setOutgoingAudioMuted(true);
groupCall.setOutgoingVideoMuted(true);
groupCall.setBandwidthMode(NetworkUtil.getCallingBandwidthMode(context, groupCall.getLocalDeviceState().getNetworkRoute().getLocalAdapterType()));
groupCall.setDataMode(NetworkUtil.getCallingDataMode(context, groupCall.getLocalDeviceState().getNetworkRoute().getLocalAdapterType()));
Log.i(TAG, "Connecting to group call: " + currentState.getCallInfoState().getCallRecipient().getId());
groupCall.connect();
@@ -215,7 +215,7 @@ public final class IncomingGroupCallActionProcessor extends DeviceAwareActionPro
groupCall.setOutgoingVideoSource(currentState.getVideoState().requireLocalSink(), currentState.getVideoState().requireCamera());
groupCall.setOutgoingVideoMuted(answerWithVideo);
groupCall.setOutgoingAudioMuted(!currentState.getLocalDeviceState().isMicrophoneEnabled());
groupCall.setBandwidthMode(NetworkUtil.getCallingBandwidthMode(context, groupCall.getLocalDeviceState().getNetworkRoute().getLocalAdapterType()));
groupCall.setDataMode(NetworkUtil.getCallingDataMode(context, groupCall.getLocalDeviceState().getNetworkRoute().getLocalAdapterType()));
groupCall.join();
} catch (CallException e) {

View File

@@ -157,7 +157,7 @@ public class OutgoingCallActionProcessor extends DeviceAwareActionProcessor {
videoState.requireCamera(),
callSetupState.getIceServers(),
callSetupState.isAlwaysTurnServers(),
NetworkUtil.getCallingBandwidthMode(context),
NetworkUtil.getCallingDataMode(context),
AUDIO_LEVELS_INTERVAL,
currentState.getCallSetupState(activePeer).isEnableVideoOnCreate());
} catch (CallException e) {

View File

@@ -264,8 +264,8 @@ private void processStateless(@NonNull Function1<WebRtcEphemeralState, WebRtcEph
process((s, p) -> p.handleNetworkChanged(s, available));
}
public void bandwidthModeUpdate() {
process((s, p) -> p.handleBandwidthModeUpdate(s));
public void dataModeUpdate() {
process((s, p) -> p.handleDataModeUpdate(s));
}
public void screenOff() {

View File

@@ -5,7 +5,6 @@ import android.os.ResultReceiver;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import com.annimon.stream.Stream;
@@ -55,7 +54,6 @@ import org.whispersystems.signalservice.api.messages.calls.HangupMessage;
import org.whispersystems.signalservice.api.messages.calls.IceUpdateMessage;
import org.whispersystems.signalservice.api.messages.calls.OfferMessage;
import org.whispersystems.signalservice.api.messages.calls.SignalServiceCallMessage;
import org.whispersystems.signalservice.api.push.ServiceId;
import java.util.Collection;
import java.util.List;
@@ -561,9 +559,9 @@ public abstract class WebRtcActionProcessor {
protected @NonNull WebRtcServiceState handleNetworkRouteChanged(@NonNull WebRtcServiceState currentState, @NonNull NetworkRoute networkRoute) {
Log.i(tag, "onNetworkRouteChanged: localAdapterType: " + networkRoute.getLocalAdapterType());
try {
webRtcInteractor.getCallManager().updateBandwidthMode(NetworkUtil.getCallingBandwidthMode(context, networkRoute.getLocalAdapterType()));
webRtcInteractor.getCallManager().updateDataMode(NetworkUtil.getCallingDataMode(context, networkRoute.getLocalAdapterType()));
} catch (CallException e) {
Log.w(tag, "Unable to update bandwidth mode on CallManager", e);
Log.w(tag, "Unable to update data mode on CallManager", e);
}
PeerConnection.AdapterType type = networkRoute.getLocalAdapterType();
@@ -574,11 +572,11 @@ public abstract class WebRtcActionProcessor {
.build();
}
protected @NonNull WebRtcServiceState handleBandwidthModeUpdate(@NonNull WebRtcServiceState currentState) {
protected @NonNull WebRtcServiceState handleDataModeUpdate(@NonNull WebRtcServiceState currentState) {
try {
webRtcInteractor.getCallManager().updateBandwidthMode(NetworkUtil.getCallingBandwidthMode(context));
webRtcInteractor.getCallManager().updateDataMode(NetworkUtil.getCallingDataMode(context));
} catch (CallException e) {
Log.i(tag, "handleBandwidthModeUpdate: could not update bandwidth mode.");
Log.i(tag, "handleDataModeUpdate: could not update data mode.");
}
return currentState;

View File

@@ -366,7 +366,7 @@ public final class WebRtcCallService extends Service implements SignalAudioManag
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
ApplicationDependencies.getSignalCallManager().networkChange(activeNetworkInfo != null && activeNetworkInfo.isConnected());
ApplicationDependencies.getSignalCallManager().bandwidthModeUpdate();
ApplicationDependencies.getSignalCallManager().dataModeUpdate();
}
}