check null displayname
This commit is contained in:
parent
f0f07d9c8d
commit
a2c485cbe8
|
@ -61,7 +61,7 @@ class GetMediaAsynctask(val context: Context, val mPath: String, val isPickVideo
|
||||||
if (file.parent != mPath)
|
if (file.parent != mPath)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
val name = cursor.getStringValue(MediaStore.Images.Media.DISPLAY_NAME)
|
val name = cursor.getStringValue(MediaStore.Images.Media.DISPLAY_NAME) ?: ""
|
||||||
val dateModified = cursor.getLongValue(MediaStore.Images.Media.DATE_MODIFIED)
|
val dateModified = cursor.getLongValue(MediaStore.Images.Media.DATE_MODIFIED)
|
||||||
val dateTaken = cursor.getLongValue(MediaStore.Images.Media.DATE_TAKEN)
|
val dateTaken = cursor.getLongValue(MediaStore.Images.Media.DATE_TAKEN)
|
||||||
media.add(Medium(name, curPath, i == 1, dateModified, dateTaken, size))
|
media.add(Medium(name, curPath, i == 1, dateModified, dateTaken, size))
|
||||||
|
|
Loading…
Reference in New Issue