UIProvider.java revision b31ab5aea601f8aa5136a99edc23fb4d907f792e
1/******************************************************************************* 2 * Copyright (C) 2011 Google Inc. 3 * Licensed to The Android Open Source Project. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 *******************************************************************************/ 17 18package com.android.mail.providers; 19 20import android.content.Context; 21import android.provider.BaseColumns; 22import android.text.TextUtils; 23 24import com.android.common.contacts.DataUsageStatUpdater; 25 26import java.lang.String; 27import java.util.ArrayList; 28 29 30public class UIProvider { 31 public static final String EMAIL_SEPARATOR = "\n"; 32 public static final long INVALID_CONVERSATION_ID = -1; 33 public static final long INVALID_MESSAGE_ID = -1; 34 35 // The actual content provider should define its own authority 36 public static final String AUTHORITY = "com.android.mail.providers"; 37 38 public static final String ACCOUNT_LIST_TYPE = 39 "vnd.android.cursor.dir/vnd.com.android.mail.account"; 40 public static final String ACCOUNT_TYPE = 41 "vnd.android.cursor.item/vnd.com.android.mail.account"; 42 43 public static final String[] ACCOUNTS_PROJECTION = { 44 BaseColumns._ID, 45 AccountColumns.NAME, 46 AccountColumns.PROVIDER_VERSION, 47 AccountColumns.URI, 48 AccountColumns.CAPABILITIES, 49 AccountColumns.FOLDER_LIST_URI, 50 AccountColumns.SEARCH_URI, 51 AccountColumns.ACCOUNT_FROM_ADDRESSES_URI, 52 AccountColumns.SAVE_DRAFT_URI, 53 AccountColumns.SEND_MAIL_URI, 54 AccountColumns.EXPUNGE_MESSAGE_URI, 55 AccountColumns.UNDO_URI 56 }; 57 58 public static final int ACCOUNT_ID_COLUMN = 0; 59 public static final int ACCOUNT_NAME_COLUMN = 1; 60 public static final int ACCOUNT_PROVIDER_VERISON_COLUMN = 2; 61 public static final int ACCOUNT_URI_COLUMN = 3; 62 public static final int ACCOUNT_CAPABILITIES_COLUMN = 4; 63 public static final int ACCOUNT_FOLDER_LIST_URI_COLUMN = 5; 64 public static final int ACCOUNT_SEARCH_URI_COLUMN = 6; 65 public static final int ACCOUNT_FROM_ADDRESSES_URI_COLUMN = 7; 66 public static final int ACCOUNT_SAVE_DRAFT_URI_COLUMN = 8; 67 public static final int ACCOUNT_SEND_MESSAGE_URI_COLUMN = 9; 68 public static final int ACCOUNT_EXPUNGE_MESSAGE_URI_COLUMN = 10; 69 public static final int ACCOUNT_UNDO_URI_COLUMN = 11; 70 71 public static final class AccountCapabilities { 72 public static final int SYNCABLE_FOLDERS = 0x0001; 73 public static final int REPORT_SPAM = 0x0002; 74 public static final int ARCHIVE = 0x0004; 75 public static final int MUTE = 0x0008; 76 public static final int SERVER_SEARCH = 0x0010; 77 public static final int FOLDER_SERVER_SEARCH = 0x0020; 78 public static final int SANITIZED_HTML = 0x0040; 79 public static final int DRAFT_SYNCHRONIZATION = 0x0080; 80 public static final int MULTIPLE_FROM_ADDRESSES = 0x0100; 81 public static final int SMART_REPLY = 0x0200; 82 public static final int LOCAL_SEARCH = 0x0400; 83 public static final int THREADED_CONVERSATIONS = 0x0800; 84 } 85 86 public static final class AccountColumns { 87 /** 88 * This string column contains the human visible name for the account. 89 */ 90 public static final String NAME = "name"; 91 92 /** 93 * This integer column returns the version of the UI provider schema from which this 94 * account provider will return results. 95 */ 96 public static final String PROVIDER_VERSION = "providerVersion"; 97 98 /** 99 * This string column contains the uri to directly access the information for this account. 100 */ 101 public static final String URI = "accountUri"; 102 103 /** 104 * This integer column contains a bit field of the possible cabibilities that this account 105 * supports. 106 */ 107 public static final String CAPABILITIES = "capabilities"; 108 109 /** 110 * This string column contains the content provider uri to return the 111 * list of top level folders for this account. 112 */ 113 public static final String FOLDER_LIST_URI = "folderListUri"; 114 115 /** 116 * This string column contains the content provider uri that can be queried for search 117 * results. 118 */ 119 public static final String SEARCH_URI = "searchUri"; 120 121 /** 122 * This string column contains the content provider uri that can be queried to access the 123 * from addresses for this account. 124 */ 125 public static final String ACCOUNT_FROM_ADDRESSES_URI = "accountFromAddressesUri"; 126 127 /** 128 * This string column contains the content provider uri that can be used to save (insert) 129 * new draft messages for this account. NOTE: This might be better to 130 * be an update operation on the messageUri. 131 */ 132 public static final String SAVE_DRAFT_URI = "saveDraftUri"; 133 134 /** 135 * This string column contains the content provider uri that can be used to send 136 * a message for this account. 137 * NOTE: This might be better to be an update operation on the messageUri. 138 */ 139 public static final String SEND_MAIL_URI = "sendMailUri"; 140 141 /** 142 * This string column contains the content provider uri that can be used 143 * to expunge a message from this account. NOTE: This might be better to 144 * be an update operation on the messageUri. 145 */ 146 public static final String EXPUNGE_MESSAGE_URI = "expungeMessageUri"; 147 148 /** 149 * This string column contains the content provider uri that can be used 150 * to undo the last committed action. 151 */ 152 public static String UNDO_URI = "undoUri"; 153 } 154 155 // We define a "folder" as anything that contains a list of conversations. 156 public static final String FOLDER_LIST_TYPE = 157 "vnd.android.cursor.dir/vnd.com.android.mail.folder"; 158 public static final String FOLDER_TYPE = 159 "vnd.android.cursor.item/vnd.com.android.mail.folder"; 160 161 public static final String[] FOLDERS_PROJECTION = { 162 BaseColumns._ID, 163 FolderColumns.URI, 164 FolderColumns.NAME, 165 FolderColumns.HAS_CHILDREN, 166 FolderColumns.CAPABILITIES, 167 FolderColumns.SYNC_FREQUENCY, 168 FolderColumns.SYNC_WINDOW, 169 FolderColumns.CONVERSATION_LIST_URI, 170 FolderColumns.CHILD_FOLDERS_LIST_URI, 171 FolderColumns.UNREAD_COUNT, 172 FolderColumns.TOTAL_COUNT, 173 }; 174 175 public static final int FOLDER_ID_COLUMN = 0; 176 public static final int FOLDER_URI_COLUMN = 1; 177 public static final int FOLDER_NAME_COLUMN = 2; 178 public static final int FOLDER_HAS_CHILDREN_COLUMN = 3; 179 public static final int FOLDER_CAPABILITIES_COLUMN = 4; 180 public static final int FOLDER_SYNC_FREQUENCY_COLUMN = 5; 181 public static final int FOLDER_SYNC_WINDOW_COLUMN = 6; 182 public static final int FOLDER_CONVERSATION_LIST_URI_COLUMN = 7; 183 public static final int FOLDER_CHILD_FOLDERS_LIST_COLUMN = 8; 184 public static final int FOLDER_UNREAD_COUNT_COLUMN = 9; 185 public static final int FOLDER_TOTAL_COUNT_COLUMN = 10; 186 187 public static final class FolderCapabilities { 188 public static final int SYNCABLE = 0x0001; 189 public static final int PARENT = 0x0002; 190 public static final int CAN_HOLD_MAIL = 0x0004; 191 public static final int CAN_ACCEPT_MOVED_MESSAGES = 0x0008; 192 } 193 194 public static final class FolderColumns { 195 public static String URI = "folderUri"; 196 /** 197 * This string column contains the human visible name for the folder. 198 */ 199 public static final String NAME = "name"; 200 /** 201 * This int column represents the capabilities of the folder specified by 202 * FolderCapabilities flags. 203 */ 204 public static String CAPABILITIES = "capabilities"; 205 /** 206 * This int column represents whether or not this folder has any 207 * child folders. 208 */ 209 public static String HAS_CHILDREN = "hasChildren"; 210 /** 211 * This int column represents how often the folder should be synchronized with the server. 212 */ 213 public static String SYNC_FREQUENCY = "syncFrequency"; 214 /** 215 * This int column represents how large the sync window is. 216 */ 217 public static String SYNC_WINDOW = "syncWindow"; 218 /** 219 * This string column contains the content provider uri to return the 220 * list of conversations for this folder. 221 */ 222 public static final String CONVERSATION_LIST_URI = "conversationListUri"; 223 /** 224 * This string column contains the content provider uri to return the 225 * list of child folders of this folder. 226 */ 227 public static String CHILD_FOLDERS_LIST_URI = "childFoldersListUri"; 228 229 public static String UNREAD_COUNT = "unreadCount"; 230 231 public static String TOTAL_COUNT = "totalCount"; 232 233 public FolderColumns() {} 234 } 235 236 // We define a "folder" as anything that contains a list of conversations. 237 public static final String CONVERSATION_LIST_TYPE = 238 "vnd.android.cursor.dir/vnd.com.android.mail.conversation"; 239 public static final String CONVERSATION_TYPE = 240 "vnd.android.cursor.item/vnd.com.android.mail.conversation"; 241 242 public static final String[] CONVERSATION_PROJECTION = { 243 BaseColumns._ID, 244 ConversationColumns.URI, 245 ConversationColumns.MESSAGE_LIST_URI, 246 ConversationColumns.SUBJECT, 247 ConversationColumns.SNIPPET, 248 ConversationColumns.SENDER_INFO, 249 ConversationColumns.DATE_RECEIVED_MS, 250 ConversationColumns.HAS_ATTACHMENTS, 251 ConversationColumns.NUM_MESSAGES, 252 ConversationColumns.NUM_DRAFTS, 253 ConversationColumns.SENDING_STATE, 254 ConversationColumns.PRIORITY, 255 ConversationColumns.READ, 256 ConversationColumns.STARRED 257 }; 258 259 // These column indexes only work when the caller uses the 260 // default CONVERSATION_PROJECTION defined above. 261 public static final int CONVERSATION_ID_COLUMN = 0; 262 public static final int CONVERSATION_URI_COLUMN = 1; 263 public static final int CONVERSATION_MESSAGE_LIST_URI_COLUMN = 2; 264 public static final int CONVERSATION_SUBJECT_COLUMN = 3; 265 public static final int CONVERSATION_SNIPPET_COLUMN = 4; 266 public static final int CONVERSATION_SENDER_INFO_COLUMN = 5; 267 public static final int CONVERSATION_DATE_RECEIVED_MS_COLUMN = 6; 268 public static final int CONVERSATION_HAS_ATTACHMENTS_COLUMN = 7; 269 public static final int CONVERSATION_NUM_MESSAGES_COLUMN = 8; 270 public static final int CONVERSATION_NUM_DRAFTS_COLUMN = 9; 271 public static final int CONVERSATION_SENDING_STATE_COLUMN = 10; 272 public static final int CONVERSATION_PRIORITY_COLUMN = 11; 273 public static final int CONVERSATION_READ_COLUMN = 12; 274 public static final int CONVERSATION_STARRED_COLUMN = 13; 275 276 public static final class ConversationSendingState { 277 public static final int OTHER = 0; 278 public static final int SENDING = 1; 279 public static final int SENT = 2; 280 public static final int SEND_ERROR = -1; 281 }; 282 283 public static final class ConversationPriority { 284 public static final int LOW = 0; 285 public static final int HIGH = 1; 286 }; 287 288 public static final class ConversationFlags { 289 public static final int READ = 1<<0; 290 public static final int STARRED = 1<<1; 291 public static final int REPLIED = 1<<2; 292 public static final int FORWARDED = 1<<3; 293 }; 294 295 public static final class ConversationColumns { 296 public static final String URI = "conversationUri"; 297 /** 298 * This string column contains the content provider uri to return the 299 * list of messages for this conversation. 300 */ 301 public static final String MESSAGE_LIST_URI = "messageListUri"; 302 /** 303 * This string column contains the subject string for a conversation. 304 */ 305 public static final String SUBJECT = "subject"; 306 /** 307 * This string column contains the snippet string for a conversation. 308 */ 309 public static final String SNIPPET = "snippet"; 310 /** 311 * This string column contains the sender info string for a 312 * conversation. 313 */ 314 public static final String SENDER_INFO = "senderInfo"; 315 /** 316 * This long column contains the time in ms of the latest update to a 317 * conversation. 318 */ 319 public static final String DATE_RECEIVED_MS = "dateReceivedMs"; 320 321 /** 322 * This boolean column contains whether any messages in this conversation 323 * have attachments. 324 */ 325 public static final String HAS_ATTACHMENTS = "hasAttachments"; 326 327 /** 328 * This int column contains the number of messages in this conversation. 329 * For unthreaded, this will always be 1. 330 */ 331 public static String NUM_MESSAGES = "numMessages"; 332 333 /** 334 * This int column contains the number of drafts associated with this 335 * conversation. 336 */ 337 public static String NUM_DRAFTS = "numDrafts"; 338 339 /** 340 * This int column contains the state of drafts and replies associated 341 * with this conversation. Use ConversationSendingState to interpret 342 * this field. 343 */ 344 public static String SENDING_STATE = "sendingState"; 345 346 /** 347 * This int column contains the priority of this conversation. Use 348 * ConversationPriority to interpret this field. 349 */ 350 public static String PRIORITY = "priority"; 351 352 /** 353 * This boolean column indicates whether the conversation has been read 354 */ 355 public static String READ = "read"; 356 357 /** 358 * This boolean column indicates whether the conversation has been read 359 */ 360 public static String STARRED = "starred"; 361 362 public ConversationColumns() { 363 } 364 } 365 366 /** 367 * Returns a uri that, when queried, will return a cursor with a list of information for the 368 * list of configured accounts. 369 * @return 370 */ 371 // TODO: create a static registry for the starting point for the UI provider. 372// public static Uri getAccountsUri() { 373// return Uri.parse(BASE_URI_STRING + "/"); 374// } 375 376 public static final class DraftType { 377 public static final int NOT_A_DRAFT = 0; 378 public static final int COMPOSE = 1; 379 public static final int REPLY = 2; 380 public static final int REPLY_ALL = 3; 381 public static final int FORWARD = 4; 382 383 private DraftType() {} 384 } 385 386 public static final String[] MESSAGE_PROJECTION = { 387 BaseColumns._ID, 388 MessageColumns.SERVER_ID, 389 MessageColumns.URI, 390 MessageColumns.CONVERSATION_ID, 391 MessageColumns.SUBJECT, 392 MessageColumns.SNIPPET, 393 MessageColumns.FROM, 394 MessageColumns.TO, 395 MessageColumns.CC, 396 MessageColumns.BCC, 397 MessageColumns.REPLY_TO, 398 MessageColumns.DATE_RECEIVED_MS, 399 MessageColumns.BODY_HTML, 400 MessageColumns.BODY_TEXT, 401 MessageColumns.EMBEDS_EXTERNAL_RESOURCES, 402 MessageColumns.REF_MESSAGE_ID, 403 MessageColumns.DRAFT_TYPE, 404 MessageColumns.APPEND_REF_MESSAGE_CONTENT, 405 MessageColumns.HAS_ATTACHMENTS, 406 MessageColumns.ATTACHMENT_LIST_URI, 407 MessageColumns.MESSAGE_FLAGS, 408 MessageColumns.JOINED_ATTACHMENT_INFOS, 409 MessageColumns.SAVE_MESSAGE_URI, 410 MessageColumns.SEND_MESSAGE_URI 411 }; 412 413 /** Separates attachment info parts in strings in a message. */ 414 public static final String MESSAGE_ATTACHMENT_INFO_SEPARATOR = "\n"; 415 public static final String MESSAGE_LIST_TYPE = 416 "vnd.android.cursor.dir/vnd.com.android.mail.message"; 417 public static final String MESSAGE_TYPE = 418 "vnd.android.cursor.item/vnd.com.android.mail.message"; 419 420 public static final int MESSAGE_ID_COLUMN = 0; 421 public static final int MESSAGE_SERVER_ID_COLUMN = 1; 422 public static final int MESSAGE_URI_COLUMN = 2; 423 public static final int MESSAGE_CONVERSATION_ID_COLUMN = 3; 424 public static final int MESSAGE_SUBJECT_COLUMN = 4; 425 public static final int MESSAGE_SNIPPET_COLUMN = 5; 426 public static final int MESSAGE_FROM_COLUMN = 6; 427 public static final int MESSAGE_TO_COLUMN = 7; 428 public static final int MESSAGE_CC_COLUMN = 8; 429 public static final int MESSAGE_BCC_COLUMN = 9; 430 public static final int MESSAGE_REPLY_TO_COLUMN = 10; 431 public static final int MESSAGE_DATE_RECEIVED_MS_COLUMN = 11; 432 public static final int MESSAGE_BODY_HTML_COLUMN = 12; 433 public static final int MESSAGE_BODY_TEXT_COLUMN = 13; 434 public static final int MESSAGE_EMBEDS_EXTERNAL_RESOURCES_COLUMN = 14; 435 public static final int MESSAGE_REF_MESSAGE_ID_COLUMN = 15; 436 public static final int MESSAGE_DRAFT_TYPE_COLUMN = 16; 437 public static final int MESSAGE_APPEND_REF_MESSAGE_CONTENT_COLUMN = 17; 438 public static final int MESSAGE_HAS_ATTACHMENTS_COLUMN = 18; 439 public static final int MESSAGE_ATTACHMENT_LIST_URI_COLUMN = 19; 440 public static final int MESSAGE_FLAGS_COLUMN = 20; 441 public static final int MESSAGE_JOINED_ATTACHMENT_INFOS_COLUMN = 21; 442 public static final int MESSAGE_SAVE_URI_COLUMN = 22; 443 public static final int MESSAGE_SEND_URI_COLUMN = 23; 444 445 public static final class MessageFlags { 446 public static final int STARRED = 1 << 0; 447 public static final int UNREAD = 1 << 1; 448 public static final int REPLIED = 1 << 2; 449 public static final int FORWARDED = 1 << 3; 450 } 451 452 public static final class MessageColumns { 453 /** 454 * This string column contains a content provider URI that points to this single message. 455 */ 456 public static final String URI = "messageUri"; 457 /** 458 * This string column contains a server-assigned ID for this message. 459 */ 460 public static final String SERVER_ID = "serverMessageId"; 461 public static final String CONVERSATION_ID = "conversationId"; 462 /** 463 * This string column contains the subject of a message. 464 */ 465 public static final String SUBJECT = "subject"; 466 /** 467 * This string column contains a snippet of the message body. 468 */ 469 public static final String SNIPPET = "snippet"; 470 /** 471 * This string column contains the single email address (and optionally name) of the sender. 472 */ 473 public static final String FROM = "fromAddress"; 474 /** 475 * This string column contains a comma-delimited list of "To:" recipient email addresses. 476 */ 477 public static final String TO = "toAddresses"; 478 /** 479 * This string column contains a comma-delimited list of "CC:" recipient email addresses. 480 */ 481 public static final String CC = "ccAddresses"; 482 /** 483 * This string column contains a comma-delimited list of "BCC:" recipient email addresses. 484 * This value will be null for incoming messages. 485 */ 486 public static final String BCC = "bccAddresses"; 487 /** 488 * This string column contains the single email address (and optionally name) of the 489 * sender's reply-to address. 490 */ 491 public static final String REPLY_TO = "replyToAddress"; 492 /** 493 * This long column contains the timestamp (in millis) of receipt of the message. 494 */ 495 public static final String DATE_RECEIVED_MS = "dateReceivedMs"; 496 /** 497 * This string column contains the HTML form of the message body, if available. If not, 498 * a provider must populate BODY_TEXT. 499 */ 500 public static final String BODY_HTML = "bodyHtml"; 501 /** 502 * This string column contains the plaintext form of the message body, if HTML is not 503 * otherwise available. If HTML is available, this value should be left empty (null). 504 */ 505 public static final String BODY_TEXT = "bodyText"; 506 public static final String EMBEDS_EXTERNAL_RESOURCES = "bodyEmbedsExternalResources"; 507 /** 508 * This string column contains an opaque string used by the sendMessage api. 509 */ 510 public static final String REF_MESSAGE_ID = "refMessageId"; 511 /** 512 * This integer column contains the type of this draft, or zero (0) if this message is not a 513 * draft. See {@link DraftType} for possible values. 514 */ 515 public static final String DRAFT_TYPE = "draftType"; 516 /** 517 * This boolean column indicates whether an outgoing message should trigger special quoted 518 * text processing upon send. The value should default to zero (0) for protocols that do 519 * not support or require this flag, and for all incoming messages. 520 */ 521 public static final String APPEND_REF_MESSAGE_CONTENT = "appendRefMessageContent"; 522 /** 523 * This boolean column indicates whether a message has attachments. The list of attachments 524 * can be retrieved using the URI in {@link MessageColumns#ATTACHMENT_LIST_URI}. 525 */ 526 public static final String HAS_ATTACHMENTS = "hasAttachments"; 527 /** 528 * This string column contains the content provider URI for the list of 529 * attachments associated with this message. 530 */ 531 public static final String ATTACHMENT_LIST_URI = "attachmentListUri"; 532 /** 533 * This long column is a bit field of flags defined in {@link MessageFlags}. 534 */ 535 public static final String MESSAGE_FLAGS = "messageFlags"; 536 /** 537 * This string column contains a specially formatted string representing all 538 * attachments that we added to a message that is being sent or saved. 539 */ 540 public static final String JOINED_ATTACHMENT_INFOS = "joinedAttachmentInfos"; 541 /** 542 * This string column contains the content provider URI for saving this 543 * message. 544 */ 545 public static final String SAVE_MESSAGE_URI = "saveMessageUri"; 546 /** 547 * This string column contains content provider URI for sending this 548 * message. 549 */ 550 public static final String SEND_MESSAGE_URI = "sendMessageUri"; 551 552 private MessageColumns() {} 553 } 554 555 // We define a "folder" as anything that contains a list of conversations. 556 public static final String ATTACHMENT_LIST_TYPE = 557 "vnd.android.cursor.dir/vnd.com.android.mail.attachment"; 558 public static final String ATTACHMENT_TYPE = 559 "vnd.android.cursor.item/vnd.com.android.mail.attachment"; 560 561 public static final String[] ATTACHMENT_PROJECTION = { 562 BaseColumns._ID, 563 AttachmentColumns.NAME, 564 AttachmentColumns.SIZE, 565 AttachmentColumns.URI, 566 AttachmentColumns.ORIGIN_EXTRAS, 567 AttachmentColumns.CONTENT_TYPE, 568 AttachmentColumns.SYNCED 569 }; 570 private static final String EMAIL_SEPARATOR_PATTERN = "\n"; 571 public static final int ATTACHMENT_ID_COLUMN = 0; 572 public static final int ATTACHMENT_NAME_COLUMN = 1; 573 public static final int ATTACHMENT_SIZE_COLUMN = 2; 574 public static final int ATTACHMENT_URI_COLUMN = 3; 575 public static final int ATTACHMENT_ORIGIN_EXTRAS_COLUMN = 4; 576 public static final int ATTACHMENT_CONTENT_TYPE_COLUMN = 5; 577 public static final int ATTACHMENT_SYNCED_COLUMN = 6; 578 579 public static final class AttachmentColumns { 580 public static final String NAME = "name"; 581 public static final String SIZE = "size"; 582 public static final String URI = "uri"; 583 public static final String ORIGIN_EXTRAS = "originExtras"; 584 public static final String CONTENT_TYPE = "contentType"; 585 public static final String SYNCED = "synced"; 586 } 587 588 public static int getMailMaxAttachmentSize(String account) { 589 // TODO: query the account to see what the max attachment size is? 590 return 5 * 1024 * 1024; 591 } 592 593 public static String getAttachmentTypeSetting() { 594 // TODO: query the account to see what kinds of attachments it supports? 595 return "com.google.android.gm.allowAddAnyAttachment"; 596 } 597 598 public static void incrementRecipientsTimesContacted(Context context, String addressString) { 599 DataUsageStatUpdater statsUpdater = new DataUsageStatUpdater(context); 600 ArrayList<String> recipients = new ArrayList<String>(); 601 String[] addresses = TextUtils.split(addressString, EMAIL_SEPARATOR_PATTERN); 602 for (String address : addresses) { 603 recipients.add(address); 604 } 605 statsUpdater.updateWithAddress(recipients); 606 } 607 608 public static final String[] UNDO_PROJECTION = { 609 ConversationColumns.MESSAGE_LIST_URI 610 }; 611 public static final int UNDO_MESSAGE_LIST_COLUMN = 0; 612} 613