From 1c38d440b454698093f3f5c867b4bad5bf74716f Mon Sep 17 00:00:00 2001 From: Mangesh Ghiware Date: Wed, 17 Oct 2012 12:09:31 -0700 Subject: Add read URI permission to intent returned for GET_CONTENT Bug: 7366308 Bug: 7202384 GalleryProvider now requires a permission to access content. See CL ca181a6 for more details. Change-Id: I4bdf61e19c9e2b6e2da0837a8f633a27c49441d7 --- src/com/android/gallery3d/app/AlbumPage.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/com/android/gallery3d/app/AlbumPage.java b/src/com/android/gallery3d/app/AlbumPage.java index edaf8caa7..4cf73a886 100644 --- a/src/com/android/gallery3d/app/AlbumPage.java +++ b/src/com/android/gallery3d/app/AlbumPage.java @@ -316,8 +316,9 @@ public class AlbumPage extends ActivityState implements GalleryActionBar.Cluster activity.startActivity(intent); activity.finish(); } else { - activity.setResult(Activity.RESULT_OK, - new Intent(null, item.getContentUri())); + Intent intent = new Intent(null, item.getContentUri()) + .addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); + activity.setResult(Activity.RESULT_OK, intent); activity.finish(); } } -- cgit v1.2.3