mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Prevent input error causing crash
This commit is contained in:
parent
f3ab328d74
commit
c8a20f4f57
1 changed files with 14 additions and 1 deletions
|
|
@ -154,7 +154,20 @@ class AccountLoginViewModel @UiThread constructor() : ViewModel() {
|
|||
core.addAuthInfo(newlyCreatedAuthInfo)
|
||||
|
||||
val accountParams = core.createAccountParams()
|
||||
val identityAddress = Factory.instance().createAddress("sip:$user@$domain")
|
||||
val identity = if (user.startsWith("sip:")) {
|
||||
if (user.contains("@")) {
|
||||
user
|
||||
} else {
|
||||
"$user@$domain"
|
||||
}
|
||||
} else {
|
||||
if (user.contains("@")) {
|
||||
"sip:$user"
|
||||
} else {
|
||||
"sip:$user@$domain"
|
||||
}
|
||||
}
|
||||
val identityAddress = Factory.instance().createAddress(identity)
|
||||
accountParams.identityAddress = identityAddress
|
||||
|
||||
val prefix = internationalPrefix.value.orEmpty().trim()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue