summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/MenuHelper.java
diff options
context:
space:
mode:
authorChih-Chung Chang <>2009-03-27 16:07:25 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-27 16:07:25 -0700
commiteb9d8a271a8c16514cc75a0ba1c54cfcf5d311fd (patch)
tree8d4b6e98ccbfc016f680da05e97661ceb409e778 /src/com/android/camera/MenuHelper.java
parentd9deeb594acff415552eb0a80f902dd83196c344 (diff)
downloadLegacyCamera-eb9d8a271a8c16514cc75a0ba1c54cfcf5d311fd.zip
LegacyCamera-eb9d8a271a8c16514cc75a0ba1c54cfcf5d311fd.tar.gz
LegacyCamera-eb9d8a271a8c16514cc75a0ba1c54cfcf5d311fd.tar.bz2
AI 143170: am: CL 142872 Remove the share button if the image is shared from MMS.
This is based on CL 142524. Original author: chihchung Merged from: //branches/cupcake/... Automated import of CL 143170
Diffstat (limited to 'src/com/android/camera/MenuHelper.java')
-rw-r--r--src/com/android/camera/MenuHelper.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/camera/MenuHelper.java b/src/com/android/camera/MenuHelper.java
index 17d3edb..a88f020 100644
--- a/src/com/android/camera/MenuHelper.java
+++ b/src/com/android/camera/MenuHelper.java
@@ -133,6 +133,14 @@ public class MenuHelper {
uri.getAuthority().equals("mms");
}
+ public static void enableShareMenuItem(Menu menu, boolean enabled) {
+ MenuItem item = menu.findItem(MENU_IMAGE_SHARE);
+ if (item != null) {
+ item.setVisible(enabled);
+ item.setEnabled(enabled);
+ }
+ }
+
static MenuItemsResult addImageMenuItems(
Menu menu,
int inclusions,
@@ -238,7 +246,6 @@ public class MenuHelper {
onInvoke.run(new MenuCallback() {
public void run(Uri u, ImageManager.IImage image) {
if (image == null) return;
- if (isMMSUri(u)) return;
if (!isImage && getImageFileSize(image) > SHARE_FILE_LENGTH_LIMIT ) {
Toast.makeText(activity,
R.string.too_large_to_attach, Toast.LENGTH_LONG).show();