catch and report errors thrown at obtaining phone numbers and emails
This commit is contained in:
parent
71d40b0e08
commit
2606456255
|
@ -117,6 +117,8 @@ class ContactsHelper(val activity: BaseSimpleActivity) {
|
||||||
phoneNumbers[id].add(phoneNumber)
|
phoneNumbers[id].add(phoneNumber)
|
||||||
} while (cursor.moveToNext())
|
} while (cursor.moveToNext())
|
||||||
}
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
activity.showErrorToast(e)
|
||||||
} finally {
|
} finally {
|
||||||
cursor?.close()
|
cursor?.close()
|
||||||
}
|
}
|
||||||
|
@ -151,6 +153,9 @@ class ContactsHelper(val activity: BaseSimpleActivity) {
|
||||||
emails[id]!!.add(Email(email, type))
|
emails[id]!!.add(Email(email, type))
|
||||||
} while (cursor.moveToNext())
|
} while (cursor.moveToNext())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} catch (e: Exception) {
|
||||||
|
activity.showErrorToast(e)
|
||||||
} finally {
|
} finally {
|
||||||
cursor?.close()
|
cursor?.close()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue