mirror of
https://github.com/SimpleMobileTools/Simple-Voice-Recorder.git
synced 2025-06-05 21:59:31 +02:00
use the new URI at deleting files from mediastore
This commit is contained in:
@ -52,7 +52,8 @@ class RenameRecordingDialog(val activity: BaseSimpleActivity, val recording: Rec
|
||||
}
|
||||
|
||||
private fun updateMediaStoreTitle(recording: Recording, newTitle: String) {
|
||||
val uri = ContentUris.withAppendedId(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, recording.id.toLong())
|
||||
val baseUri = MediaStore.Audio.Media.getContentUri(MediaStore.VOLUME_EXTERNAL_PRIMARY)
|
||||
val uri = ContentUris.withAppendedId(baseUri, recording.id.toLong())
|
||||
val oldExtension = recording.title.getFilenameExtension()
|
||||
val newDisplayName = "${newTitle.removeSuffix(".$oldExtension")}.$oldExtension"
|
||||
|
||||
|
Reference in New Issue
Block a user