From a475f192c90d2d86892d22ebe0ea49f2039d948f Mon Sep 17 00:00:00 2001 From: Juha Heinanen Date: Sat, 5 Jun 2021 21:41:03 +0300 Subject: [PATCH] Avoid warnings --- app/src/main/kotlin/com/tutpro/baresip/AccountActivity.kt | 4 ++-- app/src/main/kotlin/com/tutpro/baresip/CallHistory.kt | 6 +++--- app/src/main/kotlin/com/tutpro/baresip/CallRow.kt | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/kotlin/com/tutpro/baresip/AccountActivity.kt b/app/src/main/kotlin/com/tutpro/baresip/AccountActivity.kt index 60228244..5e684a54 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/AccountActivity.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/AccountActivity.kt @@ -148,12 +148,12 @@ class AccountActivity : AppCompatActivity() { if (text in videoCodecs) acc.videoCodec.add(text) "media-encoding" -> { - val enc = text.toLowerCase(Locale.ROOT) + val enc = text.lowercase(Locale.ROOT) if (enc in mediaEncKeys && enc.isNotEmpty()) acc.mediaEnc = enc } "media-nat" -> { - val nat = text.toLowerCase(Locale.ROOT) + val nat = text.lowercase(Locale.ROOT) if (nat in mediaNatKeys && nat.isNotEmpty()) acc.mediaNat = nat } diff --git a/app/src/main/kotlin/com/tutpro/baresip/CallHistory.kt b/app/src/main/kotlin/com/tutpro/baresip/CallHistory.kt index c54b6333..b484a4df 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/CallHistory.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/CallHistory.kt @@ -11,7 +11,7 @@ class CallHistory(val aor: String, val peerUri: String, val direction: String, companion object { - const val CALL_HISTORY_SIZE = 100 + private const val CALL_HISTORY_SIZE = 100 fun add(history: CallHistory) { BaresipService.callHistory.add(history) @@ -51,7 +51,7 @@ class CallHistory(val aor: String, val peerUri: String, val direction: String, oos.close() fos.close() } catch (e: IOException) { - Log.e(TAG, "OutputStream exception: " + e.toString()) + Log.e(TAG, "OutputStream exception: $e") e.printStackTrace() } } @@ -68,7 +68,7 @@ class CallHistory(val aor: String, val peerUri: String, val direction: String, fis.close() Log.d(TAG, "Restored history of ${BaresipService.callHistory.size} calls") } catch (e: Exception) { - Log.e(TAG, "InputStream exception: - " + e.toString()) + Log.e(TAG, "InputStream exception: - $e") } } diff --git a/app/src/main/kotlin/com/tutpro/baresip/CallRow.kt b/app/src/main/kotlin/com/tutpro/baresip/CallRow.kt index a62a4a2c..76cec0e3 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/CallRow.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/CallRow.kt @@ -1,7 +1,7 @@ package com.tutpro.baresip -class CallRow(val aor: String, val peerUri: String, private val direction: Int, val time: String, - private val index: Int) { +class CallRow(val aor: String, val peerUri: String, direction: Int, val time: String, + index: Int) { val directions = ArrayList() val indexes = ArrayList()