mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-24 02:12:15 -05:00
Add extra for the sender address(es) to the "Share intent"
This commit is contained in:
parent
ae2c933181
commit
44d2194a00
@ -293,6 +293,14 @@ public class K9 extends Application {
|
|||||||
public static final String EXTRA_FROM_SELF = "com.fsck.k9.intent.extra.FROM_SELF";
|
public static final String EXTRA_FROM_SELF = "com.fsck.k9.intent.extra.FROM_SELF";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class Share {
|
||||||
|
/*
|
||||||
|
* We don't want to use EmailReceived.EXTRA_FROM ("com.fsck.k9.intent.extra.FROM")
|
||||||
|
* because of different semantics (String array vs. string with comma separated
|
||||||
|
* email addresses)
|
||||||
|
*/
|
||||||
|
public static final String EXTRA_FROM = "com.fsck.k9.intent.extra.SENDER";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,6 +35,7 @@ import com.fsck.k9.NotificationSetting;
|
|||||||
import com.fsck.k9.Preferences;
|
import com.fsck.k9.Preferences;
|
||||||
import com.fsck.k9.R;
|
import com.fsck.k9.R;
|
||||||
import com.fsck.k9.SearchSpecification;
|
import com.fsck.k9.SearchSpecification;
|
||||||
|
import com.fsck.k9.K9.Intents;
|
||||||
import com.fsck.k9.activity.FolderList;
|
import com.fsck.k9.activity.FolderList;
|
||||||
import com.fsck.k9.activity.MessageList;
|
import com.fsck.k9.activity.MessageList;
|
||||||
import com.fsck.k9.helper.Utility;
|
import com.fsck.k9.helper.Utility;
|
||||||
@ -3478,6 +3479,13 @@ public class MessagingController implements Runnable {
|
|||||||
}
|
}
|
||||||
msg.putExtra(Intent.EXTRA_SUBJECT, message.getSubject());
|
msg.putExtra(Intent.EXTRA_SUBJECT, message.getSubject());
|
||||||
|
|
||||||
|
Address[] from = message.getFrom();
|
||||||
|
String[] senders = new String[from.length];
|
||||||
|
for (int i = 0; i < from.length; i++) {
|
||||||
|
senders[i] = from[i].toString();
|
||||||
|
}
|
||||||
|
msg.putExtra(Intents.Share.EXTRA_FROM, senders);
|
||||||
|
|
||||||
Address[] to = message.getRecipients(RecipientType.TO);
|
Address[] to = message.getRecipients(RecipientType.TO);
|
||||||
String[] recipientsTo = new String[to.length];
|
String[] recipientsTo = new String[to.length];
|
||||||
for (int i = 0; i < to.length; i++) {
|
for (int i = 0; i < to.length; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user