From f911b0e436696f05c512b0d30c65148a7b90d71e Mon Sep 17 00:00:00 2001 From: cketti Date: Fri, 2 Apr 2010 01:43:56 +0000 Subject: [PATCH] Added support for the Android 1.6 intent android.intent.action.SEND_MULTIPLE in a way that should work on older devices too. Worked fine in the Android 1.5 emulator. Fixes issue 1210 --- AndroidManifest.xml | 2 -- src/com/fsck/k9/activity/MessageCompose.java | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 396d1a8f0..971e65bbf 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -191,13 +191,11 @@ - diff --git a/src/com/fsck/k9/activity/MessageCompose.java b/src/com/fsck/k9/activity/MessageCompose.java index ac683cf3d..1cfc73d84 100644 --- a/src/com/fsck/k9/activity/MessageCompose.java +++ b/src/com/fsck/k9/activity/MessageCompose.java @@ -390,7 +390,8 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc } } } - else if (Intent.ACTION_SEND.equals(action) /*|| Intent.ACTION_SEND_MULTIPLE.equals(action)*/) + //TODO: Use constant Intent.ACTION_SEND_MULTIPLE once we drop Android 1.5 support + else if (Intent.ACTION_SEND.equals(action) || "android.intent.action.SEND_MULTIPLE".equals(action)) { /* * Someone is trying to compose an email with an attachment, probably Pictures. @@ -409,8 +410,8 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc } String type = intent.getType(); - /* Use once we drop Android 1.5 support - if (Intent.ACTION_SEND_MULTIPLE.equals(action)) + //TODO: Use constant Intent.ACTION_SEND_MULTIPLE once we drop Android 1.5 support + if ("android.intent.action.SEND_MULTIPLE".equals(action)) { ArrayList list = intent.getParcelableArrayListExtra(Intent.EXTRA_STREAM); if (list != null) @@ -429,7 +430,6 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc } } else - */ { Uri stream = (Uri) intent.getParcelableExtra(Intent.EXTRA_STREAM); if (stream != null && type != null)