[Android] Use activity argument for storage permission check

Geoffrey Métais git at videolan.org
Wed Nov 8 10:09:02 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Nov  8 10:02:42 2017 +0100| [f11fa0f838d29f03169e160c4aaf96f52bb6d080] | committer: Geoffrey Métais

Use activity argument for storage permission check

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

 vlc-android/src/org/videolan/vlc/util/Permissions.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/util/Permissions.java b/vlc-android/src/org/videolan/vlc/util/Permissions.java
index ad877c614..c3a8e3f8c 100644
--- a/vlc-android/src/org/videolan/vlc/util/Permissions.java
+++ b/vlc-android/src/org/videolan/vlc/util/Permissions.java
@@ -85,7 +85,7 @@ public class Permissions {
     }
 
     public static boolean checkReadStoragePermission(FragmentActivity activity, boolean exit) {
-        if (AndroidUtil.isMarshMallowOrLater && !canReadStorage()) {
+        if (AndroidUtil.isMarshMallowOrLater && !canReadStorage(activity)) {
             if (ActivityCompat.shouldShowRequestPermissionRationale(activity,
                     Manifest.permission.READ_EXTERNAL_STORAGE)) {
                 showStoragePermissionDialog(activity, exit);



More information about the Android mailing list