Added support for numeric keyboard account setting (UI is still missing)

This commit is contained in:
Juha Heinanen
2025-04-28 08:02:21 +03:00
parent b301c3db3b
commit 3d2c1b3fef
2 changed files with 18 additions and 6 deletions
@@ -40,6 +40,7 @@ class Account(val accp: Long) {
var countryCode = ""
var telProvider = Utils.aorDomain(aor)
var resumeUri = ""
var numericKeyboard = false
init {
@@ -70,14 +71,15 @@ class Account(val accp: Long) {
val extra = Api.account_extra(accp)
if (Utils.paramExists(extra, "nickname"))
nickName.value = Utils.paramValue(extra,"nickname")
nickName.value = Utils.paramValue(extra, "nickname")
if (Utils.paramExists(extra, "regint"))
configuredRegInt = Utils.paramValue(extra,"regint").toInt()
callHistory = Utils.paramValue(extra,"call_history") == ""
configuredRegInt = Utils.paramValue(extra, "regint").toInt()
callHistory = Utils.paramValue(extra, "call_history") == ""
if (Utils.paramExists(extra, "country_code"))
countryCode = Utils.paramValue(extra,"country_code")
countryCode = Utils.paramValue(extra, "country_code")
if (Utils.paramExists(extra, "tel_provider"))
telProvider = URLDecoder.decode(Utils.paramValue(extra,"tel_provider"), "UTF-8")
telProvider = URLDecoder.decode(Utils.paramValue(extra, "tel_provider"), "UTF-8")
numericKeyboard = Utils.paramExists(extra, "numeric_keyboard")
}
fun print() : String {
@@ -167,6 +169,9 @@ class Account(val accp: Long) {
if (configuredRegInt != REGISTRATION_INTERVAL)
extra += ";regint=$configuredRegInt"
if (numericKeyboard)
extra += ";numeric_keyboard=yes"
if (extra !="")
res += ";extra=\"" + extra.substringAfter(";") + "\""