mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Check if SIP addresses fields are empty before parsing them
This commit is contained in:
parent
b7996b9e82
commit
3ccf4dc3a6
1 changed files with 25 additions and 12 deletions
|
|
@ -185,22 +185,35 @@ class AccountSettingsViewModel @UiThread constructor() : GenericViewModel() {
|
|||
|
||||
newParams.isCpimInBasicChatRoomEnabled = cpimInBasicChatRooms.value == true
|
||||
|
||||
val mwiAddress = core.interpretUrl(voicemailUri.value.orEmpty(), false)
|
||||
newParams.mwiServerAddress = mwiAddress
|
||||
val mwiUri = voicemailUri.value.orEmpty()
|
||||
if (mwiUri.isNotEmpty()) {
|
||||
val mwiAddress = core.interpretUrl(mwiUri, false)
|
||||
newParams.mwiServerAddress = mwiAddress
|
||||
} else {
|
||||
newParams.mwiServerAddress = null
|
||||
}
|
||||
|
||||
newParams.expires = expire.value?.toInt() ?: 31536000
|
||||
|
||||
val conferenceFactoryAddress = core.interpretUrl(
|
||||
conferenceFactoryUri.value.orEmpty(),
|
||||
false
|
||||
)
|
||||
newParams.conferenceFactoryAddress = conferenceFactoryAddress
|
||||
val conferenceUri = conferenceFactoryUri.value.orEmpty()
|
||||
if (conferenceUri.isNotEmpty()) {
|
||||
val conferenceFactoryAddress = core.interpretUrl(conferenceUri, false)
|
||||
newParams.conferenceFactoryAddress = conferenceFactoryAddress
|
||||
} else {
|
||||
newParams.conferenceFactoryAddress = null
|
||||
}
|
||||
|
||||
val audioVideoConferenceFactoryAddress = core.interpretUrl(
|
||||
audioVideoConferenceFactoryUri.value.orEmpty(),
|
||||
false
|
||||
)
|
||||
newParams.audioVideoConferenceFactoryAddress = audioVideoConferenceFactoryAddress
|
||||
val audioVideoConferenceUri = audioVideoConferenceFactoryUri.value.orEmpty()
|
||||
if (audioVideoConferenceUri.isNotEmpty()) {
|
||||
val audioVideoConferenceFactoryAddress = core.interpretUrl(
|
||||
audioVideoConferenceUri,
|
||||
false
|
||||
)
|
||||
newParams.audioVideoConferenceFactoryAddress =
|
||||
audioVideoConferenceFactoryAddress
|
||||
} else {
|
||||
newParams.audioVideoConferenceFactoryAddress = null
|
||||
}
|
||||
|
||||
newParams.limeServerUrl = limeServerUrl.value
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue