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 | dfbb1f436b6020bbc5c14794ef0e8f571adc2167 (patch) | |
tree | 423830e0db09073833caee11b4293ef7a396e64e | |
parent | 7fc37252be8d12de906a9c68224f553f80c8ef52 (diff) | |
download | android_packages_apps_Snap-dfbb1f436b6020bbc5c14794ef0e8f571adc2167.tar.gz android_packages_apps_Snap-dfbb1f436b6020bbc5c14794ef0e8f571adc2167.tar.bz2 android_packages_apps_Snap-dfbb1f436b6020bbc5c14794ef0e8f571adc2167.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
-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(); } } |