diff options
author | Mangesh Ghiware <mghiware@google.com> | 2012-10-17 12:09:31 -0700 |
---|---|---|
committer | Mangesh Ghiware <mghiware@google.com> | 2012-10-17 12:16:40 -0700 |
commit | 1c38d440b454698093f3f5c867b4bad5bf74716f (patch) | |
tree | 9e47c8a1a34752a7ee3f6b48e7d2ba3d8cef441a /src/com/android/gallery3d/app/AlbumPage.java | |
parent | 3038d014b7ade998d1820c997242b9d9d8bc7ccf (diff) | |
download | android_packages_apps_Gallery2-1c38d440b454698093f3f5c867b4bad5bf74716f.tar.gz android_packages_apps_Gallery2-1c38d440b454698093f3f5c867b4bad5bf74716f.tar.bz2 android_packages_apps_Gallery2-1c38d440b454698093f3f5c867b4bad5bf74716f.zip |
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
Diffstat (limited to 'src/com/android/gallery3d/app/AlbumPage.java')
-rw-r--r-- | src/com/android/gallery3d/app/AlbumPage.java | 5 |
1 files changed, 3 insertions, 2 deletions
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(); } } |