diff --git a/app/src/main/java/com/github/yeriomin/yalpstore/YalpStorePermissionManager.java b/app/src/main/java/com/github/yeriomin/yalpstore/YalpStorePermissionManager.java index 1b0a6422..86771d46 100644 --- a/app/src/main/java/com/github/yeriomin/yalpstore/YalpStorePermissionManager.java +++ b/app/src/main/java/com/github/yeriomin/yalpstore/YalpStorePermissionManager.java @@ -45,7 +45,10 @@ static public boolean isGranted(int requestCode, String permissions[], int[] gra } public boolean checkPermission() { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && null != activityRef.get()) { + if (null != activityRef.get() + && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M + && !PreferenceUtil.getBoolean(activityRef.get(), PreferenceUtil.PREFERENCE_DOWNLOAD_INTERNAL_STORAGE) + ) { return activityRef.get().checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED; } return true;