Fixed bug in checking if call already exists
This commit is contained in:
@@ -801,7 +801,7 @@ class BaresipService: Service() {
|
||||
"incoming call" -> {
|
||||
val peerUri = ev[1]
|
||||
val bevent = ev[2].toLong()
|
||||
val toastMsg = if (Call.isAnyCallActive(applicationContext))
|
||||
val toastMsg = if (Utils.isAnyCallActive(applicationContext))
|
||||
String.format(getString(R.string.call_auto_rejected),
|
||||
Utils.friendlyUri(this, peerUri, ua.account))
|
||||
else if (ua.account.blockUnknown && Contact.contactName(peerUri) == peerUri)
|
||||
@@ -1541,8 +1541,7 @@ class BaresipService: Service() {
|
||||
@SuppressLint("WakelockTimeout")
|
||||
private fun updatePartialWakeLock() {
|
||||
val isAnyUaActive = uasStatus.value.values.any { it != R.drawable.circle_white }
|
||||
val isAnyCallActive = calls.isNotEmpty()
|
||||
val needsToStayAwake = isAnyUaActive || isAnyCallActive
|
||||
val needsToStayAwake = isAnyUaActive || calls.isNotEmpty()
|
||||
try {
|
||||
if (needsToStayAwake) {
|
||||
if (!partialWakeLock.isHeld) {
|
||||
|
||||
Reference in New Issue
Block a user