[Android] Fix dialog the permission dialog showing in the onboarding
Nicolas Pomepuy
git at videolan.org
Mon Nov 25 11:07:02 UTC 2024
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Nov 20 13:18:13 2024 +0100| [08dce8d9c62e9f8f0ce5714de74d8e1bcf31956c] | committer: Duncan McNamara
Fix dialog the permission dialog showing in the onboarding
> https://code.videolan.org/videolan/vlc-android/commit/08dce8d9c62e9f8f0ce5714de74d8e1bcf31956c
---
.../org/videolan/vlc/gui/helpers/hf/StoragePermissionsDelegate.kt | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/helpers/hf/StoragePermissionsDelegate.kt b/application/vlc-android/src/org/videolan/vlc/gui/helpers/hf/StoragePermissionsDelegate.kt
index 9f299d1772..12b843cfa8 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/helpers/hf/StoragePermissionsDelegate.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/helpers/hf/StoragePermissionsDelegate.kt
@@ -135,7 +135,13 @@ class StoragePermissionsDelegate : BaseHeadlessFragment() {
val uri = Uri.fromParts(SCHEME_PACKAGE, requireContext().packageName, null)
val intent = Intent(android.provider.Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION, uri)
if (intent.isCallable(requireActivity())) {
- PermissionListDialog.newInstance().show(requireActivity().supportFragmentManager, PermissionListDialog::class.simpleName)
+ if (withDialog)
+ PermissionListDialog.newInstance().show(
+ requireActivity().supportFragmentManager,
+ PermissionListDialog::class.simpleName
+ )
+ else
+ askAllAccessPermission(intent)
return
}
}
More information about the Android
mailing list