This commit is contained in:
Valere 2020-06-12 17:44:45 +02:00
parent c4b977c6e1
commit 84b474d070
5 changed files with 3 additions and 17 deletions

View File

@ -21,11 +21,9 @@ enum class CallState {
/** Idle, setting up objects */ /** Idle, setting up objects */
IDLE, IDLE,
/** Dialing. Outgoing call is signaling the remote peer */ /** Dialing. Outgoing call is signaling the remote peer */
DIALING, DIALING,
/** Local ringing. Incoming call offer received */ /** Local ringing. Incoming call offer received */
LOCAL_RINGING, LOCAL_RINGING,
@ -35,7 +33,6 @@ enum class CallState {
/** Connecting. Incoming/Outgoing Offer and answer are known, Currently checking and testing pairs of ice candidates */ /** Connecting. Incoming/Outgoing Offer and answer are known, Currently checking and testing pairs of ice candidates */
CONNECTING, CONNECTING,
/** Connected. Incoming/Outgoing call, the call is connected */ /** Connected. Incoming/Outgoing call, the call is connected */
CONNECTED, CONNECTED,

View File

@ -89,7 +89,6 @@ class CallControlsView @JvmOverloads constructor(
interactionListener?.returnToChat() interactionListener?.returnToChat()
} }
fun updateForState(state: VectorCallViewState) { fun updateForState(state: VectorCallViewState) {
val callState = state.callState.invoke() val callState = state.callState.invoke()
muteIcon.setImageResource(if (state.isAudioMuted) R.drawable.ic_microphone_off else R.drawable.ic_microphone_on) muteIcon.setImageResource(if (state.isAudioMuted) R.drawable.ic_microphone_off else R.drawable.ic_microphone_on)

View File

@ -28,8 +28,6 @@ import com.squareup.inject.assisted.AssistedInject
import im.vector.matrix.android.api.session.Session import im.vector.matrix.android.api.session.Session
import im.vector.matrix.android.api.session.call.CallState import im.vector.matrix.android.api.session.call.CallState
import im.vector.matrix.android.api.session.call.MxCall import im.vector.matrix.android.api.session.call.MxCall
import im.vector.matrix.android.api.session.room.model.call.CallAnswerContent
import im.vector.matrix.android.api.session.room.model.call.CallHangupContent
import im.vector.matrix.android.api.util.MatrixItem import im.vector.matrix.android.api.util.MatrixItem
import im.vector.matrix.android.api.util.toMatrixItem import im.vector.matrix.android.api.util.toMatrixItem
import im.vector.riotx.core.extensions.exhaustive import im.vector.riotx.core.extensions.exhaustive
@ -103,7 +101,6 @@ class VectorCallViewModel @AssistedInject constructor(
} }
} }
} }
} }
override fun onCleared() { override fun onCleared() {

View File

@ -607,7 +607,6 @@ class WebRtcPeerConnectionManager @Inject constructor(
* "connecting", or "checking". * "connecting", or "checking".
*/ */
PeerConnection.PeerConnectionState.DISCONNECTED -> { PeerConnection.PeerConnectionState.DISCONNECTED -> {
} }
null -> { null -> {
} }
@ -630,13 +629,11 @@ class WebRtcPeerConnectionManager @Inject constructor(
override fun onIceConnectionChange(newState: PeerConnection.IceConnectionState) { override fun onIceConnectionChange(newState: PeerConnection.IceConnectionState) {
Timber.v("## VOIP StreamObserver onIceConnectionChange IceConnectionState:$newState") Timber.v("## VOIP StreamObserver onIceConnectionChange IceConnectionState:$newState")
when (newState) { when (newState) {
/** /**
* the ICE agent is gathering addresses or is waiting to be given remote candidates through * the ICE agent is gathering addresses or is waiting to be given remote candidates through
* calls to RTCPeerConnection.addIceCandidate() (or both). * calls to RTCPeerConnection.addIceCandidate() (or both).
*/ */
PeerConnection.IceConnectionState.NEW -> { PeerConnection.IceConnectionState.NEW -> {
} }
/** /**
* The ICE agent has been given one or more remote candidates and is checking pairs of local and remote candidates * The ICE agent has been given one or more remote candidates and is checking pairs of local and remote candidates
@ -644,7 +641,6 @@ class WebRtcPeerConnectionManager @Inject constructor(
* the peer connection to be made. It's possible that gathering of candidates is also still underway. * the peer connection to be made. It's possible that gathering of candidates is also still underway.
*/ */
PeerConnection.IceConnectionState.CHECKING -> { PeerConnection.IceConnectionState.CHECKING -> {
} }
/** /**
@ -654,7 +650,6 @@ class WebRtcPeerConnectionManager @Inject constructor(
* candidates against one another looking for a better connection to use. * candidates against one another looking for a better connection to use.
*/ */
PeerConnection.IceConnectionState.CONNECTED -> { PeerConnection.IceConnectionState.CONNECTED -> {
} }
/** /**
* Checks to ensure that components are still connected failed for at least one component of the RTCPeerConnection. * Checks to ensure that components are still connected failed for at least one component of the RTCPeerConnection.
@ -674,13 +669,11 @@ class WebRtcPeerConnectionManager @Inject constructor(
* The ICE agent has finished gathering candidates, has checked all pairs against one another, and has found a connection for all components. * The ICE agent has finished gathering candidates, has checked all pairs against one another, and has found a connection for all components.
*/ */
PeerConnection.IceConnectionState.COMPLETED -> { PeerConnection.IceConnectionState.COMPLETED -> {
} }
/** /**
* The ICE agent for this RTCPeerConnection has shut down and is no longer handling requests. * The ICE agent for this RTCPeerConnection has shut down and is no longer handling requests.
*/ */
PeerConnection.IceConnectionState.CLOSED -> { PeerConnection.IceConnectionState.CLOSED -> {
} }
} }
} }