Some camel casing
This commit is contained in:
@ -303,7 +303,7 @@ class BaresipService: Service() {
|
||||
if (call == null) {
|
||||
Log.w(LOG_TAG, "onStartCommand did not find call $callp")
|
||||
} else {
|
||||
val peerUri = call.peerURI
|
||||
val peerUri = call.peerUri
|
||||
val aor = call.ua.account.aor
|
||||
Log.d(LOG_TAG, "Aor $aor rejected incoming call $callp from $peerUri")
|
||||
Api.ua_hangup(call.ua.uap, callp, 486, "Rejected")
|
||||
@ -613,7 +613,7 @@ class BaresipService: Service() {
|
||||
call.status = "connected"
|
||||
call.onhold = false
|
||||
if (ua.account.callHistory) {
|
||||
CallHistory.add(CallHistory(aor, call.peerURI, call.dir, true))
|
||||
CallHistory.add(CallHistory(aor, call.peerUri, call.dir, true))
|
||||
CallHistory.save()
|
||||
call.hasHistory = true
|
||||
}
|
||||
@ -713,12 +713,12 @@ class BaresipService: Service() {
|
||||
proximitySensing(false)
|
||||
}
|
||||
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()
|
||||
if (call.dir == "in") ua.account.missedCalls = true
|
||||
}
|
||||
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))
|
||||
val intent = Intent(this, BaresipService::class.java)
|
||||
intent.action = "Call Missed"
|
||||
|
||||
@ -3,7 +3,7 @@ package com.tutpro.baresip
|
||||
import android.text.TextWatcher
|
||||
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 onhold = false
|
||||
|
||||
@ -4,7 +4,7 @@ import java.io.*
|
||||
import java.util.ArrayList
|
||||
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 time: GregorianCalendar = GregorianCalendar()
|
||||
@ -74,7 +74,7 @@ class CallHistory(val aor: String, val peerURI: String, val direction: String,
|
||||
|
||||
fun print() {
|
||||
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
|
||||
else
|
||||
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().indexes.add(i)
|
||||
} else {
|
||||
@ -246,7 +246,7 @@ class CallsActivity : AppCompatActivity() {
|
||||
else
|
||||
fmt = DateFormat.getDateInstance(DateFormat.SHORT)
|
||||
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 {
|
||||
val latest = CallHistory.aorLatestHistory(aor)
|
||||
if (latest != null)
|
||||
callUri.setText(Utils.friendlyUri(ContactsActivity.contactName(latest.peerURI),
|
||||
callUri.setText(Utils.friendlyUri(ContactsActivity.contactName(latest.peerUri),
|
||||
Utils.aorDomain(ua.account.aor)))
|
||||
}
|
||||
}
|
||||
@ -1436,7 +1436,7 @@ class MainActivity : AppCompatActivity() {
|
||||
when (call.status) {
|
||||
"outgoing" -> {
|
||||
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)))
|
||||
securityButton.visibility = View.INVISIBLE
|
||||
callButton.visibility = View.INVISIBLE
|
||||
@ -1453,7 +1453,7 @@ class MainActivity : AppCompatActivity() {
|
||||
}
|
||||
"incoming" -> {
|
||||
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)))
|
||||
callUri.setAdapter(null)
|
||||
securityButton.visibility = View.INVISIBLE
|
||||
@ -1481,7 +1481,7 @@ class MainActivity : AppCompatActivity() {
|
||||
callTitle.text = getString(R.string.outgoing_call_to_dots)
|
||||
else
|
||||
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)))
|
||||
transferButton.isEnabled = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user