Added support for numeric keyboard account setting (UI is still missing)
This commit is contained in:
@ -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(";") + "\""
|
||||
|
||||
|
||||
@ -118,6 +118,7 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.shadow
|
||||
import androidx.compose.ui.focus.FocusRequester
|
||||
import androidx.compose.ui.focus.focusRequester
|
||||
import androidx.compose.ui.focus.onFocusChanged
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.toArgb
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
@ -1078,7 +1079,13 @@ class MainActivity : ComponentActivity() {
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(start = 4.dp, end = 4.dp, top = 12.dp, bottom = 2.dp)
|
||||
.focusRequester(focusRequester),
|
||||
.focusRequester(focusRequester)
|
||||
.onFocusChanged {
|
||||
val account = Account.ofAor(viewModel.selectedAor.value)
|
||||
if (account != null) {
|
||||
dialpad = account.numericKeyboard
|
||||
}
|
||||
},
|
||||
label = {
|
||||
LabelText(
|
||||
text = callUriLabel.value,
|
||||
|
||||
Reference in New Issue
Block a user