From 4324424a79a8e58e2dcf6c321f0c88fd22b28193 Mon Sep 17 00:00:00 2001 From: Juha Heinanen Date: Mon, 3 Aug 2026 11:41:11 +0300 Subject: [PATCH] BaresipApp code styling --- app/src/main/kotlin/com/tutpro/baresip/BaresipApp.kt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/app/src/main/kotlin/com/tutpro/baresip/BaresipApp.kt b/app/src/main/kotlin/com/tutpro/baresip/BaresipApp.kt index 29c21b69..54d99c1f 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/BaresipApp.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/BaresipApp.kt @@ -11,11 +11,10 @@ class BaresipApp : Application() { val defaultHandler = Thread.getDefaultUncaughtExceptionHandler() Thread.setDefaultUncaughtExceptionHandler { thread, throwable -> - if (isImeDeadObjectException(throwable)) { + if (isImeDeadObjectException(throwable)) Log.e(TAG, "Caught DeadObjectException from IME: $throwable") - } else { + else defaultHandler?.uncaughtException(thread, throwable) - } } if (!BaresipService.libraryLoaded) { @@ -28,11 +27,9 @@ class BaresipApp : Application() { private fun isImeDeadObjectException(throwable: Throwable): Boolean { var cause: Throwable? = throwable while (cause != null) { - if (cause is DeadObjectException) { - if (cause.stackTrace.any { it.methodName == "updateCursorAnchorInfo" }) { + if (cause is DeadObjectException) + if (cause.stackTrace.any { it.methodName == "updateCursorAnchorInfo" }) return true - } - } cause = cause.cause } return false