BugFix for video saving tool
This commit is contained in:
@@ -126,8 +126,14 @@ object ImageSaver {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val masterUri = if (contentType.startsWith("image")) {
|
||||||
|
MediaStore.Images.Media.EXTERNAL_CONTENT_URI
|
||||||
|
} else {
|
||||||
|
MediaStore.Video.Media.EXTERNAL_CONTENT_URI
|
||||||
|
}
|
||||||
|
|
||||||
val uri =
|
val uri =
|
||||||
contentResolver.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, contentValues)
|
contentResolver.insert(masterUri, contentValues)
|
||||||
checkNotNull(uri) {
|
checkNotNull(uri) {
|
||||||
"Can't insert the new content"
|
"Can't insert the new content"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user