Some camel casing

This commit is contained in:
Juha Heinanen
2021-01-07 14:29:01 +02:00
parent 2951669fd6
commit 50cde56859
5 changed files with 13 additions and 13 deletions
@@ -303,7 +303,7 @@ class BaresipService: Service() {
if (call == null) { if (call == null) {
Log.w(LOG_TAG, "onStartCommand did not find call $callp") Log.w(LOG_TAG, "onStartCommand did not find call $callp")
} else { } else {
val peerUri = call.peerURI val peerUri = call.peerUri
val aor = call.ua.account.aor val aor = call.ua.account.aor
Log.d(LOG_TAG, "Aor $aor rejected incoming call $callp from $peerUri") Log.d(LOG_TAG, "Aor $aor rejected incoming call $callp from $peerUri")
Api.ua_hangup(call.ua.uap, callp, 486, "Rejected") Api.ua_hangup(call.ua.uap, callp, 486, "Rejected")
@@ -613,7 +613,7 @@ class BaresipService: Service() {
call.status = "connected" call.status = "connected"
call.onhold = false call.onhold = false
if (ua.account.callHistory) { if (ua.account.callHistory) {
CallHistory.add(CallHistory(aor, call.peerURI, call.dir, true)) CallHistory.add(CallHistory(aor, call.peerUri, call.dir, true))
CallHistory.save() CallHistory.save()
call.hasHistory = true call.hasHistory = true
} }
@@ -713,12 +713,12 @@ class BaresipService: Service() {
proximitySensing(false) proximitySensing(false)
} }
if (ua.account.callHistory && !call.hasHistory) { if (ua.account.callHistory && !call.hasHistory) {
CallHistory.add(CallHistory(aor, call.peerURI, call.dir, false)) CallHistory.add(CallHistory(aor, call.peerUri, call.dir, false))
CallHistory.save() CallHistory.save()
if (call.dir == "in") ua.account.missedCalls = true if (call.dir == "in") ua.account.missedCalls = true
} }
if (!Utils.isVisible() && !call.hasHistory && call.dir == "in") { if (!Utils.isVisible() && !call.hasHistory && call.dir == "in") {
val caller = Utils.friendlyUri(ContactsActivity.contactName(call.peerURI), val caller = Utils.friendlyUri(ContactsActivity.contactName(call.peerUri),
Utils.aorDomain(aor)) Utils.aorDomain(aor))
val intent = Intent(this, BaresipService::class.java) val intent = Intent(this, BaresipService::class.java)
intent.action = "Call Missed" intent.action = "Call Missed"
@@ -3,7 +3,7 @@ package com.tutpro.baresip
import android.text.TextWatcher import android.text.TextWatcher
import java.util.ArrayList import java.util.ArrayList
class Call(val callp: String, val ua: UserAgent, val peerURI: String, val dir: String, class Call(val callp: String, val ua: UserAgent, val peerUri: String, val dir: String,
var status: String, val dtmfWatcher: TextWatcher?) { var status: String, val dtmfWatcher: TextWatcher?) {
var onhold = false var onhold = false
@@ -4,7 +4,7 @@ import java.io.*
import java.util.ArrayList import java.util.ArrayList
import java.util.GregorianCalendar import java.util.GregorianCalendar
class CallHistory(val aor: String, val peerURI: String, val direction: String, class CallHistory(val aor: String, val peerUri: String, val direction: String,
val connected: Boolean) : Serializable { val connected: Boolean) : Serializable {
val time: GregorianCalendar = GregorianCalendar() val time: GregorianCalendar = GregorianCalendar()
@@ -74,7 +74,7 @@ class CallHistory(val aor: String, val peerURI: String, val direction: String,
fun print() { fun print() {
for (h in BaresipService.callHistory) for (h in BaresipService.callHistory)
Log.d("Baresip", "[${h.aor}, ${h.peerURI}, ${h.direction}, ${h.connected}]") Log.d("Baresip", "[${h.aor}, ${h.peerUri}, ${h.direction}, ${h.connected}]")
} }
} }
@@ -236,7 +236,7 @@ class CallsActivity : AppCompatActivity() {
direction = R.drawable.arrow_up_green direction = R.drawable.arrow_up_green
else else
direction = R.drawable.arrow_up_red direction = R.drawable.arrow_up_red
if (uaHistory.isNotEmpty() && (uaHistory.last().peerUri == h.peerURI)) { if (uaHistory.isNotEmpty() && (uaHistory.last().peerUri == h.peerUri)) {
uaHistory.last().directions.add(direction) uaHistory.last().directions.add(direction)
uaHistory.last().indexes.add(i) uaHistory.last().indexes.add(i)
} else { } else {
@@ -246,7 +246,7 @@ class CallsActivity : AppCompatActivity() {
else else
fmt = DateFormat.getDateInstance(DateFormat.SHORT) fmt = DateFormat.getDateInstance(DateFormat.SHORT)
val time = fmt.format(h.time.time) val time = fmt.format(h.time.time)
uaHistory.add(CallRow(h.aor, h.peerURI, direction, time, i)) uaHistory.add(CallRow(h.aor, h.peerUri, direction, time, i))
} }
} }
} }
@@ -279,7 +279,7 @@ class MainActivity : AppCompatActivity() {
} else { } else {
val latest = CallHistory.aorLatestHistory(aor) val latest = CallHistory.aorLatestHistory(aor)
if (latest != null) if (latest != null)
callUri.setText(Utils.friendlyUri(ContactsActivity.contactName(latest.peerURI), callUri.setText(Utils.friendlyUri(ContactsActivity.contactName(latest.peerUri),
Utils.aorDomain(ua.account.aor))) Utils.aorDomain(ua.account.aor)))
} }
} }
@@ -1436,7 +1436,7 @@ class MainActivity : AppCompatActivity() {
when (call.status) { when (call.status) {
"outgoing" -> { "outgoing" -> {
callTitle.text = getString(R.string.outgoing_call_to_dots) callTitle.text = getString(R.string.outgoing_call_to_dots)
callUri.setText(Utils.friendlyUri(ContactsActivity.contactName(call.peerURI), callUri.setText(Utils.friendlyUri(ContactsActivity.contactName(call.peerUri),
Utils.aorDomain(ua.account.aor))) Utils.aorDomain(ua.account.aor)))
securityButton.visibility = View.INVISIBLE securityButton.visibility = View.INVISIBLE
callButton.visibility = View.INVISIBLE callButton.visibility = View.INVISIBLE
@@ -1453,7 +1453,7 @@ class MainActivity : AppCompatActivity() {
} }
"incoming" -> { "incoming" -> {
callTitle.text = getString(R.string.incoming_call_from_dots) callTitle.text = getString(R.string.incoming_call_from_dots)
callUri.setText(Utils.friendlyUri(ContactsActivity.contactName(call.peerURI), callUri.setText(Utils.friendlyUri(ContactsActivity.contactName(call.peerUri),
Utils.aorDomain(ua.account.aor))) Utils.aorDomain(ua.account.aor)))
callUri.setAdapter(null) callUri.setAdapter(null)
securityButton.visibility = View.INVISIBLE securityButton.visibility = View.INVISIBLE
@@ -1481,7 +1481,7 @@ class MainActivity : AppCompatActivity() {
callTitle.text = getString(R.string.outgoing_call_to_dots) callTitle.text = getString(R.string.outgoing_call_to_dots)
else else
callTitle.text = getString(R.string.incoming_call_from_dots) callTitle.text = getString(R.string.incoming_call_from_dots)
callUri.setText(Utils.friendlyUri(ContactsActivity.contactName(call.peerURI), callUri.setText(Utils.friendlyUri(ContactsActivity.contactName(call.peerUri),
Utils.aorDomain(ua.account.aor))) Utils.aorDomain(ua.account.aor)))
transferButton.isEnabled = true transferButton.isEnabled = true
} }