trim white spece from new account and callee
This commit is contained in:
@ -29,7 +29,7 @@ class AccountsActivity : AppCompatActivity() {
|
||||
val addAccountButton = findViewById(R.id.addAccount) as ImageButton
|
||||
val newAorView = findViewById(R.id.newAor) as EditText
|
||||
addAccountButton.setOnClickListener{
|
||||
var aor = newAorView.text.toString()
|
||||
var aor = newAorView.text.toString().trim()
|
||||
if (!aor.startsWith("sip:")) aor = "sip:$aor"
|
||||
if (!checkSipUri(aor)) {
|
||||
Log.e("Baresip", "Invalid SIP URI $aor")
|
||||
|
||||
@ -237,6 +237,7 @@ class MainActivity : AppCompatActivity() {
|
||||
"Call" -> {
|
||||
if (!ONE_CALL_ONLY || calls.isEmpty()) {
|
||||
val calleeText = (findViewById(R.id.callee) as EditText).text.toString()
|
||||
.trim()
|
||||
if (calleeText.length > 0) {
|
||||
var uri = ContactsActivity.findContactURI(calleeText)
|
||||
if (!uri.startsWith("sip:")) uri = "sip:$uri"
|
||||
|
||||
Reference in New Issue
Block a user