There was warnings on private val hangupTelephonyCallback by lazy as it was API 31+, I wrapped that up in a interface TelephonyHandler.
We were trying to catch ForegroundServiceStartNotAllowedException not available on all APIs, I broadened this to super IllegalStateException, and logged the exception, which was missed.
cleaned up a when (action) { statement
formatting
Fixed some properties that were declared twice
Fixed a StateFlow that was exposed as MutableStateFlow
private val hangupTelephonyCallback by lazy
as it wasAPI 31+
, I wrapped that up in ainterface TelephonyHandler
.ForegroundServiceStartNotAllowedException
not available on all APIs, I broadened this tosuper IllegalStateException
, and logged the exception, which was missed.when (action) {
statementStateFlow
that was exposed asMutableStateFlow