summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBobby Georgescu <georgescu@google.com>2012-10-02 10:30:07 -0700
committerBobby Georgescu <georgescu@google.com>2012-10-02 10:30:07 -0700
commit462923e5800e151ab5ec450063334ba430c1da3a (patch)
tree44cd1dc4c064f29f70305603597ff4ab291b63d4 /src
parent1336062985c9824d7fd796b1cebd5eaa8e4163ca (diff)
downloadandroid_packages_apps_Gallery2-462923e5800e151ab5ec450063334ba430c1da3a.tar.gz
android_packages_apps_Gallery2-462923e5800e151ab5ec450063334ba430c1da3a.tar.bz2
android_packages_apps_Gallery2-462923e5800e151ab5ec450063334ba430c1da3a.zip
Check item is editable before attempting to launch editor
Bug: 7269840 Change-Id: I18af824865b8a158c7a89e2b34f51a32de144057
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/app/PhotoPage.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java
index d942a5341..408be3106 100644
--- a/src/com/android/gallery3d/app/PhotoPage.java
+++ b/src/com/android/gallery3d/app/PhotoPage.java
@@ -555,7 +555,10 @@ public class PhotoPage extends ActivityState implements
private void launchPhotoEditor() {
MediaItem current = mModel.getMediaItem(0);
- if (current == null) return;
+ if (current == null || (current.getSupportedOperations()
+ & MediaObject.SUPPORT_EDIT) == 0) {
+ return;
+ }
Intent intent = new Intent(ACTION_NEXTGEN_EDIT);
intent.setData(mActivity.getDataManager().getContentUri(current.getPath())).setFlags(