remove unneeded takePersistableUriPermission

was a mistake to add this in the first place
main
Conny Duck 7 years ago
parent 188cee72c2
commit 8579412277
  1. 5
      app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java

@ -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) {

Loading…
Cancel
Save