From 8579412277b217ed5b2414f1a6efff9c74542afe Mon Sep 17 00:00:00 2001 From: Conny Duck Date: Sat, 14 Apr 2018 18:15:24 +0200 Subject: [PATCH] remove unneeded takePersistableUriPermission was a mistake to add this in the first place --- .../main/java/com/keylesspalace/tusky/ComposeActivity.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java index d6529c8d..b74bf4d0 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java @@ -1274,11 +1274,6 @@ public final class ComposeActivity super.onActivityResult(requestCode, resultCode, intent); if (resultCode == RESULT_OK && requestCode == MEDIA_PICK_RESULT && intent != null) { Uri uri = intent.getData(); - if (uri != null) { - // this is necessary so the SendTootService can access the uri later - final int takeFlags = intent.getFlags() & Intent.FLAG_GRANT_READ_URI_PERMISSION; - getContentResolver().takePersistableUriPermission(uri, takeFlags); - } long mediaSize = MediaUtils.getMediaSize(getContentResolver(), uri); pickMedia(uri, mediaSize); } else if (resultCode == RESULT_OK && requestCode == MEDIA_TAKE_PHOTO_RESULT) {