mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 03:55:16 +00:00
Reverting when block
This commit is contained in:
parent
c3a342ab61
commit
b02569dfce
@ -290,35 +290,33 @@ class WebRtcCallService : LifecycleService(), CallManager.WebRtcListener {
|
|||||||
val action = intent.action
|
val action = intent.action
|
||||||
val callId = ((intent.getSerializableExtra(EXTRA_CALL_ID) as? UUID)?.toString() ?: "No callId")
|
val callId = ((intent.getSerializableExtra(EXTRA_CALL_ID) as? UUID)?.toString() ?: "No callId")
|
||||||
Log.i("Loki", "Handling ${intent.action} for call: ${callId}")
|
Log.i("Loki", "Handling ${intent.action} for call: ${callId}")
|
||||||
when (action) {
|
when {
|
||||||
ACTION_INCOMING_RING -> if (isSameCall(intent) && callManager.currentConnectionState == CallState.Reconnecting) {
|
action == ACTION_INCOMING_RING && isSameCall(intent) && callManager.currentConnectionState == CallState.Reconnecting -> handleNewOffer(
|
||||||
handleNewOffer(intent)
|
intent
|
||||||
}
|
)
|
||||||
ACTION_PRE_OFFER -> if (isIdle()) handlePreOffer(intent)
|
action == ACTION_PRE_OFFER && isIdle() -> handlePreOffer(intent)
|
||||||
ACTION_INCOMING_RING -> when {
|
action == ACTION_INCOMING_RING && isBusy(intent) -> handleBusyCall(intent)
|
||||||
isBusy(intent) -> handleBusyCall(intent)
|
action == ACTION_INCOMING_RING && isPreOffer() -> handleIncomingRing(intent)
|
||||||
isPreOffer() -> handleIncomingRing(intent)
|
action == ACTION_OUTGOING_CALL && isIdle() -> handleOutgoingCall(intent)
|
||||||
}
|
action == ACTION_ANSWER_CALL -> handleAnswerCall(intent)
|
||||||
ACTION_OUTGOING_CALL -> if (isIdle()) handleOutgoingCall(intent)
|
action == ACTION_DENY_CALL -> handleDenyCall(intent)
|
||||||
ACTION_ANSWER_CALL -> handleAnswerCall(intent)
|
action == ACTION_LOCAL_HANGUP -> handleLocalHangup(intent)
|
||||||
ACTION_DENY_CALL -> handleDenyCall(intent)
|
action == ACTION_REMOTE_HANGUP -> handleRemoteHangup(intent)
|
||||||
ACTION_LOCAL_HANGUP -> handleLocalHangup(intent)
|
action == ACTION_SET_MUTE_AUDIO -> handleSetMuteAudio(intent)
|
||||||
ACTION_REMOTE_HANGUP -> handleRemoteHangup(intent)
|
action == ACTION_SET_MUTE_VIDEO -> handleSetMuteVideo(intent)
|
||||||
ACTION_SET_MUTE_AUDIO -> handleSetMuteAudio(intent)
|
action == ACTION_FLIP_CAMERA -> handleSetCameraFlip(intent)
|
||||||
ACTION_SET_MUTE_VIDEO -> handleSetMuteVideo(intent)
|
action == ACTION_WIRED_HEADSET_CHANGE -> handleWiredHeadsetChanged(intent)
|
||||||
ACTION_FLIP_CAMERA -> handleSetCameraFlip(intent)
|
action == ACTION_SCREEN_OFF -> handleScreenOffChange(intent)
|
||||||
ACTION_WIRED_HEADSET_CHANGE -> handleWiredHeadsetChanged(intent)
|
action == ACTION_RESPONSE_MESSAGE && isSameCall(intent) && callManager.currentConnectionState == CallState.Reconnecting -> handleResponseMessage(
|
||||||
ACTION_SCREEN_OFF -> handleScreenOffChange(intent)
|
intent
|
||||||
ACTION_RESPONSE_MESSAGE -> if (isSameCall(intent) && callManager.currentConnectionState == CallState.Reconnecting) {
|
)
|
||||||
handleResponseMessage(intent)
|
action == ACTION_RESPONSE_MESSAGE -> handleResponseMessage(intent)
|
||||||
}
|
action == ACTION_ICE_MESSAGE -> handleRemoteIceCandidate(intent)
|
||||||
ACTION_RESPONSE_MESSAGE -> handleResponseMessage(intent)
|
action == ACTION_ICE_CONNECTED -> handleIceConnected(intent)
|
||||||
ACTION_ICE_MESSAGE -> handleRemoteIceCandidate(intent)
|
action == ACTION_CHECK_TIMEOUT -> handleCheckTimeout(intent)
|
||||||
ACTION_ICE_CONNECTED -> handleIceConnected(intent)
|
action == ACTION_CHECK_RECONNECT -> handleCheckReconnect(intent)
|
||||||
ACTION_CHECK_TIMEOUT -> handleCheckTimeout(intent)
|
action == ACTION_IS_IN_CALL_QUERY -> handleIsInCallQuery(intent)
|
||||||
ACTION_CHECK_RECONNECT -> handleCheckReconnect(intent)
|
action == ACTION_UPDATE_AUDIO -> handleUpdateAudio(intent)
|
||||||
ACTION_IS_IN_CALL_QUERY -> handleIsInCallQuery(intent)
|
|
||||||
ACTION_UPDATE_AUDIO -> handleUpdateAudio(intent)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return START_NOT_STICKY
|
return START_NOT_STICKY
|
||||||
|
Loading…
Reference in New Issue
Block a user