Added RTP Statistics Setting
This commit is contained in:
@ -42,6 +42,7 @@ class ConfigActivity : AppCompatActivity() {
|
||||
private lateinit var caFile: CheckBox
|
||||
private lateinit var darkTheme: CheckBox
|
||||
private lateinit var debug: CheckBox
|
||||
private lateinit var rtpStats: CheckBox
|
||||
private lateinit var sipTrace: CheckBox
|
||||
private lateinit var reset: CheckBox
|
||||
private lateinit var requestPermissionLauncher: ActivityResultLauncher<String>
|
||||
@ -53,6 +54,7 @@ class ConfigActivity : AppCompatActivity() {
|
||||
private var oldVerifyServer = ""
|
||||
private var oldCAFile = false
|
||||
private var oldLogLevel = ""
|
||||
private var oldRtpStats = ""
|
||||
private var callVolume = BaresipService.callVolume
|
||||
private var oldDisplayTheme = -1
|
||||
private var save = false
|
||||
@ -323,6 +325,10 @@ class ConfigActivity : AppCompatActivity() {
|
||||
dbCv[0]
|
||||
debug.isChecked = oldLogLevel == "0"
|
||||
|
||||
rtpStats = binding.RtpStats
|
||||
oldRtpStats = Config.variable("rtp_stats")[0]
|
||||
rtpStats.isChecked = oldRtpStats == "yes"
|
||||
|
||||
sipTrace = binding.SipTrace
|
||||
sipTrace.isChecked = BaresipService.sipTrace
|
||||
|
||||
@ -467,6 +473,13 @@ class ConfigActivity : AppCompatActivity() {
|
||||
save = true
|
||||
}
|
||||
|
||||
val newRtpStats = if (rtpStats.isChecked) "yes" else "no"
|
||||
if (newRtpStats != oldRtpStats) {
|
||||
Config.replaceVariable("rtp_stats", newRtpStats)
|
||||
save = true
|
||||
restart = true
|
||||
}
|
||||
|
||||
BaresipService.sipTrace = sipTrace.isChecked
|
||||
Api.uag_enable_sip_trace(sipTrace.isChecked)
|
||||
|
||||
@ -552,6 +565,9 @@ class ConfigActivity : AppCompatActivity() {
|
||||
binding.DebugTitle.setOnClickListener {
|
||||
Utils.alertView(this, getString(R.string.debug), getString(R.string.debug_help))
|
||||
}
|
||||
binding.RtpStatsTitle.setOnClickListener {
|
||||
Utils.alertView(this, getString(R.string.rtp_stats), getString(R.string.rtp_stats_help))
|
||||
}
|
||||
binding.SipTraceTitle.setOnClickListener {
|
||||
Utils.alertView(this, getString(R.string.sip_trace),
|
||||
getString(R.string.sip_trace_help))
|
||||
|
||||
@ -270,6 +270,32 @@
|
||||
</CheckBox>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:orientation="horizontal" >
|
||||
<TextView
|
||||
android:id="@+id/RtpStatsTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@id/RtpStats"
|
||||
android:textSize="18sp"
|
||||
android:text="@string/rtp_stats" >
|
||||
</TextView>
|
||||
<CheckBox
|
||||
android:id="@+id/RtpStats"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_gravity="end"
|
||||
android:checked="false" >
|
||||
</CheckBox>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@ -356,6 +356,9 @@
|
||||
Tehdasasetus on 800x600.</string>
|
||||
<string name="debug">Lokiviestit</string>
|
||||
<string name="debug_help">Jos merkitty, baresip tuottaa debug- ja info-tason Logcat-viestejä.</string>
|
||||
<string name="rtp_stats">RTP tilastot</string>
|
||||
<string name="rtp_stats_help">Jos merkitty ja lokiviestit on merkitty, Logcat-viestit sisältävät
|
||||
myös päättyneen puhelun RTP-tilastot.</string>
|
||||
<string name="sip_trace">SIP-sanomien jäljitys</string>
|
||||
<string name="sip_trace_help">Jos merkitty ja jos Lokiviestit on merkitty, Logcat-viestit
|
||||
sisältävät myös lähetetyt ja vastaanotetut SIP-sanomat. On aina merkitsemättä sovelluksen
|
||||
|
||||
@ -317,9 +317,12 @@
|
||||
Factory default is 800x600.</string>
|
||||
<string name="debug">Debug</string>
|
||||
<string name="debug_help">If checked, provides debug and info level log messages to Logcat.</string>
|
||||
<string name="rtp_stats">RTP Statistics</string>
|
||||
<string name="rtp_stats_help">If checked and if Debug is checked, Logcat messages include also
|
||||
RTP statistics of calls when calls are closed.</string>
|
||||
<string name="sip_trace">SIP Trace</string>
|
||||
<string name="sip_trace_help">If checked and if Debug is checked, provides also SIP
|
||||
request and response trace to Logcat. Unchecked automatically at baresip start.</string>
|
||||
<string name="sip_trace_help">If checked and if Debug is checked, Logcat messages include also SIP
|
||||
request and response trace. Unchecked automatically at baresip start.</string>
|
||||
<string name="reset_config">Reset to Factory Defaults</string>
|
||||
<string name="reset_config_help">If checked, settings are reset to factory default values.</string>
|
||||
<string name="reset_config_alert">Are you sure you want to reset settings to factory
|
||||
|
||||
Reference in New Issue
Block a user