diff --git a/app/build.gradle b/app/build.gradle index 5db596bc..cf85accc 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -12,7 +12,8 @@ android { versionName = '47.3.0' externalNativeBuild { cmake { - cFlags '-DHAVE_INTTYPES_H' + cFlags '-DHAVE_INTTYPES_H -lstdc++' + arguments '-DANDROID_STL=c++_shared' version '3.18.1' } } @@ -51,7 +52,7 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'androidx.appcompat:appcompat:1.4.2' + implementation 'androidx.appcompat:appcompat:1.5.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation 'com.google.android.material:material:1.6.1' @@ -64,6 +65,6 @@ dependencies { implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1' implementation "androidx.lifecycle:lifecycle-extensions:2.2.0" implementation "androidx.activity:activity-ktx:1.5.1" - implementation "androidx.fragment:fragment-ktx:1.5.1" + implementation "androidx.fragment:fragment-ktx:1.5.2" implementation 'androidx.media:media:1.6.0' } diff --git a/app/src/main/cpp/CMakeLists.txt b/app/src/main/cpp/CMakeLists.txt index ec6b9219..70ebf7e6 100644 --- a/app/src/main/cpp/CMakeLists.txt +++ b/app/src/main/cpp/CMakeLists.txt @@ -52,13 +52,9 @@ add_library(lib_webrtc STATIC IMPORTED) set_target_properties(lib_webrtc PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/webrtc/lib/${ANDROID_ABI}/libwebrtc.a) -add_library(lib_bn STATIC IMPORTED) -set_target_properties(lib_bn PROPERTIES IMPORTED_LOCATION - ${distribution_DIR}/bn/lib/${ANDROID_ABI}/libbn.a) - -add_library(lib_zrtp STATIC IMPORTED) -set_target_properties(lib_zrtp PROPERTIES IMPORTED_LOCATION - ${distribution_DIR}/zrtp/lib/${ANDROID_ABI}/libzrtp.a) +add_library(lib_zrtpcppcore STATIC IMPORTED) +set_target_properties(lib_zrtpcppcore PROPERTIES IMPORTED_LOCATION + ${distribution_DIR}/gzrtp/lib/${ANDROID_ABI}/libzrtpcppcore.a) add_library(lib_baresip STATIC IMPORTED) set_target_properties(lib_baresip PROPERTIES IMPORTED_LOCATION @@ -90,7 +86,6 @@ target_link_libraries(baresip lib_amrwb lib_amrwbenc lib_webrtc - lib_zrtp - lib_bn + lib_zrtpcppcore z log) diff --git a/app/src/main/kotlin/com/tutpro/baresip/Config.kt b/app/src/main/kotlin/com/tutpro/baresip/Config.kt index 92939f49..6dd1dc78 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/Config.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/Config.kt @@ -18,6 +18,8 @@ object Config { config = config.replace("webrtc_aec.so", "webrtc_aecm.so") + config = config.replace("module zrtp.so", "module gzrtp.so") + if (config.contains("rtp_stats no")) replaceVariable("rtp_stats", "yes") diff --git a/app/src/main/kotlin/com/tutpro/baresip/MainActivity.kt b/app/src/main/kotlin/com/tutpro/baresip/MainActivity.kt index 81777753..95ab625e 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/MainActivity.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/MainActivity.kt @@ -240,7 +240,8 @@ class MainActivity : AppCompatActivity() { accountRequest!!.launch(i) true } else { - BaresipService.uas[aorSpinner.selectedItemPosition].account.resumeUri = + if (aorSpinner.selectedItemPosition < BaresipService.uas.size) + BaresipService.uas[aorSpinner.selectedItemPosition].account.resumeUri = callUri.text.toString() false } @@ -1034,16 +1035,15 @@ class MainActivity : AppCompatActivity() { } with(MaterialAlertDialogBuilder(this, R.style.AlertDialogTheme)) { setTitle(R.string.verify) - setMessage(String.format(getString(R.string.verify_sas), - ev[1], ev[2])) + setMessage(String.format(getString(R.string.verify_sas), ev[1])) setPositiveButton(getString(R.string.yes)) { dialog, _ -> - call.security = if (Api.cmd_exec("zrtp_verify ${ev[3]}") != 0) { - Log.e(TAG, "Command 'zrtp_verify ${ev[3]}' failed") + call.security = if (Api.cmd_exec("zrtp_verify ${ev[2]}") != 0) { + Log.e(TAG, "Command 'zrtp_verify ${ev[2]}' failed") R.drawable.locked_yellow } else { R.drawable.locked_green } - call.zid = ev[3] + call.zid = ev[2] if (aor == aorSpinner.tag) { securityButton.tag = call.security securityButton.setImageResource(call.security) @@ -1052,7 +1052,7 @@ class MainActivity : AppCompatActivity() { } setNeutralButton(getString(R.string.no)) { dialog, _ -> call.security = R.drawable.locked_yellow - call.zid = ev[3] + call.zid = ev[2] if (aor == aorSpinner.tag) { securityButton.tag = R.drawable.locked_yellow securityButton.setImageResource(R.drawable.locked_yellow) diff --git a/app/src/main/kotlin/com/tutpro/baresip/Utils.kt b/app/src/main/kotlin/com/tutpro/baresip/Utils.kt index df2af77e..eadf4a93 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/Utils.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/Utils.kt @@ -783,7 +783,7 @@ object Utils { fun unZip(zipFilePath: String): Boolean { val allFiles = listOf("accounts", "calls", "config", "contacts", "messages", "uuid", - "zrtp_cache.dat", "zrtp_zid", "cert.pem", "ca_cert", "ca_certs.crt") + "gzrtp_zid", "cert.pem", "ca_cert", "ca_certs.crt") val zipFiles = mutableListOf() try { ZipFile(zipFilePath).use { zip -> diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index cc73dbfc..d789dcec 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -37,9 +37,9 @@

Lisenssit

]]> @@ -539,4 +539,4 @@ Valitse puhelinpalvelun tarjoava tili Puhelutiedot Et voi käyttää Androidin yhteystietoja ilman Yhteystiedot-sovelluslupaa. - \ No newline at end of file + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index cbd3247a..2f561704 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -43,9 +43,9 @@

Licenses

]]> @@ -476,7 +476,7 @@
Registering of \`%1$s\` failed. Verify Request - Do you want to verify SAS <%1$s> <%2$s>? + Do you want to verify SAS <%1$s>? Transfer Request Do you accept to transfer this call to \'%1$s\'? Call failed