diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/call/CallState.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/call/CallState.kt index 25bbe39f03..1ab53854aa 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/call/CallState.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/call/CallState.kt @@ -21,11 +21,9 @@ enum class CallState { /** Idle, setting up objects */ IDLE, - /** Dialing. Outgoing call is signaling the remote peer */ DIALING, - /** Local ringing. Incoming call offer received */ 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, - /** Connected. Incoming/Outgoing call, the call is connected */ CONNECTED, diff --git a/vector/src/main/java/im/vector/riotx/features/call/CallControlsView.kt b/vector/src/main/java/im/vector/riotx/features/call/CallControlsView.kt index 6dbf339373..f8ed0f0cc1 100644 --- a/vector/src/main/java/im/vector/riotx/features/call/CallControlsView.kt +++ b/vector/src/main/java/im/vector/riotx/features/call/CallControlsView.kt @@ -89,7 +89,6 @@ class CallControlsView @JvmOverloads constructor( interactionListener?.returnToChat() } - fun updateForState(state: VectorCallViewState) { val callState = state.callState.invoke() muteIcon.setImageResource(if (state.isAudioMuted) R.drawable.ic_microphone_off else R.drawable.ic_microphone_on) diff --git a/vector/src/main/java/im/vector/riotx/features/call/VectorCallViewModel.kt b/vector/src/main/java/im/vector/riotx/features/call/VectorCallViewModel.kt index f400b6864c..ec09b8bc2c 100644 --- a/vector/src/main/java/im/vector/riotx/features/call/VectorCallViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/call/VectorCallViewModel.kt @@ -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.call.CallState 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.toMatrixItem import im.vector.riotx.core.extensions.exhaustive @@ -103,7 +101,6 @@ class VectorCallViewModel @AssistedInject constructor( } } } - } override fun onCleared() { @@ -138,7 +135,7 @@ class VectorCallViewModel @AssistedInject constructor( } VectorCallViewActions.ToggleVideo -> { withState { - if(it.isVideoCall) { + if (it.isVideoCall) { val videoEnabled = it.isVideoEnabled webRtcPeerConnectionManager.enableVideo(!videoEnabled) setState { diff --git a/vector/src/main/java/im/vector/riotx/features/call/WebRtcPeerConnectionManager.kt b/vector/src/main/java/im/vector/riotx/features/call/WebRtcPeerConnectionManager.kt index 1a60fc97e4..5911aedc15 100644 --- a/vector/src/main/java/im/vector/riotx/features/call/WebRtcPeerConnectionManager.kt +++ b/vector/src/main/java/im/vector/riotx/features/call/WebRtcPeerConnectionManager.kt @@ -607,7 +607,6 @@ class WebRtcPeerConnectionManager @Inject constructor( * "connecting", or "checking". */ PeerConnection.PeerConnectionState.DISCONNECTED -> { - } null -> { } @@ -630,13 +629,11 @@ class WebRtcPeerConnectionManager @Inject constructor( override fun onIceConnectionChange(newState: PeerConnection.IceConnectionState) { Timber.v("## VOIP StreamObserver onIceConnectionChange IceConnectionState:$newState") when (newState) { - /** * the ICE agent is gathering addresses or is waiting to be given remote candidates through * calls to RTCPeerConnection.addIceCandidate() (or both). */ PeerConnection.IceConnectionState.NEW -> { - } /** * 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. */ PeerConnection.IceConnectionState.CHECKING -> { - } /** @@ -654,7 +650,6 @@ class WebRtcPeerConnectionManager @Inject constructor( * candidates against one another looking for a better connection to use. */ PeerConnection.IceConnectionState.CONNECTED -> { - } /** * 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. */ PeerConnection.IceConnectionState.COMPLETED -> { - } /** * The ICE agent for this RTCPeerConnection has shut down and is no longer handling requests. */ PeerConnection.IceConnectionState.CLOSED -> { - } } } @@ -691,7 +684,7 @@ class WebRtcPeerConnectionManager @Inject constructor( // reportError("Weird-looking stream: " + stream); if (stream.audioTracks.size > 1 || stream.videoTracks.size > 1) { Timber.e("## VOIP StreamObserver weird looking stream: $stream") - //TODO maybe do something more?? + // TODO maybe do something more?? callContext.mxCall.hangUp() return@execute } diff --git a/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailFragment.kt b/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailFragment.kt index c1e5e032b0..2bb3fc5d1d 100644 --- a/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailFragment.kt @@ -295,7 +295,7 @@ class RoomDetailFragment @Inject constructor( sharedCallActionViewModel .activeCall .observe(viewLifecycleOwner, Observer { - //TODO delay a bit if it's a new call to let call activity launch before .. + // TODO delay a bit if it's a new call to let call activity launch before .. activeCallView.isVisible = it != null })