Verify event now has only two arguments

This commit is contained in:
Juha Heinanen
2022-08-25 08:22:58 +03:00
parent dbccfcf86f
commit dd01ec6371
2 changed files with 6 additions and 7 deletions
@@ -791,7 +791,7 @@ class BaresipService: Service() {
call!!.security = R.drawable.locked_yellow call!!.security = R.drawable.locked_yellow
} else { } else {
call!!.security = R.drawable.locked_green call!!.security = R.drawable.locked_green
call.zid = ev[3] call.zid = ev[1]
} }
if (!isMainVisible) if (!isMainVisible)
return return
@@ -1034,16 +1034,15 @@ class MainActivity : AppCompatActivity() {
} }
with(MaterialAlertDialogBuilder(this, R.style.AlertDialogTheme)) { with(MaterialAlertDialogBuilder(this, R.style.AlertDialogTheme)) {
setTitle(R.string.verify) setTitle(R.string.verify)
setMessage(String.format(getString(R.string.verify_sas), setMessage(String.format(getString(R.string.verify_sas), ev[1]))
ev[1], ev[2]))
setPositiveButton(getString(R.string.yes)) { dialog, _ -> setPositiveButton(getString(R.string.yes)) { dialog, _ ->
call.security = if (Api.cmd_exec("zrtp_verify ${ev[3]}") != 0) { call.security = if (Api.cmd_exec("zrtp_verify ${ev[2]}") != 0) {
Log.e(TAG, "Command 'zrtp_verify ${ev[3]}' failed") Log.e(TAG, "Command 'zrtp_verify ${ev[2]}' failed")
R.drawable.locked_yellow R.drawable.locked_yellow
} else { } else {
R.drawable.locked_green R.drawable.locked_green
} }
call.zid = ev[3] call.zid = ev[2]
if (aor == aorSpinner.tag) { if (aor == aorSpinner.tag) {
securityButton.tag = call.security securityButton.tag = call.security
securityButton.setImageResource(call.security) securityButton.setImageResource(call.security)
@@ -1052,7 +1051,7 @@ class MainActivity : AppCompatActivity() {
} }
setNeutralButton(getString(R.string.no)) { dialog, _ -> setNeutralButton(getString(R.string.no)) { dialog, _ ->
call.security = R.drawable.locked_yellow call.security = R.drawable.locked_yellow
call.zid = ev[3] call.zid = ev[2]
if (aor == aorSpinner.tag) { if (aor == aorSpinner.tag) {
securityButton.tag = R.drawable.locked_yellow securityButton.tag = R.drawable.locked_yellow
securityButton.setImageResource(R.drawable.locked_yellow) securityButton.setImageResource(R.drawable.locked_yellow)