make resultData.data nullable at pick intent result
This commit is contained in:
parent
f374cfde67
commit
3e7d4b6f5b
1 changed files with 1 additions and 1 deletions
|
@ -451,7 +451,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
else -> fillIntentPath(resultData, resultIntent)
|
else -> fillIntentPath(resultData, resultIntent)
|
||||||
}
|
}
|
||||||
} else if ((mIsPickImageIntent || mIsPickVideoIntent)) {
|
} else if ((mIsPickImageIntent || mIsPickVideoIntent)) {
|
||||||
val path = resultData.data.path
|
val path = resultData.data?.path
|
||||||
val uri = getFilePublicUri(File(path), BuildConfig.APPLICATION_ID)
|
val uri = getFilePublicUri(File(path), BuildConfig.APPLICATION_ID)
|
||||||
resultIntent.data = uri
|
resultIntent.data = uri
|
||||||
resultIntent.flags = Intent.FLAG_GRANT_READ_URI_PERMISSION
|
resultIntent.flags = Intent.FLAG_GRANT_READ_URI_PERMISSION
|
||||||
|
|
Loading…
Reference in a new issue