Merge branch '2.14.x'

This commit is contained in:
Daniel Gultsch 2024-04-08 14:20:20 +02:00
commit b7b4a78761
No known key found for this signature in database
GPG key ID: F43D18AD2A0982C2
3 changed files with 11 additions and 2 deletions

View file

@ -297,7 +297,8 @@ public class CallIntegration extends Connection {
}
private AudioDevice getAudioDeviceFallback() {
return requireAppRtcAudioManager().getSelectedAudioDevice();
final var audioDevice = requireAppRtcAudioManager().getSelectedAudioDevice();
return audioDevice == null ? AudioDevice.NONE : audioDevice;
}
private void setAudioDeviceFallback(final AudioDevice audioDevice) {

View file

@ -128,6 +128,12 @@ public class CallIntegrationConnectionService extends ConnectionService {
final var proposal =
service.getJingleConnectionManager()
.proposeJingleRtpSession(account, with, media);
if (proposal == null) {
// TODO instead of just null checking try to get the sessionID
return Connection.createFailedConnection(
new DisconnectCause(
DisconnectCause.ERROR, "a call is already in progress"));
}
intent.putExtra(
RtpSessionActivity.EXTRA_LAST_REPORTED_STATE,
RtpEndUserState.FINDING_DEVICE.toString());

View file

@ -4,6 +4,8 @@ import android.telecom.VideoProfile;
import android.util.Base64;
import android.util.Log;
import androidx.annotation.Nullable;
import com.google.common.base.Objects;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
@ -727,7 +729,7 @@ public class JingleConnectionManager extends AbstractConnectionManager {
return rtpConnection;
}
public RtpSessionProposal proposeJingleRtpSession(
public @Nullable RtpSessionProposal proposeJingleRtpSession(
final Account account, final Jid with, final Set<Media> media) {
synchronized (this.rtpSessionProposals) {
for (final Map.Entry<RtpSessionProposal, DeviceDiscoveryState> entry :