[Android] Use activity context pour permission check

Geoffrey Métais git at videolan.org
Fri Nov 17 18:25:20 CET 2017


vlc-android | branch: 2.5.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Nov 16 11:32:34 2017 +0100| [44fc2e55076432519e4aa6ef8ba53f6e3d953409] | committer: Geoffrey Métais

Use activity context pour permission check

(cherry picked from commit bf5b98b1702c18947de3e87475fc02e7f8272f32)

> https://code.videolan.org/videolan/vlc-android/commit/44fc2e55076432519e4aa6ef8ba53f6e3d953409
---

 .../src/org/videolan/vlc/gui/helpers/hf/StoragePermissionsDelegate.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/helpers/hf/StoragePermissionsDelegate.java b/vlc-android/src/org/videolan/vlc/gui/helpers/hf/StoragePermissionsDelegate.java
index 167d1adf8..7ade4e5bc 100644
--- a/vlc-android/src/org/videolan/vlc/gui/helpers/hf/StoragePermissionsDelegate.java
+++ b/vlc-android/src/org/videolan/vlc/gui/helpers/hf/StoragePermissionsDelegate.java
@@ -65,7 +65,7 @@ public class StoragePermissionsDelegate extends BaseHeadlessFragment {
             intent.removeExtra(StartActivity.EXTRA_UPGRADE);
             intent.removeExtra(StartActivity.EXTRA_FIRST_RUN);
         }
-        if (AndroidUtil.isMarshMallowOrLater && !canReadStorage()) {
+        if (AndroidUtil.isMarshMallowOrLater && !canReadStorage(getActivity())) {
             if (shouldShowRequestPermissionRationale(Manifest.permission.READ_EXTERNAL_STORAGE))
                 Permissions.showStoragePermissionDialog(mActivity, false);
             else



More information about the Android mailing list