Lines Matching refs:conv
295 final Conversation conv,
297 if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) LogTag.debug("loadDraft %s", conv);
300 if (conv.getThreadId() <= 0) {
315 String draftText = msg.readDraftSmsMessage(conv);
321 Uri uri = readDraftMmsMessage(msg.mActivity, conv, sb);
887 // we didn't nullify conv.mThreadId, causing a temperary situation where conv
1029 public void setConversation(Conversation conv) {
1030 if (DEBUG) LogTag.debug("setConversation %s -> %s", mConversation, conv);
1032 mConversation = conv;
1035 ContactList contactList = conv.getRecipients();
1189 final Conversation conv = mConversation;
1192 if (requiresMms() || addressContainsEmailToMms(conv, msgTxt)) {
1223 final SendReq sendReq = makeSendReq(conv, subject);
1228 sendMmsWorker(conv, mmsUri, persister, slideshow, sendReq, textOnly);
1230 updateSendStats(conv);
1239 preSendSmsWorker(conv, msgText, recipientsInUI);
1241 updateSendStats(conv);
1247 RecipientIdCache.updateNumbers(conv.getThreadId(), conv.getRecipients());
1254 private void updateSendStats(final Conversation conv) {
1255 String[] dests = conv.getRecipients().getNumbers();
1262 private boolean addressContainsEmailToMms(Conversation conv, String text) {
1264 String[] dests = conv.getRecipients().getNumbers();
1284 private void preSendSmsWorker(Conversation conv, String msgText, String recipientsInUI) {
1290 long origThreadId = conv.getThreadId();
1293 long threadId = conv.ensureThreadId();
1295 String semiSepRecipients = conv.getRecipients().serialize();
1308 recipientsInUI + "\" differ from recipients from conv: \"" +
1343 private void sendMmsWorker(Conversation conv, Uri mmsUri, PduPersister persister,
1355 threadId = conv.ensureThreadId();
1363 String[] dests = conv.getRecipients().getNumbers(true /* scrub for MMS address */);
1368 Conversation.verifySingleRecipient(mActivity, conv.getThreadId(), dests[0]);
1509 private static Uri readDraftMmsMessage(Context context, Conversation conv, StringBuilder sb) {
1511 LogTag.debug("readDraftMmsMessage conv: " + conv);
1516 final String selection = Mms.THREAD_ID + " = " + conv.getThreadId();
1550 private static SendReq makeSendReq(Conversation conv, CharSequence subject) {
1551 String[] dests = conv.getRecipients().getNumbers(true /* scrub for MMS address */);
1590 private void asyncUpdateDraftMmsMessage(final Conversation conv, final boolean isStopping) {
1592 LogTag.debug("asyncUpdateDraftMmsMessage conv=%s mMessageUri=%s", conv, mMessageUri);
1604 final SendReq sendReq = makeSendReq(conv, mSubject);
1613 ensureThreadIdIfNeeded(conv, isStopping);
1614 conv.setDraftState(true);
1616 LogTag.debug("asyncUpdateDraftMmsMessage conv: " + conv +
1621 // this after ensureThreadId so conv has the correct thread id.
1622 asyncDeleteDraftSmsMessage(conv);
1678 private String readDraftSmsMessage(Conversation conv) {
1679 long thread_id = conv.getThreadId();
1681 Log.d(TAG, "readDraftSmsMessage conv: " + conv);
1684 if (thread_id <= 0 || !conv.hasDraft()) {
1708 if (haveDraft && conv.getMessageCount() == 0) {
1709 asyncDeleteDraftSmsMessage(conv);
1715 clearConversation(conv, true);
1724 public void clearConversation(final Conversation conv, boolean resetThreadId) {
1725 if (resetThreadId && conv.getMessageCount() == 0) {
1727 conv.clearThreadId();
1730 conv.setDraftState(false);
1733 private void asyncUpdateDraftSmsMessage(final Conversation conv, final String contents,
1740 if (conv.getRecipients().isEmpty()) {
1746 ensureThreadIdIfNeeded(conv, isStopping);
1747 conv.setDraftState(true);
1748 updateDraftSmsMessage(conv, contents);
1756 private void updateDraftSmsMessage(final Conversation conv, String contents) {
1757 final long threadId = conv.getThreadId();
1772 asyncDeleteDraftMmsMessage(conv);
1788 public void asyncDeleteDraftSmsMessage(Conversation conv) {
1791 final long threadId = conv.getThreadId();
1804 private void asyncDeleteDraftMmsMessage(Conversation conv) {
1807 final long threadId = conv.getThreadId();
1817 * @param conv The conversation we are in.
1820 private void ensureThreadIdIfNeeded(final Conversation conv, final boolean isStopping) {
1821 if (isStopping && conv.getMessageCount() == 0) {
1828 conv.clearThreadId(); // force us to get the updated thread id
1830 if (!conv.getRecipients().isEmpty()) {
1831 conv.ensureThreadId();