remove unneeded takePersistableUriPermission
was a mistake to add this in the first place
This commit is contained in:
parent
cf5b810cc5
commit
ae02fba437
|
@ -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…
Reference in New Issue