From b11fb05ae8435dc90375ead6ecab62b7e10fb44f Mon Sep 17 00:00:00 2001 From: Bobby Georgescu Date: Tue, 2 Oct 2012 10:30:07 -0700 Subject: Check item is editable before attempting to launch editor Bug: 7269840 Change-Id: I18af824865b8a158c7a89e2b34f51a32de144057 --- src/com/android/gallery3d/app/PhotoPage.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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( -- cgit v1.2.3