From aa0206000b92327e50ded14683b74247a66d99e1 Mon Sep 17 00:00:00 2001 From: Conny Duck Date: Tue, 18 Jul 2017 21:32:43 +0200 Subject: [PATCH] fix permission problem when downloading image --- app/src/main/AndroidManifest.xml | 2 +- .../main/java/com/keylesspalace/tusky/ViewMediaActivity.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 222613d0..c698ae06 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -5,7 +5,7 @@ - + diff --git a/app/src/main/java/com/keylesspalace/tusky/ViewMediaActivity.java b/app/src/main/java/com/keylesspalace/tusky/ViewMediaActivity.java index b6e453a7..90b49ae6 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ViewMediaActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/ViewMediaActivity.java @@ -201,7 +201,7 @@ public class ViewMediaActivity extends BaseActivity implements ViewMediaFragment } private void downloadImage() { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN && + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { ActivityCompat.requestPermissions(this,