BaresipApp code styling

This commit is contained in:
Juha Heinanen
2026-08-03 11:41:11 +03:00
parent bb54f41144
commit 4324424a79

View File

@ -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