Fixed File deletion on A10
This commit is contained in:
parent
ad81ceb592
commit
e187b13912
2 changed files with 3 additions and 3 deletions
|
@ -90,9 +90,9 @@ class DeleteSongsDialog : DialogFragment() {
|
|||
if ((songs.size == 1) && MusicPlayerRemote.isPlaying(songs[0])) {
|
||||
MusicPlayerRemote.playNextSong()
|
||||
}
|
||||
if (VersionUtils.hasQ()) {
|
||||
if (VersionUtils.hasR()) {
|
||||
dismiss()
|
||||
MusicUtil.deleteTracksQ(requireActivity(), songs)
|
||||
MusicUtil.deleteTracksR(requireActivity(), songs)
|
||||
reloadTabs()
|
||||
} else if (!SAFUtil.isSAFRequiredForSongs(songs)) {
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
|
|
|
@ -525,7 +525,7 @@ object MusicUtil : KoinComponent {
|
|||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.R)
|
||||
fun deleteTracksQ(activity: Activity, songs: List<Song>) {
|
||||
fun deleteTracksR(activity: Activity, songs: List<Song>) {
|
||||
val pendingIntent = MediaStore.createDeleteRequest(activity.contentResolver, songs.map {
|
||||
getSongFileUri(it.id)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue