[Android] Use activity context pour permission check

Geoffrey Métais git at videolan.org
Thu Nov 16 11:38:55 CET 2017


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

Use activity context pour permission check

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

 .../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