Replaced isIcoming function with isStatus function

This commit is contained in:
Juha Heinanen
2022-01-06 12:53:28 +02:00
parent 3dd0fcd584
commit 84b132cc86
2 changed files with 3 additions and 3 deletions

View File

@ -103,9 +103,9 @@ class Call(val callp: String, val ua: UserAgent, val peerUri: String, val dir: S
return null
}
fun isIncoming(): Boolean {
fun isStatus(status: String): Boolean {
for (call in BaresipService.calls)
if (call.status == "incoming")
if (call.status == status)
return true
return false
}

View File

@ -167,7 +167,7 @@ class MainActivity : AppCompatActivity() {
screenEventReceiver = object : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
val event = intent.getStringExtra("event")!!
if (event == Intent.ACTION_SCREEN_ON && !Call.isIncoming())
if (event == Intent.ACTION_SCREEN_ON && !Call.isStatus("incoming"))
dismissKeyguard()
}
}