catch exceptions thrown at getting default thumbnail size

This commit is contained in:
tibbi 2018-04-10 21:24:50 +02:00
parent 9eb6b3c821
commit 82ca892e25
1 changed files with 1 additions and 0 deletions

View File

@ -153,6 +153,7 @@ fun Context.getPhotoThumbnailSize(): Int {
if (cursor?.moveToFirst() == true) {
return cursor.getIntValue(ContactsContract.DisplayPhoto.THUMBNAIL_MAX_DIM)
}
} catch (ignored: Exception) {
} finally {
cursor?.close()
}