refactor: move start ringer and init of audio manager to CallManager.kt and string fix up

This commit is contained in:
jubb
2021-11-29 11:57:27 +11:00
parent 644213ea32
commit f9b560d3d5
4 changed files with 6 additions and 6 deletions

View File

@@ -356,8 +356,6 @@ class WebRtcCallService: Service(), CallManager.WebRtcListener {
callManager.onIncomingRing(offer, callId, recipient, timestamp)
callManager.postConnectionEvent(STATE_LOCAL_RINGING)
callManager.postViewModelState(CallViewModel.State.CALL_RINGING)
callManager.initializeAudioForCall()
callManager.startIncomingRinger()
registerPowerButtonReceiver()
}

View File

@@ -382,6 +382,7 @@ class CallManager(context: Context, audioManager: AudioManagerCompat, private va
this.recipient = recipient
this.pendingOffer = offer
this.pendingOfferTime = callTime
initializeAudioForCall()
startIncomingRinger()
}

View File

@@ -27,8 +27,9 @@ class PeerConnectionWrapper(context: Context,
get() = peerConnection.localDescription != null && peerConnection.remoteDescription != null
init {
val turn = PeerConnection.IceServer.builder("turn:freyr.getsession.org").setUsername("session").setPassword("session").createIceServer()
val iceServers = listOf(turn)
val iceServers = listOf("freyr","fenrir","frigg","angus","hereford","holstein","brahman").map { sub ->
PeerConnection.IceServer.builder("turn:$sub.getsession.org").setUsername("session202111").setPassword("053c268164bc7bd7").createIceServer()
}
val constraints = MediaConstraints().apply {
optional.add(MediaConstraints.KeyValuePair("DtlsSrtpKeyAgreement", "true"))

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Session</string>
<string name="app_name" translatable="false">Session</string>
<string name="yes">Yes</string>
<string name="no">No</string>
<string name="delete">Delete</string>
<string name="ban">Ban</string>
<string name="please_wait">Please wait...</string>
<string name="please_wait">Please wait</string>
<string name="save">Save</string>
<string name="note_to_self">Note to Self</string>
<string name="version_s">Version %s</string>