[Android] Check permission only on Marshmallow+ devices

Geoffrey Métais git at videolan.org
Tue Oct 27 17:47:02 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Oct 26 16:48:29 2015 +0100| [5930901cf70955d8b116e47a8147edb06078c9fc] | committer: Geoffrey Métais

Check permission only on Marshmallow+ devices

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=5930901cf70955d8b116e47a8147edb06078c9fc
---

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

diff --git a/vlc-android/src/org/videolan/vlc/util/AndroidDevices.java b/vlc-android/src/org/videolan/vlc/util/AndroidDevices.java
index b8f3d7d..161ff20 100644
--- a/vlc-android/src/org/videolan/vlc/util/AndroidDevices.java
+++ b/vlc-android/src/org/videolan/vlc/util/AndroidDevices.java
@@ -207,7 +207,7 @@ public class AndroidDevices {
     }
 
     public static void checkReadStoragePermission(Activity activity, boolean exit) {
-        if (!canReadStorage()) {
+        if (AndroidUtil.isMarshMallowOrLater() && !canReadStorage()) {
 
             if (ActivityCompat.shouldShowRequestPermissionRationale(activity,
                     Manifest.permission.READ_EXTERNAL_STORAGE)) {



More information about the Android mailing list