mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed crash if null audioState returned by TelecomManager's Connection
This commit is contained in:
parent
6cebb8cb92
commit
3fc596c448
1 changed files with 7 additions and 5 deletions
|
|
@ -321,11 +321,13 @@ class Api26Compatibility {
|
|||
Log.i("[Telecom Helper] Changing audio route [${routeToString(route)}] on connection [${connection.callId}] with state [${connection.stateAsString()}]")
|
||||
|
||||
val audioState = connection.callAudioState
|
||||
Log.i("[Telecom Helper] Current audio route is ${routeToString(audioState.route)}")
|
||||
if (audioState != null && audioState.route == route) {
|
||||
Log.w("[Telecom Helper] Connection is already using this route")
|
||||
return false
|
||||
} else if (audioState == null) {
|
||||
if (audioState != null) {
|
||||
Log.i("[Telecom Helper] Current audio route is ${routeToString(audioState.route)}")
|
||||
if (audioState.route == route) {
|
||||
Log.w("[Telecom Helper] Connection is already using this route")
|
||||
return false
|
||||
}
|
||||
} else {
|
||||
Log.w("[Telecom Helper] Failed to retrieve connection's call audio state!")
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue