From f37d7a0d104d903b4e4083f7d4db5ab82022a25a Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 2 Mar 2018 12:08:11 +0100 Subject: [PATCH] catch and display exceptions thrown at querying contact sources --- .../com/simplemobiletools/contacts/helpers/ContactsHelper.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt index 1c9c62cb..e0d6b711 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt @@ -361,6 +361,8 @@ class ContactsHelper(val activity: BaseSimpleActivity) { sources.add(contactSource) } while (cursor.moveToNext()) } + } catch (e: Exception) { + activity.showErrorToast(e) } finally { cursor?.close() }