In accounts file, moved ;extra from last to middle
Use UTF_8 in accounts byte array
This commit is contained in:
@ -132,8 +132,6 @@ class Account(val accp: Long) {
|
||||
if (answerMode == Api.ANSWERMODE_AUTO)
|
||||
res += ";answermode=auto"
|
||||
|
||||
res += ";ptime=20;regint=${regint};regq=0.5;pubint=0;call_transfer=yes;100rel=no"
|
||||
|
||||
var extra = ""
|
||||
|
||||
if (nickName != "")
|
||||
@ -154,6 +152,8 @@ class Account(val accp: Long) {
|
||||
if (extra !="")
|
||||
res += ";extra=\"" + extra.substringAfter(";") + "\""
|
||||
|
||||
res += ";ptime=20;regint=${regint};regq=0.5;pubint=0;call_transfer=yes;100rel=no"
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
@ -135,11 +135,9 @@ class AccountsActivity : AppCompatActivity() {
|
||||
|
||||
fun saveAccounts() {
|
||||
var accounts = ""
|
||||
for (a in Account.accounts()) {
|
||||
accounts = accounts + a.print() + "\n"
|
||||
}
|
||||
Utils.putFileContents(BaresipService.filesPath + "/accounts", accounts.toByteArray())
|
||||
// Log.e(TAG, "Saved accounts '${accounts}' to '${BaresipService.filesPath}/accounts'")
|
||||
for (a in Account.accounts()) accounts = accounts + a.print() + "\n"
|
||||
Utils.putFileContents(BaresipService.filesPath + "/accounts", accounts.toByteArray(Charsets.UTF_8))
|
||||
// Log.d(TAG, "Saved accounts '${accounts}' to '${BaresipService.filesPath}/accounts'")
|
||||
}
|
||||
|
||||
fun noAccounts(): Boolean {
|
||||
|
||||
Reference in New Issue
Block a user