Replaced isIcoming function with isStatus function
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user