Add collating support for group SMS/MMS messages.

1) When sending an SMS or MMS to multiple recipients, only show one
ConversationItem, but provide statistics on the number of recipients
delivered to.

2) Still break up the messages for secure and insecure messages.
This commit is contained in:
Moxie Marlinspike
2012-10-29 16:51:42 -07:00
parent 3a8d29e279
commit 187ec95817
12 changed files with 222 additions and 83 deletions

View File

@@ -10,21 +10,21 @@ public class ConversationLoader extends CursorLoader {
private final Context context;
private final long threadId;
// private final boolean isGroupConversation;
private final boolean isGroupConversation;
public ConversationLoader(Context context, long threadId, boolean isGroupConversation) {
super(context);
this.context = context.getApplicationContext();
this.threadId = threadId;
// this.isGroupConversation = isGroupConversation;
this.isGroupConversation = isGroupConversation;
}
@Override
public Cursor loadInBackground() {
// if (!isGroupConversation) {
if (!isGroupConversation) {
return DatabaseFactory.getMmsSmsDatabase(context).getConversation(threadId);
// } else {
// return DatabaseFactory.getMmsSmsDatabase(context).getCollatedGroupConversation(threadId);
// }
} else {
return DatabaseFactory.getMmsSmsDatabase(context).getCollatedGroupConversation(threadId);
}
}
}