diff options
| author | huiyan <huiyan@codeaurora.org> | 2016-05-11 15:10:28 +0800 |
|---|---|---|
| committer | Likai Ding <likaid@codeaurora.org> | 2016-06-14 14:54:30 +0800 |
| commit | 5101dc6a483777a87e5cfaa61d3996eab2ee6219 (patch) | |
| tree | a741a64ba37e7037f704fcfc007b835234a97581 /src/com/android | |
| parent | 4a48aa597782a69343b7577509ceaa23fd874290 (diff) | |
| download | android_packages_apps_Gallery2-5101dc6a483777a87e5cfaa61d3996eab2ee6219.tar.gz android_packages_apps_Gallery2-5101dc6a483777a87e5cfaa61d3996eab2ee6219.tar.bz2 android_packages_apps_Gallery2-5101dc6a483777a87e5cfaa61d3996eab2ee6219.zip | |
Gallery2: Fix force closed when print deleted picture.
When delete the image file, the permissions are also revoked.
So securityException occur if read the picture again.
Try to catch the securityException and finish it.
Change-Id: Ic341425ad097cbdec49be8ddd620ee409f632433
CRs-Fixed: 1004534
Diffstat (limited to 'src/com/android')
| -rw-r--r-- | src/com/android/gallery3d/app/PhotoPage.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index 7e17cf7f9..79ecdbfe9 100644 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -1219,7 +1219,12 @@ public abstract class PhotoPage extends ActivityState implements return true; } case R.id.print: { - mActivity.printSelectedImage(manager.getContentUri(path)); + try { + mActivity.printSelectedImage(manager.getContentUri(path)); + } catch (SecurityException e) { + e.printStackTrace(); + mActivity.finish(); + } return true; } case R.id.action_delete: |
