mirror of
https://github.com/cmclark00/RetroMusicPlayer.git
synced 2025-05-17 23:55:21 +01:00
Fix: Blacklist permission error on Android 13
This commit is contained in:
parent
6752ae2afa
commit
2d284984db
1 changed files with 13 additions and 1 deletions
|
@ -50,7 +50,19 @@ class BlacklistFolderChooserDialog : DialogFragment() {
|
||||||
|
|
||||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||||
var mSavedInstanceState = savedInstanceState
|
var mSavedInstanceState = savedInstanceState
|
||||||
if (VersionUtils.hasMarshmallow()
|
if (VersionUtils.hasT()) {
|
||||||
|
if (ActivityCompat.checkSelfPermission(
|
||||||
|
requireActivity(), Manifest.permission.READ_MEDIA_AUDIO
|
||||||
|
)
|
||||||
|
!= PackageManager.PERMISSION_GRANTED
|
||||||
|
) {
|
||||||
|
return materialDialog().show {
|
||||||
|
title(res = R.string.md_error_label)
|
||||||
|
message(res = R.string.made_with_love)
|
||||||
|
positiveButton(res = android.R.string.ok)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (VersionUtils.hasMarshmallow()
|
||||||
&& ActivityCompat.checkSelfPermission(
|
&& ActivityCompat.checkSelfPermission(
|
||||||
requireActivity(), Manifest.permission.READ_EXTERNAL_STORAGE
|
requireActivity(), Manifest.permission.READ_EXTERNAL_STORAGE
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue