Avoid warnings

This commit is contained in:
Juha Heinanen
2021-06-05 21:41:03 +03:00
parent f541aac4cc
commit a475f192c9
3 changed files with 7 additions and 7 deletions
@@ -148,12 +148,12 @@ class AccountActivity : AppCompatActivity() {
if (text in videoCodecs) if (text in videoCodecs)
acc.videoCodec.add(text) acc.videoCodec.add(text)
"media-encoding" -> { "media-encoding" -> {
val enc = text.toLowerCase(Locale.ROOT) val enc = text.lowercase(Locale.ROOT)
if (enc in mediaEncKeys && enc.isNotEmpty()) if (enc in mediaEncKeys && enc.isNotEmpty())
acc.mediaEnc = enc acc.mediaEnc = enc
} }
"media-nat" -> { "media-nat" -> {
val nat = text.toLowerCase(Locale.ROOT) val nat = text.lowercase(Locale.ROOT)
if (nat in mediaNatKeys && nat.isNotEmpty()) if (nat in mediaNatKeys && nat.isNotEmpty())
acc.mediaNat = nat acc.mediaNat = nat
} }
@@ -11,7 +11,7 @@ class CallHistory(val aor: String, val peerUri: String, val direction: String,
companion object { companion object {
const val CALL_HISTORY_SIZE = 100 private const val CALL_HISTORY_SIZE = 100
fun add(history: CallHistory) { fun add(history: CallHistory) {
BaresipService.callHistory.add(history) BaresipService.callHistory.add(history)
@@ -51,7 +51,7 @@ class CallHistory(val aor: String, val peerUri: String, val direction: String,
oos.close() oos.close()
fos.close() fos.close()
} catch (e: IOException) { } catch (e: IOException) {
Log.e(TAG, "OutputStream exception: " + e.toString()) Log.e(TAG, "OutputStream exception: $e")
e.printStackTrace() e.printStackTrace()
} }
} }
@@ -68,7 +68,7 @@ class CallHistory(val aor: String, val peerUri: String, val direction: String,
fis.close() fis.close()
Log.d(TAG, "Restored history of ${BaresipService.callHistory.size} calls") Log.d(TAG, "Restored history of ${BaresipService.callHistory.size} calls")
} catch (e: Exception) { } catch (e: Exception) {
Log.e(TAG, "InputStream exception: - " + e.toString()) Log.e(TAG, "InputStream exception: - $e")
} }
} }
@@ -1,7 +1,7 @@
package com.tutpro.baresip package com.tutpro.baresip
class CallRow(val aor: String, val peerUri: String, private val direction: Int, val time: String, class CallRow(val aor: String, val peerUri: String, direction: Int, val time: String,
private val index: Int) { index: Int) {
val directions = ArrayList<Int>() val directions = ArrayList<Int>()
val indexes = ArrayList<Int>() val indexes = ArrayList<Int>()