remove unneeded takePersistableUriPermission

was a mistake to add this in the first place
This commit is contained in:
Conny Duck 2018-04-14 18:15:24 +02:00
parent cf5b810cc5
commit ae02fba437
1 changed files with 0 additions and 5 deletions

View File

@ -1274,11 +1274,6 @@ public final class ComposeActivity
super.onActivityResult(requestCode, resultCode, intent); super.onActivityResult(requestCode, resultCode, intent);
if (resultCode == RESULT_OK && requestCode == MEDIA_PICK_RESULT && intent != null) { if (resultCode == RESULT_OK && requestCode == MEDIA_PICK_RESULT && intent != null) {
Uri uri = intent.getData(); 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); long mediaSize = MediaUtils.getMediaSize(getContentResolver(), uri);
pickMedia(uri, mediaSize); pickMedia(uri, mediaSize);
} else if (resultCode == RESULT_OK && requestCode == MEDIA_TAKE_PHOTO_RESULT) { } else if (resultCode == RESULT_OK && requestCode == MEDIA_TAKE_PHOTO_RESULT) {