mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-03-13 18:58:53 +01:00
Simplify code
This commit is contained in:
parent
9469ee1d6f
commit
c378bffaed
1 changed files with 2 additions and 8 deletions
|
@ -99,14 +99,8 @@ interface MediaStoreUtil {
|
|||
}
|
||||
|
||||
val contentUri = resolver.insert(collection, details)
|
||||
|
||||
resolver.openFileDescriptor(contentUri!!, "w", null).use { pfd ->
|
||||
// Write data into the pending audio file.
|
||||
BufferedOutputStream(
|
||||
FileOutputStream(pfd!!.fileDescriptor)
|
||||
).use { stream ->
|
||||
writer(stream)
|
||||
}
|
||||
resolver.openOutputStream(contentUri!!).use {
|
||||
writer(it!!)
|
||||
}
|
||||
return contentUri
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue