Remove disconnected calls manually

A single disconnected but not removed call can cause false in-call state with in the app causing CallActivity to finish instantly even when there are no real active calls.
This commit is contained in:
Naveen 2022-10-22 02:29:22 +05:30
parent 8699a6d281
commit 2c7335b865
1 changed files with 3 additions and 0 deletions

View File

@ -109,6 +109,9 @@ class CallManager {
listener.onStateChanged()
}
}
// remove all disconnected calls manually in case they are still here
calls.removeAll { it.getStateCompat() == Call.STATE_DISCONNECTED }
}
fun getPrimaryCall(): Call? {