mirror of
https://github.com/nextcloud/talk-android
synced 2025-08-04 10:35:04 +01:00
Merge pull request #5179 from gavine99/fix-crash-on-share-with-no-displayname
fix crash on share a file with no displayname from other app to talk
This commit is contained in:
commit
30e2406093
@ -129,7 +129,10 @@ object FileUtils {
|
||||
val cursor: Cursor? = context.contentResolver.query(uri, null, null, null, null)
|
||||
try {
|
||||
if (cursor != null && cursor.moveToFirst()) {
|
||||
filename = cursor.getString(cursor.getColumnIndexOrThrow(OpenableColumns.DISPLAY_NAME))
|
||||
val displayNameColumnIndex = cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME)
|
||||
if (displayNameColumnIndex != -1) {
|
||||
filename = cursor.getString(displayNameColumnIndex)
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
cursor?.close()
|
||||
|
Loading…
Reference in New Issue
Block a user