diff options
author | John Hoford <hoford@google.com> | 2013-09-20 15:14:51 -0700 |
---|---|---|
committer | John Hoford <hoford@google.com> | 2013-09-20 15:15:23 -0700 |
commit | e56abc7049e35f705161086fe51d0ecdbf451b8b (patch) | |
tree | f5ce872cee1e1af03f262d66443a3b3e548f239a /src | |
parent | c491ad2b7630eed7cf43ef0c1064bd4fe42e06a1 (diff) | |
download | android_packages_apps_Gallery2-e56abc7049e35f705161086fe51d0ecdbf451b8b.tar.gz android_packages_apps_Gallery2-e56abc7049e35f705161086fe51d0ecdbf451b8b.tar.bz2 android_packages_apps_Gallery2-e56abc7049e35f705161086fe51d0ecdbf451b8b.zip |
prevent editing of GIF
bug:10642974
Change-Id: Ic61da19f6106c9d42c5b39ae9cc0cf0765f6d1ae
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/gallery3d/data/LocalImage.java | 4 | ||||
-rw-r--r-- | src/com/android/gallery3d/data/MediaObject.java | 1 | ||||
-rw-r--r-- | src/com/android/gallery3d/data/UriImage.java | 4 | ||||
-rw-r--r-- | src/com/android/gallery3d/ui/MenuExecutor.java | 3 |
4 files changed, 7 insertions, 5 deletions
diff --git a/src/com/android/gallery3d/data/LocalImage.java b/src/com/android/gallery3d/data/LocalImage.java index 94cb05936..2b01c1e22 100644 --- a/src/com/android/gallery3d/data/LocalImage.java +++ b/src/com/android/gallery3d/data/LocalImage.java @@ -237,9 +237,9 @@ public class LocalImage extends LocalMediaItem { @Override public int getSupportedOperations() { int operation = SUPPORT_DELETE | SUPPORT_SHARE | SUPPORT_CROP - | SUPPORT_SETAS | SUPPORT_EDIT | SUPPORT_INFO; + | SUPPORT_SETAS | SUPPORT_PRINT | SUPPORT_INFO; if (BitmapUtils.isSupportedByRegionDecoder(mimeType)) { - operation |= SUPPORT_FULL_IMAGE; + operation |= SUPPORT_FULL_IMAGE | SUPPORT_EDIT; } if (BitmapUtils.isRotationSupported(mimeType)) { diff --git a/src/com/android/gallery3d/data/MediaObject.java b/src/com/android/gallery3d/data/MediaObject.java index 270d4cf0b..530ee306e 100644 --- a/src/com/android/gallery3d/data/MediaObject.java +++ b/src/com/android/gallery3d/data/MediaObject.java @@ -41,6 +41,7 @@ public abstract class MediaObject { public static final int SUPPORT_ACTION = 1 << 14; public static final int SUPPORT_CAMERA_SHORTCUT = 1 << 15; public static final int SUPPORT_MUTE = 1 << 16; + public static final int SUPPORT_PRINT = 1 << 17; public static final int SUPPORT_ALL = 0xffffffff; // These are the bits returned from getMediaType(): diff --git a/src/com/android/gallery3d/data/UriImage.java b/src/com/android/gallery3d/data/UriImage.java index e8875b572..b3fe1de03 100644 --- a/src/com/android/gallery3d/data/UriImage.java +++ b/src/com/android/gallery3d/data/UriImage.java @@ -211,10 +211,10 @@ public class UriImage extends MediaItem { @Override public int getSupportedOperations() { - int supported = SUPPORT_EDIT | SUPPORT_SETAS; + int supported = SUPPORT_PRINT | SUPPORT_SETAS; if (isSharable()) supported |= SUPPORT_SHARE; if (BitmapUtils.isSupportedByRegionDecoder(mContentType)) { - supported |= SUPPORT_FULL_IMAGE; + supported |= SUPPORT_EDIT | SUPPORT_FULL_IMAGE; } return supported; } diff --git a/src/com/android/gallery3d/ui/MenuExecutor.java b/src/com/android/gallery3d/ui/MenuExecutor.java index b70476c0d..48cbe73e1 100644 --- a/src/com/android/gallery3d/ui/MenuExecutor.java +++ b/src/com/android/gallery3d/ui/MenuExecutor.java @@ -177,6 +177,7 @@ public class MenuExecutor { boolean supportCache = (supported & MediaObject.SUPPORT_CACHE) != 0; boolean supportEdit = (supported & MediaObject.SUPPORT_EDIT) != 0; boolean supportInfo = (supported & MediaObject.SUPPORT_INFO) != 0; + boolean supportPrint = (supported & MediaObject.SUPPORT_PRINT) != 0; setMenuItemVisible(menu, R.id.action_delete, supportDelete); setMenuItemVisible(menu, R.id.action_rotate_ccw, supportRotate); @@ -192,7 +193,7 @@ public class MenuExecutor { setMenuItemVisible(menu, R.id.action_edit, supportEdit); // setMenuItemVisible(menu, R.id.action_simple_edit, supportEdit); setMenuItemVisible(menu, R.id.action_details, supportInfo); - setMenuItemVisible(menu, R.id.print, supportEdit); + setMenuItemVisible(menu, R.id.print, supportPrint); } public static void updateMenuForPanorama(Menu menu, boolean shareAsPanorama360, |