diff --git a/app/src/main/java/digital/fischers/coinsaw/ui/utils/getDeviceName.kt b/app/src/main/java/digital/fischers/coinsaw/ui/utils/getDeviceName.kt index f81f3be..a984115 100644 --- a/app/src/main/java/digital/fischers/coinsaw/ui/utils/getDeviceName.kt +++ b/app/src/main/java/digital/fischers/coinsaw/ui/utils/getDeviceName.kt @@ -13,5 +13,11 @@ fun getDeviceName(contentResolver: ContentResolver): String { ) // Return the first non-null value - return functions.firstNotNullOfOrNull { it() } ?: "Unknown Device" + return functions.firstNotNullOfOrNull { + try { + it() + } catch (e: Exception) { + null + } + } ?: "Unknown Device" } \ No newline at end of file