Fixed File deletion on A10

This commit is contained in:
Prathamesh More 2021-11-23 11:17:26 +05:30
parent ad81ceb592
commit e187b13912
2 changed files with 3 additions and 3 deletions

View file

@ -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 {

View file

@ -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)
})