UIProvider.java revision 6a2df258316b267151296556dbbdba20200ecb1f
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.ContentProvider; 21import android.content.ContentValues; 22import android.database.Cursor; 23import android.net.Uri; 24import android.os.Bundle; 25import android.os.Parcelable; 26import android.provider.BaseColumns; 27import android.provider.OpenableColumns; 28import android.text.TextUtils; 29 30import com.google.common.collect.ImmutableList; 31import com.google.common.collect.ImmutableMap; 32 33import java.util.Map; 34import java.util.regex.Pattern; 35 36public class UIProvider { 37 public static final String EMAIL_SEPARATOR = ","; 38 public static final long INVALID_CONVERSATION_ID = -1; 39 public static final long INVALID_MESSAGE_ID = -1; 40 41 /** 42 * Values for the current state of a Folder/Account; note that it's possible that more than one 43 * sync is in progress 44 */ 45 public static final class SyncStatus { 46 /** 47 * No sync in progress 48 */ 49 public static final int NO_SYNC = 0; 50 /** 51 * A user-requested sync/refresh is in progress. This occurs when the user taps on the 52 * refresh icon in the action bar. 53 */ 54 public static final int USER_REFRESH = 1<<0; 55 /** 56 * A user-requested live query is in progress. This occurs when the user goes past the end 57 * of the fetched results in the conversation list. 58 */ 59 public static final int LIVE_QUERY = 1<<1; 60 /** Please use the constant {@link #LIVE_QUERY} instead. */ 61 @Deprecated 62 public static final int USER_QUERY = 1<<1; 63 /** 64 * A background sync is in progress. This happens on <b>no</b> user interaction. 65 */ 66 public static final int BACKGROUND_SYNC = 1<<2; 67 /** 68 * An initial sync is needed for this Account/Folder to be used. This is account-wide, when 69 * the user has added an account, and the first sync has not completed successfully. 70 */ 71 public static final int INITIAL_SYNC_NEEDED = 1<<3; 72 /** 73 * Manual sync is required. This is account-wide, when the user has disabled sync on the 74 * Gmail account. 75 */ 76 public static final int MANUAL_SYNC_REQUIRED = 1<<4; 77 /** 78 * Account initialization is required. 79 */ 80 public static final int ACCOUNT_INITIALIZATION_REQUIRED = 1<<5; 81 82 public static boolean isSyncInProgress(int syncStatus) { 83 return 0 != (syncStatus & (BACKGROUND_SYNC | 84 USER_REFRESH | 85 LIVE_QUERY)); 86 } 87 } 88 89 /** 90 * Values for the result of the last attempted sync of a Folder/Account 91 */ 92 public static final class LastSyncResult { 93 /** The sync completed successfully */ 94 public static final int SUCCESS = 0; 95 /** The sync wasn't completed due to a connection error */ 96 public static final int CONNECTION_ERROR = 1; 97 /** The sync wasn't completed due to an authentication error */ 98 public static final int AUTH_ERROR = 2; 99 /** The sync wasn't completed due to a security error */ 100 public static final int SECURITY_ERROR = 3; 101 /** The sync wasn't completed due to a low memory condition */ 102 public static final int STORAGE_ERROR = 4; 103 /** The sync wasn't completed due to an internal error/exception */ 104 public static final int INTERNAL_ERROR = 5; 105 /** The sync wasn't completed due to an error in the mail server */ 106 public static final int SERVER_ERROR = 6; 107 } 108 109 // The actual content provider should define its own authority 110 public static final String AUTHORITY = "com.android.mail.providers"; 111 112 public static final String ACCOUNT_LIST_TYPE = 113 "vnd.android.cursor.dir/vnd.com.android.mail.account"; 114 public static final String ACCOUNT_TYPE = 115 "vnd.android.cursor.item/vnd.com.android.mail.account"; 116 117 /** 118 * Query parameter key that can be used to control the behavior of list queries. The value 119 * must be a serialized {@link ListParams} object. UIProvider implementations are not 120 * required to respect this query parameter 121 */ 122 public static final String LIST_PARAMS_QUERY_PARAMETER = "listParams"; 123 public static final String LABEL_QUERY_PARAMETER = "label"; 124 public static final String SEEN_QUERY_PARAMETER = "seen"; 125 126 /** 127 * Query parameter that can be used to specify a parent for a the returned folder object from a 128 * query. When set, if a folder is returned that does not have a true parent, it will use this 129 * uri as its parent uri. 130 */ 131 public static final String DEFAULT_PARENT_QUERY_PARAMETER = "defaultParent"; 132 133 public static final Map<String, Class<?>> ACCOUNTS_COLUMNS_NO_CAPABILITIES = 134 new ImmutableMap.Builder<String, Class<?>>() 135 .put(AccountColumns._ID, Integer.class) 136 .put(AccountColumns.NAME, String.class) 137 .put(AccountColumns.SENDER_NAME, String.class) 138 .put(AccountColumns.ACCOUNT_MANAGER_NAME, String.class) 139 .put(AccountColumns.TYPE, String.class) 140 .put(AccountColumns.PROVIDER_VERSION, Integer.class) 141 .put(AccountColumns.URI, String.class) 142 .put(AccountColumns.FOLDER_LIST_URI, String.class) 143 .put(AccountColumns.FULL_FOLDER_LIST_URI, String.class) 144 .put(AccountColumns.ALL_FOLDER_LIST_URI, String.class) 145 .put(AccountColumns.SEARCH_URI, String.class) 146 .put(AccountColumns.ACCOUNT_FROM_ADDRESSES, String.class) 147 .put(AccountColumns.EXPUNGE_MESSAGE_URI, String.class) 148 .put(AccountColumns.UNDO_URI, String.class) 149 .put(AccountColumns.SETTINGS_INTENT_URI, String.class) 150 .put(AccountColumns.SYNC_STATUS, Integer.class) 151 .put(AccountColumns.HELP_INTENT_URI, String.class) 152 .put(AccountColumns.SEND_FEEDBACK_INTENT_URI, String.class) 153 .put(AccountColumns.REAUTHENTICATION_INTENT_URI, String.class) 154 .put(AccountColumns.COMPOSE_URI, String.class) 155 .put(AccountColumns.MIME_TYPE, String.class) 156 .put(AccountColumns.RECENT_FOLDER_LIST_URI, String.class) 157 .put(AccountColumns.COLOR, Integer.class) 158 .put(AccountColumns.DEFAULT_RECENT_FOLDER_LIST_URI, String.class) 159 .put(AccountColumns.MANUAL_SYNC_URI, String.class) 160 .put(AccountColumns.VIEW_INTENT_PROXY_URI, String.class) 161 .put(AccountColumns.ACCOUNT_COOKIE_QUERY_URI, String.class) 162 .put(AccountColumns.SettingsColumns.SIGNATURE, String.class) 163 .put(AccountColumns.SettingsColumns.AUTO_ADVANCE, Integer.class) 164 .put(AccountColumns.SettingsColumns.MESSAGE_TEXT_SIZE, Integer.class) 165 .put(AccountColumns.SettingsColumns.SNAP_HEADERS, Integer.class) 166 .put(AccountColumns.SettingsColumns.REPLY_BEHAVIOR, Integer.class) 167 .put(AccountColumns.SettingsColumns.CONV_LIST_ICON, Integer.class) 168 .put(AccountColumns.SettingsColumns.CONV_LIST_ATTACHMENT_PREVIEWS, Integer.class) 169 .put(AccountColumns.SettingsColumns.CONFIRM_DELETE, Integer.class) 170 .put(AccountColumns.SettingsColumns.CONFIRM_ARCHIVE, Integer.class) 171 .put(AccountColumns.SettingsColumns.CONFIRM_SEND, Integer.class) 172 .put(AccountColumns.SettingsColumns.DEFAULT_INBOX, String.class) 173 .put(AccountColumns.SettingsColumns.DEFAULT_INBOX_NAME, String.class) 174 .put(AccountColumns.SettingsColumns.FORCE_REPLY_FROM_DEFAULT, Integer.class) 175 .put(AccountColumns.SettingsColumns.MAX_ATTACHMENT_SIZE, Integer.class) 176 .put(AccountColumns.SettingsColumns.SWIPE, Integer.class) 177 .put(AccountColumns.SettingsColumns.IMPORTANCE_MARKERS_ENABLED, Integer.class) 178 .put(AccountColumns.SettingsColumns.SHOW_CHEVRONS_ENABLED, Integer.class) 179 .put(AccountColumns.SettingsColumns.SETUP_INTENT_URI, String.class) 180 .put(AccountColumns.SettingsColumns.CONVERSATION_VIEW_MODE, Integer.class) 181 .put(AccountColumns.SettingsColumns.VEILED_ADDRESS_PATTERN, String.class) 182 .put(AccountColumns.UPDATE_SETTINGS_URI, String.class) 183 .put(AccountColumns.ENABLE_MESSAGE_TRANSFORMS, Integer.class) 184 .put(AccountColumns.SYNC_AUTHORITY, String.class) 185 .put(AccountColumns.QUICK_RESPONSE_URI, String.class) 186 .put(AccountColumns.SettingsColumns.MOVE_TO_INBOX, String.class) 187 .put(AccountColumns.SettingsColumns.SHOW_IMAGES, Integer.class) 188 .build(); 189 190 public static final Map<String, Class<?>> ACCOUNTS_COLUMNS = 191 new ImmutableMap.Builder<String, Class<?>>() 192 .putAll(ACCOUNTS_COLUMNS_NO_CAPABILITIES) 193 .put(AccountColumns.CAPABILITIES, Integer.class) 194 .build(); 195 196 // pull out the keyset from above to form the projection 197 public static final String[] ACCOUNTS_PROJECTION = 198 ACCOUNTS_COLUMNS.keySet().toArray(new String[ACCOUNTS_COLUMNS.size()]); 199 200 public static final 201 String[] ACCOUNTS_PROJECTION_NO_CAPABILITIES = ACCOUNTS_COLUMNS_NO_CAPABILITIES.keySet() 202 .toArray(new String[ACCOUNTS_COLUMNS_NO_CAPABILITIES.size()]); 203 204 public static final class AccountCapabilities { 205 /** 206 * Whether folders can be synchronized back to the server. 207 */ 208 public static final int SYNCABLE_FOLDERS = 0x0001; 209 /** 210 * Whether the server allows reporting spam back. 211 */ 212 public static final int REPORT_SPAM = 0x0002; 213 /** 214 * Whether the server allows reporting phishing back. 215 */ 216 public static final int REPORT_PHISHING = 0x0004; 217 /** 218 * Whether the server supports a concept of Archive: removing mail from the Inbox but 219 * keeping it around. 220 */ 221 public static final int ARCHIVE = 0x0008; 222 /** 223 * Whether the server will stop notifying on updates to this thread? This requires 224 * THREADED_CONVERSATIONS to be true, otherwise it should be ignored. 225 */ 226 public static final int MUTE = 0x0010; 227 /** 228 * Whether the server supports searching over all messages. This requires SYNCABLE_FOLDERS 229 * to be true, otherwise it should be ignored. 230 */ 231 public static final int SERVER_SEARCH = 0x0020; 232 /** 233 * Whether the server supports constraining search to a single folder. Requires 234 * SYNCABLE_FOLDERS, otherwise it should be ignored. 235 */ 236 public static final int FOLDER_SERVER_SEARCH = 0x0040; 237 /** 238 * Whether the server sends us sanitized HTML (guaranteed to not contain malicious HTML). 239 */ 240 public static final int SANITIZED_HTML = 0x0080; 241 /** 242 * Whether the server allows synchronization of draft messages. This does NOT require 243 * SYNCABLE_FOLDERS to be set. 244 */ 245 public static final int DRAFT_SYNCHRONIZATION = 0x0100; 246 /** 247 * Does the server allow the user to compose mails (and reply) using addresses other than 248 * their account name? For instance, GMail allows users to set FROM addresses that are 249 * different from account@gmail.com address. For instance, user@gmail.com could have another 250 * FROM: address like user@android.com. If the user has enabled multiple FROM address, he 251 * can compose (and reply) using either address. 252 */ 253 public static final int MULTIPLE_FROM_ADDRESSES = 0x0200; 254 /** 255 * Whether the server allows the original message to be included in the reply by setting a 256 * flag on the reply. If we can avoid including the entire previous message, we save on 257 * bandwidth (replies are shorter). 258 */ 259 public static final int SMART_REPLY = 0x0400; 260 /** 261 * Does this account support searching locally, on the device? This requires the backend 262 * storage to support a mechanism for searching. 263 */ 264 public static final int LOCAL_SEARCH = 0x0800; 265 /** 266 * Whether the server supports a notion of threaded conversations: where replies to messages 267 * are tagged to keep conversations grouped. This could be full threading (each message 268 * lists its parent) or conversation-level threading (each message lists one conversation 269 * which it belongs to) 270 */ 271 public static final int THREADED_CONVERSATIONS = 0x1000; 272 /** 273 * Whether the server supports allowing a conversation to be in multiple folders. (Or allows 274 * multiple folders on a single conversation) 275 */ 276 public static final int MULTIPLE_FOLDERS_PER_CONV = 0x2000; 277 /** 278 * Whether the provider supports undoing operations. If it doesn't, never show the undo bar. 279 */ 280 public static final int UNDO = 0x4000; 281 /** 282 * Whether the account provides help content. 283 */ 284 public static final int HELP_CONTENT = 0x8000; 285 /** 286 * Whether the account provides a way to send feedback content. 287 */ 288 public static final int SEND_FEEDBACK = 0x10000; 289 /** 290 * Whether the account provides a mechanism for marking conversations as important. 291 */ 292 public static final int MARK_IMPORTANT = 0x20000; 293 /** 294 * Whether initial conversation queries should use a limit parameter 295 */ 296 public static final int INITIAL_CONVERSATION_LIMIT = 0x40000; 297 /** 298 * Whether the account cannot be used for sending 299 */ 300 public static final int SENDING_UNAVAILABLE = 0x80000; 301 /** 302 * Whether the account supports discarding drafts from a conversation. This should be 303 * removed when all providers support this capability 304 */ 305 public static final int DISCARD_CONVERSATION_DRAFTS = 0x100000; 306 /** 307 * Whether the account supports emptying the trash folder 308 */ 309 public static final int EMPTY_TRASH = 0x200000; 310 /** 311 * Whether the account supports emptying the spam folder 312 */ 313 public static final int EMPTY_SPAM = 0x400000; 314 /** 315 * Whether the account supports nested folders 316 */ 317 public static final int NESTED_FOLDERS = 0x800000; 318 } 319 320 public static final class AccountColumns implements BaseColumns { 321 /** 322 * This string column contains the human visible name for the account. 323 */ 324 public static final String NAME = "name"; 325 326 /** 327 * This string column contains the real name associated with the account, e.g. "John Doe" 328 */ 329 public static final String SENDER_NAME = "senderName"; 330 331 /** 332 * This string column contains the account manager name of this account. 333 */ 334 335 public static final String ACCOUNT_MANAGER_NAME = "accountManagerName"; 336 337 /** 338 * This integer contains the type of the account: Google versus non google. This is not 339 * returned by the UIProvider, rather this is a notion in the system. 340 */ 341 public static final String TYPE = "type"; 342 343 /** 344 * This integer column returns the version of the UI provider schema from which this 345 * account provider will return results. 346 */ 347 public static final String PROVIDER_VERSION = "providerVersion"; 348 349 /** 350 * This string column contains the uri to directly access the information for this account. 351 */ 352 public static final String URI = "accountUri"; 353 354 /** 355 * This integer column contains a bit field of the possible capabilities that this account 356 * supports. 357 */ 358 public static final String CAPABILITIES = "capabilities"; 359 360 /** 361 * This string column contains the content provider uri to return the 362 * list of top level folders for this account. 363 */ 364 public static final String FOLDER_LIST_URI = "folderListUri"; 365 366 /** 367 * This string column contains the content provider uri to return the 368 * list of all real folders for this account. 369 */ 370 public static final String FULL_FOLDER_LIST_URI = "fullFolderListUri"; 371 372 /** 373 * This string column contains the content provider uri to return the 374 * list of all real and synthetic folders for this account. 375 */ 376 public static final String ALL_FOLDER_LIST_URI = "allFolderListUri"; 377 378 /** 379 * This string column contains the content provider uri that can be queried for search 380 * results. 381 * The supported query parameters are limited to those listed 382 * in {@link SearchQueryParameters} 383 * The cursor returned from this query is expected have one row, where the columnm are a 384 * subset of the columns specified in {@link FolderColumns} 385 */ 386 public static final String SEARCH_URI = "searchUri"; 387 388 /** 389 * This string column contains a json array of json objects representing 390 * custom from addresses for this account or null if there are none. 391 */ 392 public static final String ACCOUNT_FROM_ADDRESSES = "accountFromAddresses"; 393 394 /** 395 * This string column contains the content provider uri that can be used 396 * to expunge a message from this account. NOTE: This might be better to 397 * be an update operation on the messageUri. 398 * When {@link android.content.ContentResolver#update(Uri, ContentValues, String, String[])} 399 * is called with this uri, the {@link ContentValues} object is expected to have 400 * {@link BaseColumns#_ID} specified with the local message id of the message. 401 */ 402 public static final String EXPUNGE_MESSAGE_URI = "expungeMessageUri"; 403 404 /** 405 * This string column contains the content provider uri that can be used 406 * to undo the last committed action. 407 */ 408 public static final String UNDO_URI = "undoUri"; 409 410 /** 411 * Uri for EDIT intent that will cause the settings screens for this account type to be 412 * shown. 413 * Optionally, extra values from {@link EditSettingsExtras} can be used to indicate 414 * which settings the user wants to edit. 415 * TODO: When we want to support a heterogeneous set of account types, this value may need 416 * to be moved to a global content provider. 417 */ 418 public static final String SETTINGS_INTENT_URI = "accountSettingsIntentUri"; 419 420 /** 421 * Uri for VIEW intent that will cause the help screens for this account type to be 422 * shown. 423 * TODO: When we want to support a heterogeneous set of account types, this value may need 424 * to be moved to a global content provider. 425 */ 426 public static final String HELP_INTENT_URI = "helpIntentUri"; 427 428 /** 429 * Uri for VIEW intent that will cause the send feedback for this account type to be 430 * shown. 431 * TODO: When we want to support a heterogeneous set of account types, this value may need 432 * to be moved to a global content provider. 433 */ 434 public static final String SEND_FEEDBACK_INTENT_URI = "sendFeedbackIntentUri"; 435 436 /** 437 * Uri for VIEW intent that will cause the user to be prompted for authentication for 438 * this account. startActivityForResult() will be called with this intent. Activities that 439 * handle this intent are expected to return {@link android.app.Activity#RESULT_OK} if the 440 * user successfully authenticated. 441 */ 442 public static final String REAUTHENTICATION_INTENT_URI = "reauthenticationUri"; 443 444 /** 445 * This int column contains the current sync status of the account (the logical AND of the 446 * sync status of folders in this account) 447 */ 448 public static final String SYNC_STATUS = "syncStatus"; 449 /** 450 * Uri for VIEW intent that will cause the compose screens for this type 451 * of account to be shown. 452 */ 453 public static final String COMPOSE_URI = "composeUri"; 454 /** 455 * Mime-type defining this account. 456 */ 457 public static final String MIME_TYPE = "mimeType"; 458 /** 459 * URI for location of recent folders viewed on this account. 460 */ 461 public static final String RECENT_FOLDER_LIST_URI = "recentFolderListUri"; 462 /** 463 * URI for default recent folders for this account, if any. 464 */ 465 public static final String DEFAULT_RECENT_FOLDER_LIST_URI = "defaultRecentFolderListUri"; 466 /** 467 * Color (integer) used for this account (for Email/Combined view) 468 */ 469 public static final String COLOR = "color"; 470 /** 471 * URI for forcing a manual sync of this account. 472 */ 473 public static final String MANUAL_SYNC_URI = "manualSyncUri"; 474 /** 475 * Optional URI of this account for proxying view intents. 476 */ 477 public static final String VIEW_INTENT_PROXY_URI = "viewProxyUri"; 478 /** 479 * Optional URI for querying for the cookie needed for accessing inline content. The cookie 480 * specified here will be set on the uri specified in the 481 * {@link ConversationColumns#CONVERSATION_BASE_URI} column. The cursor returned from this 482 * query is expected have one row, where the columns are specified in 483 * {@link AccountCookieColumns} 484 */ 485 public static final String ACCOUNT_COOKIE_QUERY_URI = "accountCookieUri"; 486 /** 487 * URI to be used with an update() ContentResolver call with a {@link ContentValues} object 488 * where the keys are from the {@link AccountColumns.SettingsColumns}, and the values are 489 * the new values. 490 */ 491 public static final String UPDATE_SETTINGS_URI = "updateSettingsUri"; 492 /** 493 * Whether message transforms (HTML DOM manipulation) should be enabled. 494 */ 495 public static final String ENABLE_MESSAGE_TRANSFORMS = "enableMessageTransforms"; 496 /** 497 * Sync authority to use. 498 */ 499 public static final String SYNC_AUTHORITY = "syncAuthority"; 500 /** 501 * URI for querying this account's quick responses 502 */ 503 public static final String QUICK_RESPONSE_URI = "quickResponseUri"; 504 505 public static final class SettingsColumns { 506 /** 507 * String column containing the contents of the signature for this account. If no 508 * signature has been specified, the value will be null. 509 */ 510 public static final String SIGNATURE = "signature"; 511 512 /** 513 * Integer column containing the user's specified auto-advance policy. This value will 514 * be one of the values in {@link UIProvider.AutoAdvance} 515 */ 516 public static final String AUTO_ADVANCE = "auto_advance"; 517 518 /** 519 * Integer column containing the user's specified message text size preference. This 520 * value will be one of the values in {@link UIProvider.MessageTextSize} 521 */ 522 public static final String MESSAGE_TEXT_SIZE = "message_text_size"; 523 524 /** 525 * Integer column contaning the user's specified snap header preference. This value 526 * will be one of the values in {@link UIProvider.SnapHeaderValue} 527 */ 528 public static final String SNAP_HEADERS = "snap_headers"; 529 530 /** 531 * Integer column containing the user's specified default reply behavior. This value 532 * will be one of the values in {@link UIProvider.DefaultReplyBehavior} 533 */ 534 public static final String REPLY_BEHAVIOR = "reply_behavior"; 535 536 /** 537 * Integer column containing the user's preference for whether to show sender images 538 * or not in the conversation list view. This value will be one of the values in 539 * {@link UIProvider.ConversationListIcon}. 540 */ 541 public static final String CONV_LIST_ICON = "conversation_list_icon"; 542 543 /** 544 * Integer column containing the user's preference for whether to show attachment 545 * previews or not in the conversation list view. A non zero value indicates that 546 * attachment previews should be displayed. 547 */ 548 public static final String CONV_LIST_ATTACHMENT_PREVIEWS 549 = "conversation_list_attachment_previews"; 550 551 /** 552 * Integer column containing the user's specified confirm delete preference value. 553 * A non zero value indicates that the user has indicated that a confirmation should 554 * be shown when a delete action is performed. 555 */ 556 public static final String CONFIRM_DELETE = "confirm_delete"; 557 558 /** 559 * Integer column containing the user's specified confirm archive preference value. 560 * A non zero value indicates that the user has indicated that a confirmation should 561 * be shown when an archive action is performed. 562 */ 563 public static final String CONFIRM_ARCHIVE = "confirm_archive"; 564 565 /** 566 * Integer column containing the user's specified confirm send preference value. 567 * A non zero value indicates that the user has indicated that a confirmation should 568 * be shown when a send action is performed. 569 */ 570 public static final String CONFIRM_SEND = "confirm_send"; 571 /** 572 * String containing the URI for the default inbox for this account. 573 */ 574 public static final String DEFAULT_INBOX = "default_inbox"; 575 /** 576 * String containing the name of the default Inbox for this account 577 */ 578 public static final String DEFAULT_INBOX_NAME = "default_inbox_name"; 579 /** 580 * Integer column containing a non zero value if replies should always be sent from 581 * a default address instead of a recipient. 582 */ 583 public static final String FORCE_REPLY_FROM_DEFAULT = "force_reply_from_default"; 584 /** 585 * Integer column containing the max attachment size in kb. 586 */ 587 public static final String MAX_ATTACHMENT_SIZE = "max_attachment_size"; 588 /** 589 * Integer column containing a value matching one of the constants from {@link Swipe} 590 */ 591 public static final String SWIPE = "swipe"; 592 /** 593 * Integer column containing whether importance markers are enabled. 594 */ 595 public static final String IMPORTANCE_MARKERS_ENABLED = "importance_markers_enabled"; 596 /** 597 * Integer column containing whether chevrons should be shown. 598 * Chevrons are personal level indicators: 599 * an arrow ( › ) by messages sent to my address (not a mailing list), 600 * and a double arrow ( » ) by messages sent only to me. 601 */ 602 public static final String SHOW_CHEVRONS_ENABLED = "show_chevrons_enabled"; 603 /** 604 * Uri for EDIT intent that will cause account-specific setup UI to be shown. If not 605 * null, this intent should be used when an account is "entered" (i.e. viewing a folder 606 * in the account, etc.) 607 */ 608 public static final String SETUP_INTENT_URI = "setup_intent_uri"; 609 /** 610 * The regex that defines a veiled address, something that must be hidden from user 611 * view because it is temporary, long and clumsy. 612 */ 613 public static final String VEILED_ADDRESS_PATTERN = "veiled_address_pattern"; 614 /** 615 * Integer column containing the Conversation view mode. This value will match one of 616 * constants from {@link ConversationViewMode} 617 */ 618 public static final String CONVERSATION_VIEW_MODE = "conversation_view_mode"; 619 /** 620 * String containing the URI for the inbox conversations should be moved to for this 621 * account. 622 */ 623 public static final String MOVE_TO_INBOX = "move_to_inbox"; 624 /** 625 * Show images in conversation view. 626 */ 627 public static final String SHOW_IMAGES = "show_images"; 628 } 629 } 630 631 public static final String[] QUICK_RESPONSE_PROJECTION = { 632 BaseColumns._ID, 633 QuickResponseColumns.TEXT, 634 QuickResponseColumns.URI 635 }; 636 637 public static final class QuickResponseColumns { 638 /** 639 * Text of the Quick Response 640 */ 641 public static final String TEXT = "quickResponse"; 642 /** 643 * URI to access this row directly 644 */ 645 public static final String URI = "uri"; 646 } 647 648 public static final String[] ACCOUNT_COOKIE_PROJECTION = { 649 AccountCookieColumns.COOKIE 650 }; 651 652 public static final class AccountCookieColumns { 653 /** 654 * String column containing the cookie string for this account. 655 */ 656 public static final String COOKIE = "cookie"; 657 } 658 659 public static final class SearchQueryParameters { 660 /** 661 * Parameter used to specify the search query. 662 */ 663 public static final String QUERY = "query"; 664 665 /* 666 * This parameter is set by ACTION_SEARCH to differentiate one ACTION_SEARCH from another. 667 * This is necessary because the Uri we construct for each query is only based on the 668 * search query string. However, subsequent searches with the same string will confuse 669 * the underlying provider into thinking that it's still the same "session", thus it will 670 * keep the data it had before. This is a problem when we do search on some keyword, then 671 * without navigating away we do the same search again (expecting to see new results there 672 * and outdated results gone). By keying the Uri on both search query and a unique id, 673 * we ensure that old data gets properly destroyed. 674 * @see UnifiedGmail, MailEngine#getConversationCursorForQuery. 675 */ 676 public static final String QUERY_IDENTIFER = "query_identifier"; 677 678 private SearchQueryParameters() {} 679 } 680 681 public static final class ConversationListQueryParameters { 682 public static final String DEFAULT_LIMIT = "50"; 683 /** 684 * Parameter used to limit the number of rows returned by a conversation list query 685 */ 686 public static final String LIMIT = "limit"; 687 688 /** 689 * Parameter used to control whether the this query a remote server. 690 */ 691 public static final String USE_NETWORK = "use_network"; 692 693 /** 694 * Parameter used to allow the caller to indicate desire to receive all notifications. 695 * (Including ones for user initiated actions) 696 */ 697 public static final String ALL_NOTIFICATIONS = "all_notifications"; 698 699 private ConversationListQueryParameters() {} 700 } 701 702 // We define a "folder" as anything that contains a list of conversations. 703 public static final String FOLDER_LIST_TYPE = 704 "vnd.android.cursor.dir/vnd.com.android.mail.folder"; 705 public static final String FOLDER_TYPE = 706 "vnd.android.cursor.item/vnd.com.android.mail.folder"; 707 708 public static final String[] FOLDERS_PROJECTION = { 709 FolderColumns._ID, 710 FolderColumns.PERSISTENT_ID, 711 FolderColumns.URI, 712 FolderColumns.NAME, 713 FolderColumns.HAS_CHILDREN, 714 FolderColumns.CAPABILITIES, 715 FolderColumns.SYNC_WINDOW, 716 FolderColumns.CONVERSATION_LIST_URI, 717 FolderColumns.CHILD_FOLDERS_LIST_URI, 718 FolderColumns.UNSEEN_COUNT, 719 FolderColumns.UNREAD_COUNT, 720 FolderColumns.TOTAL_COUNT, 721 FolderColumns.REFRESH_URI, 722 FolderColumns.SYNC_STATUS, 723 FolderColumns.LAST_SYNC_RESULT, 724 FolderColumns.TYPE, 725 FolderColumns.ICON_RES_ID, 726 FolderColumns.NOTIFICATION_ICON_RES_ID, 727 FolderColumns.BG_COLOR, 728 FolderColumns.FG_COLOR, 729 FolderColumns.LOAD_MORE_URI, 730 FolderColumns.HIERARCHICAL_DESC, 731 FolderColumns.LAST_MESSAGE_TIMESTAMP, 732 FolderColumns.PARENT_URI 733 }; 734 735 public static final String[] FOLDERS_PROJECTION_WITH_UNREAD_SENDERS = 736 (new ImmutableList.Builder<String>() 737 .addAll(ImmutableList.copyOf(FOLDERS_PROJECTION)) 738 .add(FolderColumns.UNREAD_SENDERS) 739 .build().toArray(new String[0])); 740 741 public static final int FOLDER_ID_COLUMN = 0; 742 public static final int FOLDER_PERSISTENT_ID_COLUMN = 1; 743 public static final int FOLDER_URI_COLUMN = 2; 744 public static final int FOLDER_NAME_COLUMN = 3; 745 public static final int FOLDER_HAS_CHILDREN_COLUMN = 4; 746 public static final int FOLDER_CAPABILITIES_COLUMN = 5; 747 public static final int FOLDER_SYNC_WINDOW_COLUMN = 6; 748 public static final int FOLDER_CONVERSATION_LIST_URI_COLUMN = 7; 749 public static final int FOLDER_CHILD_FOLDERS_LIST_COLUMN = 8; 750 public static final int FOLDER_UNSEEN_COUNT_COLUMN = 9; 751 public static final int FOLDER_UNREAD_COUNT_COLUMN = 10; 752 public static final int FOLDER_TOTAL_COUNT_COLUMN = 11; 753 public static final int FOLDER_REFRESH_URI_COLUMN = 12; 754 public static final int FOLDER_SYNC_STATUS_COLUMN = 13; 755 public static final int FOLDER_LAST_SYNC_RESULT_COLUMN = 14; 756 public static final int FOLDER_TYPE_COLUMN = 15; 757 public static final int FOLDER_ICON_RES_ID_COLUMN = 16; 758 public static final int FOLDER_NOTIFICATION_ICON_RES_ID_COLUMN = 17; 759 public static final int FOLDER_BG_COLOR_COLUMN = 18; 760 public static final int FOLDER_FG_COLOR_COLUMN = 19; 761 public static final int FOLDER_LOAD_MORE_URI_COLUMN = 20; 762 public static final int FOLDER_HIERARCHICAL_DESC_COLUMN = 21; 763 public static final int FOLDER_LAST_MESSAGE_TIMESTAMP_COLUMN = 22; 764 public static final int FOLDER_PARENT_URI_COLUMN = 23; 765 766 public static final class FolderType { 767 /** A user defined label. */ 768 public static final int DEFAULT = 1 << 0; 769 /** A system defined inbox */ 770 public static final int INBOX = 1 << 1; 771 /** A system defined containing mails to be edited before sending. */ 772 public static final int DRAFT = 1 << 2; 773 /** A system defined folder containing mails <b>to be</b> sent */ 774 public static final int OUTBOX = 1 << 3; 775 /** A system defined folder containing sent mails */ 776 public static final int SENT = 1 << 4; 777 /** A system defined trash folder */ 778 public static final int TRASH = 1 << 5; 779 /** A system defined spam folder */ 780 public static final int SPAM = 1 << 6; 781 /** A system defined starred folder */ 782 public static final int STARRED = 1 << 7; 783 /** Any other system label that we do not have a specific name for. */ 784 public static final int OTHER_PROVIDER_FOLDER = 1 << 8; 785 /** All mail folder */ 786 public static final int ALL_MAIL = 1 << 9; 787 /** Gmail's inbox sections */ 788 public static final int INBOX_SECTION = 1 << 10; 789 /** A system defined unread folder */ 790 public static final int UNREAD = 1 << 11; 791 /** A "fake" search folder */ 792 public static final int SEARCH = 1 << 12; 793 } 794 795 public static final class FolderCapabilities { 796 public static final int SYNCABLE = 0x0001; 797 public static final int PARENT = 0x0002; 798 // FEEL FREE TO USE 0x0004 - was previous CAN_HOLD_MAIL but that was true for all 799 // folders so we removed that value 800 public static final int CAN_ACCEPT_MOVED_MESSAGES = 0x0008; 801 /** 802 * For accounts that support archive, this will indicate that this folder supports 803 * the archive functionality. 804 */ 805 public static final int ARCHIVE = 0x0010; 806 807 /** 808 * This will indicated that this folder supports the delete functionality. 809 */ 810 public static final int DELETE = 0x0020; 811 812 /** 813 * For accounts that support report spam, this will indicate that this folder supports 814 * the report spam functionality. 815 */ 816 public static final int REPORT_SPAM = 0x0040; 817 818 /** 819 * For accounts that support report spam, this will indicate that this folder supports 820 * the mark not spam functionality. 821 */ 822 public static final int MARK_NOT_SPAM = 0x0080; 823 824 /** 825 * For accounts that support mute, this will indicate if a mute is performed from within 826 * this folder, the action is destructive. 827 */ 828 public static final int DESTRUCTIVE_MUTE = 0x0100; 829 830 /** 831 * Indicates that a folder supports settings (sync lookback, etc.) 832 */ 833 public static final int SUPPORTS_SETTINGS = 0x0200; 834 /** 835 * All the messages in this folder are important. 836 */ 837 public static final int ONLY_IMPORTANT = 0x0400; 838 /** 839 * Deletions in this folder can't be undone (could include archive if desirable) 840 */ 841 public static final int DELETE_ACTION_FINAL = 0x0800; 842 /** 843 * This folder is virtual, i.e. contains conversations potentially pulled from other 844 * folders, potentially even from different accounts. Examples might be a "starred" 845 * folder, or an "unread" folder (per account or provider-wide) 846 */ 847 public static final int IS_VIRTUAL = 0x1000; 848 849 /** 850 * For accounts that support report phishing, this will indicate that this folder supports 851 * the report phishing functionality. 852 */ 853 public static final int REPORT_PHISHING = 0x2000; 854 855 /** 856 * The flag indicates that the user has the ability to move conversations 857 * from this folder. 858 */ 859 public static final int ALLOWS_REMOVE_CONVERSATION = 0x4000; 860 861 /** 862 * The flag indicates that the user has the ability to move conversations to or from this 863 * Folder in the same operation as other Folder changes (usually through 864 * {@link com.android.mail.ui.MultiFoldersSelectionDialog}). 865 */ 866 public static final int MULTI_MOVE = 0x8000; 867 868 /** 869 * This flag indicates that a conversation may be moved from this folder into the account's 870 * inbox. 871 */ 872 public static final int ALLOWS_MOVE_TO_INBOX = 0x10000; 873 874 /** 875 * For folders that typically represent outgoing mail, this indicates the client should 876 * display recipients rather than the standard list of senders. 877 */ 878 public static final int SHOW_RECIPIENTS = 0x20000; 879 } 880 881 public static final class FolderColumns implements BaseColumns { 882 /** 883 * This string column contains an id for the folder that is constant across devices, or 884 * null if there is no constant id. 885 */ 886 public static final String PERSISTENT_ID = "persistentId"; 887 /** 888 * This string column contains the uri of the folder. 889 */ 890 public static final String URI = "folderUri"; 891 /** 892 * This string column contains the human visible name for the folder. 893 */ 894 public static final String NAME = "name"; 895 /** 896 * This int column represents the capabilities of the folder specified by 897 * FolderCapabilities flags. 898 */ 899 public static final String CAPABILITIES = "capabilities"; 900 /** 901 * This int column represents whether or not this folder has any 902 * child folders. 903 */ 904 public static final String HAS_CHILDREN = "hasChildren"; 905 /** 906 * This int column represents how large the sync window is. 907 */ 908 public static final String SYNC_WINDOW = "syncWindow"; 909 /** 910 * This string column contains the content provider uri to return the 911 * list of conversations for this folder. 912 */ 913 public static final String CONVERSATION_LIST_URI = "conversationListUri"; 914 /** 915 * This string column contains the content provider uri to return the 916 * list of child folders of this folder. 917 */ 918 public static final String CHILD_FOLDERS_LIST_URI = "childFoldersListUri"; 919 /** 920 * This int column contains the current unseen count for the folder, if known. 921 */ 922 public static final String UNSEEN_COUNT = "unseenCount"; 923 /** 924 * This int column contains the current unread count for the folder. 925 */ 926 public static final String UNREAD_COUNT = "unreadCount"; 927 928 public static final String TOTAL_COUNT = "totalCount"; 929 /** 930 * This string column contains the content provider uri to force a 931 * refresh of this folder. 932 */ 933 public static final String REFRESH_URI = "refreshUri"; 934 /** 935 * This int column contains current sync status of the folder; some combination of the 936 * SyncStatus bits defined above 937 */ 938 public static final String SYNC_STATUS = "syncStatus"; 939 /** 940 * This int column contains the sync status of the last sync attempt; one of the 941 * LastSyncStatus values defined above 942 */ 943 public static final String LAST_SYNC_RESULT = "lastSyncResult"; 944 /** 945 * This int column contains the icon res id for this folder, or 0 if there is none. 946 */ 947 public static final String ICON_RES_ID = "iconResId"; 948 /** 949 * This int column contains the notification icon res id for this folder, or 0 if there is 950 * none. 951 */ 952 public static final String NOTIFICATION_ICON_RES_ID = "notificationIconResId"; 953 /** 954 * This int column contains the type of the folder. Zero is default. 955 */ 956 public static final String TYPE = "type"; 957 /** 958 * String representing the integer background color associated with this 959 * folder, or null. 960 */ 961 public static final String BG_COLOR = "bgColor"; 962 /** 963 * String representing the integer of the foreground color associated 964 * with this folder, or null. 965 */ 966 public static final String FG_COLOR = "fgColor"; 967 /** 968 * String with the content provider Uri used to request more items in the folder, or null. 969 */ 970 public static final String LOAD_MORE_URI = "loadMoreUri"; 971 972 /** 973 * Possibly empty string that describes the full hierarchy of a folder 974 * along with its name. 975 */ 976 public static final String HIERARCHICAL_DESC = "hierarchicalDesc"; 977 978 /** 979 * The timestamp of the last message received in this folder. 980 */ 981 public static final String LAST_MESSAGE_TIMESTAMP = "lastMessageTimestamp"; 982 983 /** 984 * The URI, possibly null, of the parent folder. 985 */ 986 public static final String PARENT_URI = "parentUri"; 987 988 /** 989 * A string of unread senders sorted by date, so we don't have to fetch this in multiple 990 * queries 991 */ 992 public static final String UNREAD_SENDERS = "unreadSenders"; 993 994 public FolderColumns() {} 995 } 996 997 // We define a "folder" as anything that contains a list of conversations. 998 public static final String CONVERSATION_LIST_TYPE = 999 "vnd.android.cursor.dir/vnd.com.android.mail.conversation"; 1000 public static final String CONVERSATION_TYPE = 1001 "vnd.android.cursor.item/vnd.com.android.mail.conversation"; 1002 1003 1004 public static final String[] CONVERSATION_PROJECTION = { 1005 BaseColumns._ID, 1006 ConversationColumns.URI, 1007 ConversationColumns.MESSAGE_LIST_URI, 1008 ConversationColumns.SUBJECT, 1009 ConversationColumns.SNIPPET, 1010 ConversationColumns.CONVERSATION_INFO, 1011 ConversationColumns.DATE_RECEIVED_MS, 1012 ConversationColumns.HAS_ATTACHMENTS, 1013 ConversationColumns.NUM_MESSAGES, 1014 ConversationColumns.NUM_DRAFTS, 1015 ConversationColumns.SENDING_STATE, 1016 ConversationColumns.PRIORITY, 1017 ConversationColumns.READ, 1018 ConversationColumns.SEEN, 1019 ConversationColumns.STARRED, 1020 ConversationColumns.RAW_FOLDERS, 1021 ConversationColumns.FLAGS, 1022 ConversationColumns.PERSONAL_LEVEL, 1023 ConversationColumns.SPAM, 1024 ConversationColumns.PHISHING, 1025 ConversationColumns.MUTED, 1026 ConversationColumns.COLOR, 1027 ConversationColumns.ACCOUNT_URI, 1028 ConversationColumns.SENDER_INFO, 1029 ConversationColumns.CONVERSATION_BASE_URI, 1030 ConversationColumns.REMOTE, 1031 ConversationColumns.ATTACHMENT_PREVIEW_URI0, 1032 ConversationColumns.ATTACHMENT_PREVIEW_URI1, 1033 ConversationColumns.ATTACHMENT_PREVIEW_STATES, 1034 ConversationColumns.ATTACHMENT_PREVIEWS_COUNT 1035 }; 1036 1037 /** 1038 * This integer corresponds to the number of rows of queries that specify the 1039 * {@link UIProvider#CONVERSATION_PROJECTION} projection will fit in a single 1040 * {@link android.database.CursorWindow} 1041 */ 1042 public static final int CONVERSATION_PROJECTION_QUERY_CURSOR_WINDOW_LIMIT = 1500; 1043 1044 // These column indexes only work when the caller uses the 1045 // default CONVERSATION_PROJECTION defined above. 1046 public static final int CONVERSATION_ID_COLUMN = 0; 1047 public static final int CONVERSATION_URI_COLUMN = 1; 1048 public static final int CONVERSATION_MESSAGE_LIST_URI_COLUMN = 2; 1049 public static final int CONVERSATION_SUBJECT_COLUMN = 3; 1050 public static final int CONVERSATION_SNIPPET_COLUMN = 4; 1051 public static final int CONVERSATION_INFO_COLUMN = 5; 1052 public static final int CONVERSATION_DATE_RECEIVED_MS_COLUMN = 6; 1053 public static final int CONVERSATION_HAS_ATTACHMENTS_COLUMN = 7; 1054 public static final int CONVERSATION_NUM_MESSAGES_COLUMN = 8; 1055 public static final int CONVERSATION_NUM_DRAFTS_COLUMN = 9; 1056 public static final int CONVERSATION_SENDING_STATE_COLUMN = 10; 1057 public static final int CONVERSATION_PRIORITY_COLUMN = 11; 1058 public static final int CONVERSATION_READ_COLUMN = 12; 1059 public static final int CONVERSATION_SEEN_COLUMN = 13; 1060 public static final int CONVERSATION_STARRED_COLUMN = 14; 1061 public static final int CONVERSATION_RAW_FOLDERS_COLUMN = 15; 1062 public static final int CONVERSATION_FLAGS_COLUMN = 16; 1063 public static final int CONVERSATION_PERSONAL_LEVEL_COLUMN = 17; 1064 public static final int CONVERSATION_IS_SPAM_COLUMN = 18; 1065 public static final int CONVERSATION_IS_PHISHING_COLUMN = 19; 1066 public static final int CONVERSATION_MUTED_COLUMN = 20; 1067 public static final int CONVERSATION_COLOR_COLUMN = 21; 1068 public static final int CONVERSATION_ACCOUNT_URI_COLUMN = 22; 1069 public static final int CONVERSATION_SENDER_INFO_COLUMN = 23; 1070 public static final int CONVERSATION_BASE_URI_COLUMN = 24; 1071 public static final int CONVERSATION_REMOTE_COLUMN = 25; 1072 public static final int CONVERSATION_ATTACHMENT_PREVIEW_URI0_COLUMN = 26; 1073 public static final int CONVERSATION_ATTACHMENT_PREVIEW_URI1_COLUMN = 27; 1074 public static final int CONVERSATION_ATTACHMENT_PREVIEW_STATES_COLUMN = 28; 1075 public static final int CONVERSATION_ATTACHMENT_PREVIEWS_COUNT_COLUMN = 29; 1076 1077 public static final class ConversationSendingState { 1078 public static final int OTHER = 0; 1079 public static final int QUEUED = 1; 1080 public static final int SENDING = 2; 1081 public static final int SENT = 3; 1082 public static final int RETRYING = 4; 1083 public static final int SEND_ERROR = -1; 1084 } 1085 1086 public static final class ConversationPriority { 1087 public static final int DEFAULT = 0; 1088 public static final int IMPORTANT = 1; 1089 public static final int LOW = 0; 1090 public static final int HIGH = 1; 1091 } 1092 1093 public static final class ConversationPersonalLevel { 1094 public static final int NOT_TO_ME = 0; 1095 public static final int TO_ME_AND_OTHERS = 1; 1096 public static final int ONLY_TO_ME = 2; 1097 } 1098 1099 public static final class ConversationFlags { 1100 public static final int REPLIED = 1<<2; 1101 public static final int FORWARDED = 1<<3; 1102 public static final int CALENDAR_INVITE = 1<<4; 1103 } 1104 1105 public static final class ConversationPhishing { 1106 public static final int NOT_PHISHING = 0; 1107 public static final int PHISHING = 1; 1108 } 1109 1110 /** 1111 * Names of columns representing fields in a Conversation. 1112 */ 1113 public static final class ConversationColumns { 1114 public static final String URI = "conversationUri"; 1115 /** 1116 * This string column contains the content provider uri to return the 1117 * list of messages for this conversation. 1118 * The cursor returned by this query can return a {@link android.os.Bundle} 1119 * from a call to {@link android.database.Cursor#getExtras()}. This Bundle may have 1120 * values with keys listed in {@link CursorExtraKeys} 1121 */ 1122 public static final String MESSAGE_LIST_URI = "messageListUri"; 1123 /** 1124 * This string column contains the subject string for a conversation. 1125 */ 1126 public static final String SUBJECT = "subject"; 1127 /** 1128 * This string column contains the snippet string for a conversation. 1129 */ 1130 public static final String SNIPPET = "snippet"; 1131 /** 1132 * @deprecated 1133 */ 1134 @Deprecated 1135 public static final String SENDER_INFO = "senderInfo"; 1136 /** 1137 * This blob column contains the byte-array representation of the Parceled 1138 * ConversationInfo object for a conversation. 1139 * 1140 * @deprecated providers should implement 1141 * {@link ConversationCursorCommand#COMMAND_GET_CONVERSATION_INFO} instead. 1142 */ 1143 @Deprecated 1144 public static final String CONVERSATION_INFO = "conversationInfo"; 1145 /** 1146 * This long column contains the time in ms of the latest update to a 1147 * conversation. 1148 */ 1149 public static final String DATE_RECEIVED_MS = "dateReceivedMs"; 1150 1151 /** 1152 * This boolean column contains whether any messages in this conversation 1153 * have attachments. 1154 */ 1155 public static final String HAS_ATTACHMENTS = "hasAttachments"; 1156 1157 /** 1158 * This int column contains the number of messages in this conversation. 1159 * For unthreaded, this will always be 1. 1160 */ 1161 public static final String NUM_MESSAGES = "numMessages"; 1162 1163 /** 1164 * This int column contains the number of drafts associated with this 1165 * conversation. 1166 */ 1167 public static final String NUM_DRAFTS = "numDrafts"; 1168 1169 /** 1170 * This int column contains the state of drafts and replies associated 1171 * with this conversation. Use ConversationSendingState to interpret 1172 * this field. 1173 */ 1174 public static final String SENDING_STATE = "sendingState"; 1175 1176 /** 1177 * This int column contains the priority of this conversation. Use 1178 * ConversationPriority to interpret this field. 1179 */ 1180 public static final String PRIORITY = "priority"; 1181 1182 /** 1183 * This int column indicates whether the conversation has been read 1184 */ 1185 public static final String READ = "read"; 1186 1187 /** 1188 * This int column indicates whether the conversation has been seen 1189 */ 1190 public static final String SEEN = "seen"; 1191 1192 /** 1193 * This int column indicates whether the conversation has been starred 1194 */ 1195 public static final String STARRED = "starred"; 1196 1197 /** 1198 * This blob column contains the marshalled form of a Parceled 1199 * {@FolderList} object. Ideally, only ever use this for 1200 * rendering the folder list for a conversation. 1201 * 1202 * @deprecated providers should implement 1203 * {@link ConversationCursorCommand#COMMAND_GET_RAW_FOLDERS} instead. 1204 */ 1205 @Deprecated 1206 public static final String RAW_FOLDERS = "rawFolders"; 1207 public static final String FLAGS = "conversationFlags"; 1208 /** 1209 * This int column indicates the personal level of a conversation per 1210 * {@link ConversationPersonalLevel}. 1211 */ 1212 public static final String PERSONAL_LEVEL = "personalLevel"; 1213 1214 /** 1215 * This int column indicates whether the conversation is marked spam. 1216 */ 1217 public static final String SPAM = "spam"; 1218 1219 /** 1220 * This int column indicates whether the conversation is marked phishing. 1221 */ 1222 public static final String PHISHING = "phishing"; 1223 1224 /** 1225 * This int column indicates whether the conversation was muted. 1226 */ 1227 public static final String MUTED = "muted"; 1228 1229 /** 1230 * This int column contains a color for the conversation (used in Email only) 1231 */ 1232 public static final String COLOR = "color"; 1233 1234 /** 1235 * This String column contains the Uri for this conversation's account 1236 */ 1237 public static final String ACCOUNT_URI = "accountUri"; 1238 /** 1239 * This int column indicates whether a conversation is remote (non-local), and would require 1240 * a network fetch to load. 1241 */ 1242 public static final String REMOTE = "remote"; 1243 /** 1244 * This int column indicates whether the conversation was displayed on the UI and the 1245 * user got a chance to read it. The UI does not read this value, it is meant only to 1246 * write the status back to the provider. As a result, it is not available in the 1247 * {@link Conversation} object. 1248 */ 1249 public static final String VIEWED = "viewed"; 1250 /** 1251 * This String column contains the base uri for this conversation. This uri can be used 1252 * when handling relative urls in the message content 1253 */ 1254 public static final String CONVERSATION_BASE_URI = "conversationBaseUri"; 1255 1256 /** 1257 * This string column contains the uri of the first attachment preview of the first unread 1258 * message, denoted by UNREAD_MESSAGE_ID. 1259 */ 1260 public static final String ATTACHMENT_PREVIEW_URI0 = "attachmentPreviewUri0"; 1261 1262 /** 1263 * This string column contains the uri of the second attachment preview of the first unread 1264 * message, denoted by UNREAD_MESSAGE_ID. 1265 */ 1266 public static final String ATTACHMENT_PREVIEW_URI1 = "attachmentPreviewUri1"; 1267 1268 /** 1269 * This int column contains the states of the attachment previews of the first unread 1270 * message, the same message used for the snippet. The states is a packed int, 1271 * where the first and second bits represent the SIMPLE and BEST state of the first 1272 * attachment preview, while the third and fourth bits represent those states for the 1273 * second attachment preview. For each bit, a one means that rendition of that attachment 1274 * preview is downloaded. 1275 */ 1276 public static final String ATTACHMENT_PREVIEW_STATES = "attachmentPreviewStates"; 1277 1278 /** 1279 * This int column contains the total count of images in the first unread message. The 1280 * total count may be higher than the number of ATTACHMENT_PREVIEW_URI columns. 1281 */ 1282 public static final String ATTACHMENT_PREVIEWS_COUNT = "attachmentPreviewsCount"; 1283 1284 private ConversationColumns() { 1285 } 1286 } 1287 1288 public static final class ConversationCursorCommand { 1289 1290 public static final String COMMAND_RESPONSE_OK = "ok"; 1291 public static final String COMMAND_RESPONSE_FAILED = "failed"; 1292 1293 /** 1294 * Incoming bundles may include this key with an Integer bitfield value. See below for bit 1295 * values. 1296 */ 1297 public static final String COMMAND_KEY_OPTIONS = "options"; 1298 1299 /** 1300 * Clients must set this bit when the {@link Cursor#respond(Bundle)} call is being used to 1301 * fetch a {@link Parcelable}. It serves as a hint that this call requires the cursor 1302 * position to first safely be moved. 1303 */ 1304 public static final int OPTION_MOVE_POSITION = 0x01; 1305 1306 /** 1307 * This bundle key has a boolean value: true to indicate that this cursor has been shown 1308 * to the user. 1309 * <p> 1310 * A provider that implements this command should include this key in its response with a 1311 * value of {@link #COMMAND_RESPONSE_OK} or {@link #COMMAND_RESPONSE_FAILED}. 1312 */ 1313 public static final String COMMAND_KEY_SET_VISIBILITY = "setVisibility"; 1314 1315 /** 1316 * This key has a boolean value: true to indicate that this folder list is shown to the user 1317 * either on first call (launcher/widget/notification) or after switching from an existing 1318 * folder: Inbox -> Folder. Repeated calls are sent when switching back to the folder. Inbox 1319 * -> Folder -> Spam -> Folder will generate two calls to respond() with the value true for 1320 * "Folder". 1321 * <p> 1322 * A provider that implements this command should include the 1323 * {@link #COMMAND_KEY_SET_VISIBILITY} key in its response with a value of 1324 * {@link #COMMAND_RESPONSE_OK} or {@link #COMMAND_RESPONSE_FAILED}. This is <b>always</b> 1325 * set with {@link #COMMAND_KEY_SET_VISIBILITY} because this is only set when the folder 1326 * list is made visible. 1327 */ 1328 public static final String COMMAND_KEY_ENTERED_FOLDER = "enteredFolder"; 1329 1330 /** 1331 * This key has an int value, indicating the position that the UI wants to notify the 1332 * provider that the data from a specified row is being shown to the user. 1333 * <p> 1334 * A provider that implements this command should include the 1335 * {@link #COMMAND_NOTIFY_CURSOR_UI_POSITION_CHANGE} key in its response with a value of 1336 * {@link #COMMAND_RESPONSE_OK} or {@link #COMMAND_RESPONSE_FAILED}. 1337 */ 1338 public static final String COMMAND_NOTIFY_CURSOR_UI_POSITION_CHANGE = "uiPositionChange"; 1339 1340 /** 1341 * Rather than jamming a {@link ConversationInfo} into a byte-array blob to be read out of 1342 * a cursor, providers can optionally implement this command to directly return the object 1343 * in a Bundle. 1344 * <p> 1345 * The requestor (UI code) will place a meaningless value in the request Bundle. The UI will 1346 * also move the cursor position to the desired place prior to calling respond(). Providers 1347 * should just use {@link Bundle#containsKey(String)} to check for this kind of request and 1348 * generate an object at the current cursor position. 1349 * <p> 1350 * A provider that implements this command should include the 1351 * {@link #COMMAND_GET_CONVERSATION_INFO} key in its response with a 1352 * {@link ConversationInfo} Parcelable object as its value. 1353 */ 1354 public static final String COMMAND_GET_CONVERSATION_INFO = 1355 ConversationColumns.CONVERSATION_INFO; 1356 1357 /** 1358 * Rather than jamming a {@link FolderList} into a byte-array blob to be read out of 1359 * a cursor, providers can optionally implement this command to directly return the object 1360 * in a Bundle. 1361 * <p> 1362 * The requestor (UI code) will place a meaningless value in the request Bundle. The UI will 1363 * also move the cursor position to the desired place prior to calling respond(). Providers 1364 * should just use {@link Bundle#containsKey(String)} to check for this kind of request and 1365 * generate an object at the current cursor position. 1366 * <p> 1367 * A provider that implements this command should include the 1368 * {@link #COMMAND_GET_RAW_FOLDERS} key in its response with a 1369 * {@link FolderList} Parcelable object as its value. 1370 */ 1371 public static final String COMMAND_GET_RAW_FOLDERS = ConversationColumns.RAW_FOLDERS; 1372 1373 private ConversationCursorCommand() {} 1374 } 1375 1376 /** 1377 * List of operations that can can be performed on a conversation. These operations are applied 1378 * with {@link ContentProvider#update(Uri, ContentValues, String, String[])} 1379 * where the conversation uri is specified, and the ContentValues specifies the operation to 1380 * be performed. 1381 * <p/> 1382 * The operation to be performed is specified in the ContentValues by 1383 * the {@link ConversationOperations#OPERATION_KEY} 1384 * <p/> 1385 * Note not all UI providers will support these operations. {@link AccountCapabilities} can 1386 * be used to determine which operations are supported. 1387 */ 1388 public static final class ConversationOperations { 1389 /** 1390 * ContentValues key used to specify the operation to be performed 1391 */ 1392 public static final String OPERATION_KEY = "operation"; 1393 1394 /** 1395 * Archive operation 1396 */ 1397 public static final String ARCHIVE = "archive"; 1398 1399 /** 1400 * Mute operation 1401 */ 1402 public static final String MUTE = "mute"; 1403 1404 /** 1405 * Report spam operation 1406 */ 1407 public static final String REPORT_SPAM = "report_spam"; 1408 1409 /** 1410 * Report not spam operation 1411 */ 1412 public static final String REPORT_NOT_SPAM = "report_not_spam"; 1413 1414 /** 1415 * Report phishing operation 1416 */ 1417 public static final String REPORT_PHISHING = "report_phishing"; 1418 1419 /** 1420 * Discard drafts operation 1421 */ 1422 public static final String DISCARD_DRAFTS = "discard_drafts"; 1423 1424 /** 1425 * Update conversation folder(s) operation. ContentValues passed as part 1426 * of this update will be of the format (FOLDERS_UPDATED, csv of updated 1427 * folders) where the comma separated values of the updated folders will 1428 * be of the format: folderuri/ADD_VALUE. ADD_VALUE will be true if the 1429 * folder was added, false if it was removed. 1430 */ 1431 public static final String FOLDERS_UPDATED = "folders_updated"; 1432 public static final String FOLDERS_UPDATED_SPLIT_PATTERN = ","; 1433 1434 public static final class Parameters { 1435 /** 1436 * Boolean indicating whether the undo for this operation should be suppressed 1437 */ 1438 public static final String SUPPRESS_UNDO = "suppress_undo"; 1439 1440 private Parameters() {} 1441 } 1442 1443 private ConversationOperations() { 1444 } 1445 } 1446 1447 /** 1448 * Methods that can be "called" using the account uri, through 1449 * {@link android.content.ContentResolver#call(Uri,String,String,Bundle)} 1450 * Note, the arg parmateter of call should be the account uri. 1451 */ 1452 public static final class AccountCallMethods { 1453 /** 1454 * Save message method. The Bundle for the call to 1455 * {@link android.content.ContentResolver#call(Uri,String,String,Bundle)} should have the 1456 * columns specified in {@link MessageColumns}, and if this is a save for an existing 1457 * message, an entry for the {@link MessageColumns#URI} should reference the existing 1458 * message 1459 * 1460 * The Bundle returned will contain the message uri in the returned bundled with the 1461 * {@link MessageColumns#URI} key. 1462 */ 1463 public static final String SAVE_MESSAGE = "save_message"; 1464 1465 /** 1466 * Send message method. The Bundle for the call to 1467 * {@link android.content.ContentResolver#call(Uri,String,String,Bundle)} should have the 1468 * columns specified in {@link MessageColumns}, and if this is a send of an existing 1469 * message, an entry for the {@link MessageColumns#URI} should reference the existing 1470 * message 1471 * 1472 * The Bundle returned will contain the message uri in the returned bundled with the 1473 * {@link MessageColumns#URI} key. 1474 */ 1475 public static final String SEND_MESSAGE = "send_message"; 1476 1477 /** 1478 * Change account method. The Bundle for the call to 1479 * {@link android.content.ContentResolver#call(Uri,String,String,Bundle)} should have the 1480 * columns specified in {@link SetCurrentAccountColumns} 1481 * 1482 * The Bundle returned will be empty. 1483 */ 1484 public static final String SET_CURRENT_ACCOUNT = "set_current_account"; 1485 1486 private AccountCallMethods() {} 1487 } 1488 1489 /** 1490 * Keys used for parameters to {@link AccountCallMethods#SEND_MESSAGE} or 1491 * {@link AccountCallMethods#SAVE_MESSAGE} methods. 1492 */ 1493 public static final class SendOrSaveMethodParamKeys { 1494 /** 1495 * Bundle key used to store any opened file descriptors. 1496 * The keys of this Bundle are the contentUri for each attachment, and the 1497 * values are {@link android.os.ParcelFileDescriptor} objects. 1498 */ 1499 public static final String OPENED_FD_MAP = "opened_fds"; 1500 1501 private SendOrSaveMethodParamKeys() {} 1502 } 1503 1504 public static final class DraftType { 1505 public static final int NOT_A_DRAFT = 0; 1506 public static final int COMPOSE = 1; 1507 public static final int REPLY = 2; 1508 public static final int REPLY_ALL = 3; 1509 public static final int FORWARD = 4; 1510 1511 private DraftType() {} 1512 } 1513 1514 /** 1515 * Class for the enum values to determine whether this 1516 * string should be displayed as a high priority warning 1517 * or a low priority warning. The current design has 1518 * high priority warnings in red while low priority warnings 1519 * are grey. 1520 */ 1521 public static final class SpamWarningLevel { 1522 public static final int NO_WARNING = 0; 1523 public static final int LOW_WARNING = 1; 1524 public static final int HIGH_WARNING = 2; 1525 1526 private SpamWarningLevel() {} 1527 } 1528 1529 /** 1530 * Class for the enum values to determine which type 1531 * of link to show in the spam warning. 1532 */ 1533 public static final class SpamWarningLinkType { 1534 public static final int NO_LINK = 0; 1535 public static final int IGNORE_WARNING = 1; 1536 public static final int REPORT_PHISHING = 2; 1537 1538 private SpamWarningLinkType() {} 1539 } 1540 1541 public static final String[] MESSAGE_PROJECTION = { 1542 BaseColumns._ID, 1543 MessageColumns.SERVER_ID, 1544 MessageColumns.URI, 1545 MessageColumns.CONVERSATION_ID, 1546 MessageColumns.SUBJECT, 1547 MessageColumns.SNIPPET, 1548 MessageColumns.FROM, 1549 MessageColumns.TO, 1550 MessageColumns.CC, 1551 MessageColumns.BCC, 1552 MessageColumns.REPLY_TO, 1553 MessageColumns.DATE_RECEIVED_MS, 1554 MessageColumns.BODY_HTML, 1555 MessageColumns.BODY_TEXT, 1556 MessageColumns.EMBEDS_EXTERNAL_RESOURCES, 1557 MessageColumns.REF_MESSAGE_ID, 1558 MessageColumns.DRAFT_TYPE, 1559 MessageColumns.APPEND_REF_MESSAGE_CONTENT, 1560 MessageColumns.HAS_ATTACHMENTS, 1561 MessageColumns.ATTACHMENT_LIST_URI, 1562 MessageColumns.ATTACHMENT_BY_CID_URI, 1563 MessageColumns.MESSAGE_FLAGS, 1564 MessageColumns.ALWAYS_SHOW_IMAGES, 1565 MessageColumns.READ, 1566 MessageColumns.SEEN, 1567 MessageColumns.STARRED, 1568 MessageColumns.QUOTE_START_POS, 1569 MessageColumns.ATTACHMENTS, 1570 MessageColumns.CUSTOM_FROM_ADDRESS, 1571 MessageColumns.MESSAGE_ACCOUNT_URI, 1572 MessageColumns.EVENT_INTENT_URI, 1573 MessageColumns.SPAM_WARNING_STRING, 1574 MessageColumns.SPAM_WARNING_LEVEL, 1575 MessageColumns.SPAM_WARNING_LINK_TYPE, 1576 MessageColumns.VIA_DOMAIN, 1577 MessageColumns.SENDING_STATE, 1578 MessageColumns.CLIPPED, 1579 MessageColumns.PERMALINK 1580 }; 1581 1582 /** Separates attachment info parts in strings in a message. */ 1583 @Deprecated 1584 public static final String MESSAGE_ATTACHMENT_INFO_SEPARATOR = "\n"; 1585 public static final String MESSAGE_LIST_TYPE = 1586 "vnd.android.cursor.dir/vnd.com.android.mail.message"; 1587 public static final String MESSAGE_TYPE = 1588 "vnd.android.cursor.item/vnd.com.android.mail.message"; 1589 1590 public static final int MESSAGE_ID_COLUMN = 0; 1591 public static final int MESSAGE_SERVER_ID_COLUMN = 1; 1592 public static final int MESSAGE_URI_COLUMN = 2; 1593 public static final int MESSAGE_CONVERSATION_URI_COLUMN = 3; 1594 public static final int MESSAGE_SUBJECT_COLUMN = 4; 1595 public static final int MESSAGE_SNIPPET_COLUMN = 5; 1596 public static final int MESSAGE_FROM_COLUMN = 6; 1597 public static final int MESSAGE_TO_COLUMN = 7; 1598 public static final int MESSAGE_CC_COLUMN = 8; 1599 public static final int MESSAGE_BCC_COLUMN = 9; 1600 public static final int MESSAGE_REPLY_TO_COLUMN = 10; 1601 public static final int MESSAGE_DATE_RECEIVED_MS_COLUMN = 11; 1602 public static final int MESSAGE_BODY_HTML_COLUMN = 12; 1603 public static final int MESSAGE_BODY_TEXT_COLUMN = 13; 1604 public static final int MESSAGE_EMBEDS_EXTERNAL_RESOURCES_COLUMN = 14; 1605 public static final int MESSAGE_REF_MESSAGE_URI_COLUMN = 15; 1606 public static final int MESSAGE_DRAFT_TYPE_COLUMN = 16; 1607 public static final int MESSAGE_APPEND_REF_MESSAGE_CONTENT_COLUMN = 17; 1608 public static final int MESSAGE_HAS_ATTACHMENTS_COLUMN = 18; 1609 public static final int MESSAGE_ATTACHMENT_LIST_URI_COLUMN = 19; 1610 public static final int MESSAGE_ATTACHMENT_BY_CID_URI_COLUMN = 20; 1611 public static final int MESSAGE_FLAGS_COLUMN = 21; 1612 public static final int MESSAGE_ALWAYS_SHOW_IMAGES_COLUMN = 22; 1613 public static final int MESSAGE_READ_COLUMN = 23; 1614 public static final int MESSAGE_SEEN_COLUMN = 24; 1615 public static final int MESSAGE_STARRED_COLUMN = 25; 1616 public static final int QUOTED_TEXT_OFFSET_COLUMN = 26; 1617 public static final int MESSAGE_ATTACHMENTS_COLUMN = 27; 1618 public static final int MESSAGE_CUSTOM_FROM_ADDRESS_COLUMN = 28; 1619 public static final int MESSAGE_ACCOUNT_URI_COLUMN = 29; 1620 public static final int MESSAGE_EVENT_INTENT_COLUMN = 30; 1621 public static final int MESSAGE_SPAM_WARNING_STRING_ID_COLUMN = 31; 1622 public static final int MESSAGE_SPAM_WARNING_LEVEL_COLUMN = 32; 1623 public static final int MESSAGE_SPAM_WARNING_LINK_TYPE_COLUMN = 33; 1624 public static final int MESSAGE_VIA_DOMAIN_COLUMN = 34; 1625 public static final int MESSAGE_SENDING_STATE_COLUMN = 35; 1626 public static final int MESSAGE_CLIPPED_COLUMN = 36; 1627 public static final int MESSAGE_PERMALINK_COLUMN = 37; 1628 1629 public static final class CursorStatus { 1630 // The cursor is actively loading more data 1631 public static final int LOADING = 1 << 0; 1632 1633 // The cursor is currently not loading more data, but more data may be available 1634 public static final int LOADED = 1 << 1; 1635 1636 // An error occured while loading data 1637 public static final int ERROR = 1 << 2; 1638 1639 // The cursor is loaded, and there will be no more data 1640 public static final int COMPLETE = 1 << 3; 1641 1642 public static boolean isWaitingForResults(int cursorStatus) { 1643 return 0 != (cursorStatus & LOADING); 1644 } 1645 } 1646 1647 1648 public static final class CursorExtraKeys { 1649 /** 1650 * This integer column contains the staus of the message cursor. The value will be 1651 * one defined in {@link CursorStatus}. 1652 */ 1653 public static final String EXTRA_STATUS = "cursor_status"; 1654 1655 /** 1656 * Used for finding the cause of an error. 1657 * TODO: define these values 1658 */ 1659 public static final String EXTRA_ERROR = "cursor_error"; 1660 1661 1662 /** 1663 * This integer column contains the total message count for this folder. 1664 */ 1665 public static final String EXTRA_TOTAL_COUNT = "cursor_total_count"; 1666 } 1667 1668 public static final class AccountCursorExtraKeys { 1669 /** 1670 * This integer column contains the staus of the account cursor. The value will be 1671 * 1 if all accounts have been fully loaded or 0 if the account list hasn't been fully 1672 * initialized 1673 */ 1674 public static final String ACCOUNTS_LOADED = "accounts_loaded"; 1675 } 1676 1677 1678 public static final class MessageFlags { 1679 public static final int REPLIED = 1 << 2; 1680 public static final int FORWARDED = 1 << 3; 1681 public static final int CALENDAR_INVITE = 1 << 4; 1682 } 1683 1684 public static final class MessageColumns { 1685 /** 1686 * This string column contains a content provider URI that points to this single message. 1687 */ 1688 public static final String URI = "messageUri"; 1689 /** 1690 * This string column contains a server-assigned ID for this message. 1691 */ 1692 public static final String SERVER_ID = "serverMessageId"; 1693 public static final String CONVERSATION_ID = "conversationId"; 1694 /** 1695 * This string column contains the subject of a message. 1696 */ 1697 public static final String SUBJECT = "subject"; 1698 /** 1699 * This string column contains a snippet of the message body. 1700 */ 1701 public static final String SNIPPET = "snippet"; 1702 /** 1703 * This string column contains the single email address (and optionally name) of the sender. 1704 */ 1705 public static final String FROM = "fromAddress"; 1706 /** 1707 * This string column contains a comma-delimited list of "To:" recipient email addresses. 1708 */ 1709 public static final String TO = "toAddresses"; 1710 /** 1711 * This string column contains a comma-delimited list of "CC:" recipient email addresses. 1712 */ 1713 public static final String CC = "ccAddresses"; 1714 /** 1715 * This string column contains a comma-delimited list of "BCC:" recipient email addresses. 1716 * This value will be null for incoming messages. 1717 */ 1718 public static final String BCC = "bccAddresses"; 1719 /** 1720 * This string column contains the single email address (and optionally name) of the 1721 * sender's reply-to address. 1722 */ 1723 public static final String REPLY_TO = "replyToAddress"; 1724 /** 1725 * This long column contains the timestamp (in millis) of receipt of the message. 1726 */ 1727 public static final String DATE_RECEIVED_MS = "dateReceivedMs"; 1728 /** 1729 * This string column contains the HTML form of the message body, if available. If not, 1730 * a provider must populate BODY_TEXT. 1731 */ 1732 public static final String BODY_HTML = "bodyHtml"; 1733 /** 1734 * This string column contains the plaintext form of the message body, if HTML is not 1735 * otherwise available. If HTML is available, this value should be left empty (null). 1736 */ 1737 public static final String BODY_TEXT = "bodyText"; 1738 public static final String EMBEDS_EXTERNAL_RESOURCES = "bodyEmbedsExternalResources"; 1739 /** 1740 * This string column contains an opaque string used by the sendMessage api. 1741 */ 1742 public static final String REF_MESSAGE_ID = "refMessageId"; 1743 /** 1744 * This integer column contains the type of this draft, or zero (0) if this message is not a 1745 * draft. See {@link DraftType} for possible values. 1746 */ 1747 public static final String DRAFT_TYPE = "draftType"; 1748 /** 1749 * This boolean column indicates whether an outgoing message should trigger special quoted 1750 * text processing upon send. The value should default to zero (0) for protocols that do 1751 * not support or require this flag, and for all incoming messages. 1752 */ 1753 public static final String APPEND_REF_MESSAGE_CONTENT = "appendRefMessageContent"; 1754 /** 1755 * This boolean column indicates whether a message has attachments. The list of attachments 1756 * can be retrieved using the URI in {@link MessageColumns#ATTACHMENT_LIST_URI}. 1757 */ 1758 public static final String HAS_ATTACHMENTS = "hasAttachments"; 1759 /** 1760 * This string column contains the content provider URI for the list of 1761 * attachments associated with this message.<br> 1762 * <br> 1763 * The resulting cursor MUST have the columns as defined in 1764 * {@link com.android.ex.photo.provider.PhotoContract.PhotoViewColumns}. 1765 */ 1766 public static final String ATTACHMENT_LIST_URI = "attachmentListUri"; 1767 /** 1768 * This string column contains the content provider URI for the details of an attachment 1769 * associated with this message. (CID to be appended at the time the URI is used) 1770 */ 1771 public static final String ATTACHMENT_BY_CID_URI = "attachmentByCidUri"; 1772 /** 1773 * This long column is a bit field of flags defined in {@link MessageFlags}. 1774 */ 1775 public static final String MESSAGE_FLAGS = "messageFlags"; 1776 /** 1777 * This integer column represents whether the user has specified that images should always 1778 * be shown. The value of "1" indicates that the user has specified that images should be 1779 * shown, while the value of "0" indicates that the user should be prompted before loading 1780 * any external images. 1781 */ 1782 public static final String ALWAYS_SHOW_IMAGES = "alwaysShowImages"; 1783 1784 /** 1785 * This boolean column indicates whether the message has been read 1786 */ 1787 public static final String READ = "read"; 1788 1789 /** 1790 * This boolean column indicates whether the message has been seen 1791 */ 1792 public static final String SEEN = "seen"; 1793 1794 /** 1795 * This boolean column indicates whether the message has been starred 1796 */ 1797 public static final String STARRED = "starred"; 1798 1799 /** 1800 * This integer column represents the offset in the message of quoted 1801 * text. If include_quoted_text is zero, the value contained in this 1802 * column is invalid. 1803 */ 1804 public static final String QUOTE_START_POS = "quotedTextStartPos"; 1805 1806 /** 1807 * This string columns contains a JSON array of serialized {@link Attachment} objects. 1808 */ 1809 public static final String ATTACHMENTS = "attachments"; 1810 public static final String CUSTOM_FROM_ADDRESS = "customFrom"; 1811 /** 1812 * Uri of the account associated with this message. Except in the case 1813 * of showing a combined view, this column is almost always empty. 1814 */ 1815 public static final String MESSAGE_ACCOUNT_URI = "messageAccountUri"; 1816 /** 1817 * Intent Uri to launch when the user wants to view an event in their calendar, or null. 1818 */ 1819 public static final String EVENT_INTENT_URI = "eventIntentUri"; 1820 /** 1821 * This string column contains the string for the spam 1822 * warning of this message, or null if there is no spam warning for the message. 1823 */ 1824 public static final String SPAM_WARNING_STRING = "spamWarningString"; 1825 /** 1826 * This integer column contains the level of spam warning of this message, 1827 * or zero (0) if this message does not have a warning level. 1828 * See {@link SpamWarningLevel} for possible values. 1829 */ 1830 public static final String SPAM_WARNING_LEVEL = "spamWarningLevel"; 1831 /** 1832 * This integer column contains the type of link for the spam warning 1833 * of this message, or zero (0) if this message does not have a link type. 1834 * See {@link SpamWarningLinkType} for possible values. 1835 */ 1836 public static final String SPAM_WARNING_LINK_TYPE = "spamWarningLinkType"; 1837 /** 1838 * This string column contains the string for the via domain 1839 * to be included if this message was sent via an alternate 1840 * domain. This column should be null if no via domain exists. 1841 */ 1842 public static final String VIA_DOMAIN = "viaDomain"; 1843 /** 1844 * This int column indicates whether the message is an outgoing message in the process 1845 * of being sent. See {@link com.android.mail.providers.UIProvider.ConversationSendingState} 1846 */ 1847 public static final String SENDING_STATE = "sendingState"; 1848 /** 1849 * This boolean column indicates whether the message body has been clipped. 1850 */ 1851 public static final String CLIPPED = "clipped"; 1852 /** 1853 * This string column contains the permalink value of the conversation 1854 * for which this message belongs or null if one does not exist. 1855 */ 1856 public static final String PERMALINK = "permalink"; 1857 1858 private MessageColumns() {} 1859 } 1860 1861 public static final class SetCurrentAccountColumns { 1862 /** 1863 * This column contains the Account object Parcelable. 1864 */ 1865 public static final String ACCOUNT = "account"; 1866 1867 private SetCurrentAccountColumns() {} 1868 } 1869 1870 /** 1871 * List of operations that can can be performed on a message. These operations are applied 1872 * with {@link ContentProvider#update(Uri, ContentValues, String, String[])} 1873 * where the message uri is specified, and the ContentValues specifies the operation to 1874 * be performed, e.g. values.put(RESPOND_COLUMN, RESPOND_ACCEPT) 1875 * <p/> 1876 * Note not all UI providers will support these operations. 1877 */ 1878 public static final class MessageOperations { 1879 /** 1880 * Respond to a calendar invitation 1881 */ 1882 public static final String RESPOND_COLUMN = "respond"; 1883 1884 public static final int RESPOND_ACCEPT = 1; 1885 public static final int RESPOND_TENTATIVE = 2; 1886 public static final int RESPOND_DECLINE = 3; 1887 1888 private MessageOperations() { 1889 } 1890 } 1891 1892 public static final String ATTACHMENT_LIST_TYPE = 1893 "vnd.android.cursor.dir/vnd.com.android.mail.attachment"; 1894 public static final String ATTACHMENT_TYPE = 1895 "vnd.android.cursor.item/vnd.com.android.mail.attachment"; 1896 1897 public static final String[] ATTACHMENT_PROJECTION = { 1898 AttachmentColumns.NAME, 1899 AttachmentColumns.SIZE, 1900 AttachmentColumns.URI, 1901 AttachmentColumns.CONTENT_TYPE, 1902 AttachmentColumns.STATE, 1903 AttachmentColumns.DESTINATION, 1904 AttachmentColumns.DOWNLOADED_SIZE, 1905 AttachmentColumns.CONTENT_URI, 1906 AttachmentColumns.THUMBNAIL_URI, 1907 AttachmentColumns.PREVIEW_INTENT_URI, 1908 AttachmentColumns.PROVIDER_DATA, 1909 AttachmentColumns.SUPPORTS_DOWNLOAD_AGAIN, 1910 AttachmentColumns.TYPE, 1911 AttachmentColumns.FLAGS, 1912 AttachmentColumns.CONTENT_ID 1913 }; 1914 public static final int ATTACHMENT_NAME_COLUMN = 0; 1915 public static final int ATTACHMENT_SIZE_COLUMN = 1; 1916 public static final int ATTACHMENT_URI_COLUMN = 2; 1917 public static final int ATTACHMENT_CONTENT_TYPE_COLUMN = 3; 1918 public static final int ATTACHMENT_STATE_COLUMN = 4; 1919 public static final int ATTACHMENT_DESTINATION_COLUMN = 5; 1920 public static final int ATTACHMENT_DOWNLOADED_SIZE_COLUMN = 6; 1921 public static final int ATTACHMENT_CONTENT_URI_COLUMN = 7; 1922 public static final int ATTACHMENT_THUMBNAIL_URI_COLUMN = 8; 1923 public static final int ATTACHMENT_PREVIEW_INTENT_COLUMN = 9; 1924 public static final int ATTACHMENT_SUPPORTS_DOWNLOAD_AGAIN_COLUMN = 10; 1925 public static final int ATTACHMENT_TYPE_COLUMN = 11; 1926 public static final int ATTACHMENT_FLAGS_COLUMN = 12; 1927 public static final int ATTACHMENT_CONTENT_ID_COLUMN = 13; 1928 1929 /** Separates attachment info parts in strings in the database. */ 1930 public static final String ATTACHMENT_INFO_SEPARATOR = "\n"; // use to join 1931 public static final Pattern ATTACHMENT_INFO_SEPARATOR_PATTERN = 1932 Pattern.compile(ATTACHMENT_INFO_SEPARATOR); // use to split 1933 public static final String ATTACHMENT_INFO_DELIMITER = "|"; // use to join 1934 // use to split 1935 public static final Pattern ATTACHMENT_INFO_DELIMITER_PATTERN = Pattern.compile("\\|"); 1936 1937 /** 1938 * Valid states for the {@link AttachmentColumns#STATE} column. 1939 * 1940 */ 1941 public static final class AttachmentState { 1942 /** 1943 * The full attachment is not present on device. When used as a command, 1944 * setting this state will tell the provider to cancel a download in 1945 * progress. 1946 * <p> 1947 * Valid next states: {@link #DOWNLOADING}, {@link #PAUSED} 1948 */ 1949 public static final int NOT_SAVED = 0; 1950 /** 1951 * The most recent attachment download attempt failed. The current UI 1952 * design does not require providers to persist this state, but 1953 * providers must return this state at least once after a download 1954 * failure occurs. This state may not be used as a command. 1955 * <p> 1956 * Valid next states: {@link #DOWNLOADING} 1957 */ 1958 public static final int FAILED = 1; 1959 /** 1960 * The attachment is currently being downloaded by the provider. 1961 * {@link AttachmentColumns#DOWNLOADED_SIZE} should reflect the current 1962 * download progress while in this state. When used as a command, 1963 * setting this state will tell the provider to initiate a download to 1964 * the accompanying destination in {@link AttachmentColumns#DESTINATION} 1965 * . 1966 * <p> 1967 * Valid next states: {@link #NOT_SAVED}, {@link #FAILED}, 1968 * {@link #SAVED} 1969 */ 1970 public static final int DOWNLOADING = 2; 1971 /** 1972 * The attachment was successfully downloaded to the destination in 1973 * {@link AttachmentColumns#DESTINATION}. If a provider later detects 1974 * that a download is missing, it should reset the state to 1975 * {@link #NOT_SAVED}. This state may not be used as a command on its 1976 * own. To move a file from cache to external, update 1977 * {@link AttachmentColumns#DESTINATION}. 1978 * <p> 1979 * Valid next states: {@link #NOT_SAVED}, {@link #PAUSED} 1980 */ 1981 public static final int SAVED = 3; 1982 /** 1983 * This is only used as a command, not as a state. The attachment is 1984 * currently being redownloaded by the provider. 1985 * {@link AttachmentColumns#DOWNLOADED_SIZE} should reflect the current 1986 * download progress while in this state. When used as a command, 1987 * setting this state will tell the provider to initiate a download to 1988 * the accompanying destination in {@link AttachmentColumns#DESTINATION} 1989 * . 1990 */ 1991 public static final int REDOWNLOADING = 4; 1992 /** 1993 * The attachment is either pending or paused in the download manager. 1994 * {@link AttachmentColumns#DOWNLOADED_SIZE} should reflect the current 1995 * download progress while in this state. This state may not be used as 1996 * a command on its own. 1997 * <p> 1998 * Valid next states: {@link #DOWNLOADING}, {@link #FAILED} 1999 */ 2000 public static final int PAUSED = 5; 2001 2002 private AttachmentState() {} 2003 } 2004 2005 public static final class AttachmentDestination { 2006 2007 /** 2008 * The attachment will be or is already saved to the app-private cache partition. 2009 */ 2010 public static final int CACHE = 0; 2011 /** 2012 * The attachment will be or is already saved to external shared device storage. 2013 * This value should be 1 since saveToSd is often used in a similar way 2014 */ 2015 public static final int EXTERNAL = 1; 2016 2017 private AttachmentDestination() {} 2018 } 2019 2020 public static final class AttachmentColumns { 2021 /** 2022 * This string column is the attachment's file name, intended for display in UI. It is not 2023 * the full path of the file. 2024 */ 2025 public static final String NAME = OpenableColumns.DISPLAY_NAME; 2026 /** 2027 * This integer column is the file size of the attachment, in bytes. 2028 */ 2029 public static final String SIZE = OpenableColumns.SIZE; 2030 /** 2031 * This column is a {@link android.net.Uri} that can be queried to 2032 * monitor download state and progress for this individual attachment 2033 * (resulting cursor has one single row for this attachment). 2034 */ 2035 public static final String URI = "uri"; 2036 /** 2037 * This string column is the MIME type of the attachment. 2038 */ 2039 public static final String CONTENT_TYPE = "contentType"; 2040 /** 2041 * This integer column is the current downloading state of the 2042 * attachment as defined in {@link AttachmentState}. 2043 * <p> 2044 * Providers must accept updates to {@link #URI} with new values of 2045 * this column to initiate or cancel downloads. 2046 */ 2047 public static final String STATE = "state"; 2048 /** 2049 * This integer column is the file destination for the current download 2050 * in progress (when {@link #STATE} is 2051 * {@link AttachmentState#DOWNLOADING}) or the resulting downloaded file 2052 * ( when {@link #STATE} is {@link AttachmentState#SAVED}), as defined 2053 * in {@link AttachmentDestination}. This value is undefined in any 2054 * other state. 2055 * <p> 2056 * Providers must accept updates to {@link #URI} with new values of 2057 * this column to move an existing downloaded file. 2058 */ 2059 public static final String DESTINATION = "destination"; 2060 /** 2061 * This integer column is the current number of bytes downloaded when 2062 * {@link #STATE} is {@link AttachmentState#DOWNLOADING}. This value is 2063 * undefined in any other state. 2064 */ 2065 public static final String DOWNLOADED_SIZE = "downloadedSize"; 2066 /** 2067 * This column is a {@link android.net.Uri} that points to the 2068 * downloaded local file when {@link #STATE} is 2069 * {@link AttachmentState#SAVED}. This value is undefined in any other 2070 * state. 2071 */ 2072 public static final String CONTENT_URI = "contentUri"; 2073 /** 2074 * This column is a {@link android.net.Uri} that points to a local 2075 * thumbnail file for the attachment. Providers that do not support 2076 * downloading attachment thumbnails may leave this null. 2077 */ 2078 public static final String THUMBNAIL_URI = "thumbnailUri"; 2079 /** 2080 * This column is an {@link android.net.Uri} used in an 2081 * {@link android.content.Intent#ACTION_VIEW} Intent to launch a preview 2082 * activity that allows the user to efficiently view an attachment 2083 * without having to first download the entire file. Providers that do 2084 * not support previewing attachments may leave this null. 2085 */ 2086 public static final String PREVIEW_INTENT_URI = "previewIntentUri"; 2087 /** 2088 * This column contains provider-specific private data as JSON string. 2089 */ 2090 public static final String PROVIDER_DATA = "providerData"; 2091 2092 /** 2093 * This column represents whether this attachment supports the ability to be downloaded 2094 * again. 2095 */ 2096 public static final String SUPPORTS_DOWNLOAD_AGAIN = "supportsDownloadAgain"; 2097 /** 2098 * This column represents the visibility type of this attachment. One of the 2099 * {@link AttachmentType} constants. 2100 */ 2101 public static final String TYPE = "type"; 2102 2103 /** 2104 * This column holds various bitwise flags for status information. 2105 */ 2106 public static final String FLAGS = "flags"; 2107 2108 /** 2109 * This column holds the RFC 2392 content id of the email part for this attachment, if 2110 * possible; otherwise it holds an identifier unique to the parent message. 2111 */ 2112 public static final String CONTENT_ID = "contentId"; 2113 2114 private AttachmentColumns() {} 2115 } 2116 2117 public static final class AttachmentContentValueKeys { 2118 public static final String RENDITION = "rendition"; 2119 public static final String ADDITIONAL_PRIORITY = "additionalPriority"; 2120 public static final String DELAY_DOWNLOAD = "delayDownload"; 2121 } 2122 2123 /** 2124 * Indicates a version of an attachment. 2125 */ 2126 public static final class AttachmentRendition { 2127 2128 /** A smaller or simpler version of the attachment, such as a scaled-down image or an HTML 2129 * version of a document. Not always available. 2130 */ 2131 public static final int SIMPLE = 0; 2132 /** 2133 * The full version of an attachment if it can be handled on the device, otherwise the 2134 * preview. 2135 */ 2136 public static final int BEST = 1; 2137 2138 private static final String SIMPLE_STRING = "SIMPLE"; 2139 private static final String BEST_STRING = "BEST"; 2140 2141 /** 2142 * Prefer renditions in this order. 2143 */ 2144 public static final int[] PREFERRED_RENDITIONS = new int[]{BEST, SIMPLE}; 2145 2146 public static int parseRendition(String rendition) { 2147 if (TextUtils.equals(rendition, SIMPLE_STRING)) { 2148 return SIMPLE; 2149 } else if (TextUtils.equals(rendition, BEST_STRING)) { 2150 return BEST; 2151 } 2152 2153 throw new IllegalArgumentException(String.format("Unknown rendition %s", rendition)); 2154 } 2155 2156 public static String toString(int rendition) { 2157 if (rendition == BEST) { 2158 return BEST_STRING; 2159 } else if (rendition == SIMPLE) { 2160 return SIMPLE_STRING; 2161 } 2162 2163 throw new IllegalArgumentException(String.format("Unknown rendition %d", rendition)); 2164 } 2165 } 2166 2167 /** 2168 * Indicates the visibility type of an attachment. 2169 */ 2170 public static final class AttachmentType { 2171 public static final int STANDARD = 0; 2172 public static final int INLINE_CURRENT_MESSAGE = 1; 2173 public static final int INLINE_QUOTED_MESSAGE = 2; 2174 } 2175 2176 public static final String[] UNDO_PROJECTION = { 2177 ConversationColumns.MESSAGE_LIST_URI 2178 }; 2179 public static final int UNDO_MESSAGE_LIST_COLUMN = 0; 2180 2181 // Parameter used to indicate the sequence number for an undoable operation 2182 public static final String SEQUENCE_QUERY_PARAMETER = "seq"; 2183 2184 /** 2185 * Parameter used to force UI notifications in an operation involving 2186 * {@link ConversationOperations#OPERATION_KEY}. 2187 */ 2188 public static final String FORCE_UI_NOTIFICATIONS_QUERY_PARAMETER = "forceUiNotifications"; 2189 2190 /** 2191 * Parameter used to allow returning hidden folders. 2192 */ 2193 public static final String ALLOW_HIDDEN_FOLDERS_QUERY_PARAM = "allowHiddenFolders"; 2194 2195 public static final String AUTO_ADVANCE_MODE_OLDER = "older"; 2196 public static final String AUTO_ADVANCE_MODE_NEWER = "newer"; 2197 public static final String AUTO_ADVANCE_MODE_LIST = "list"; 2198 2199 /** 2200 * Settings for auto advancing when the current conversation has been destroyed. 2201 */ 2202 public static final class AutoAdvance { 2203 /** No setting specified. */ 2204 public static final int UNSET = 0; 2205 /** Go to the older message (if available) */ 2206 public static final int OLDER = 1; 2207 /** Go to the newer message (if available) */ 2208 public static final int NEWER = 2; 2209 /** Go back to conversation list*/ 2210 public static final int LIST = 3; 2211 /** The default option is to go to the list */ 2212 public static final int DEFAULT = LIST; 2213 2214 /** 2215 * Gets the int value for the given auto advance setting. 2216 * 2217 * @param autoAdvanceSetting The string setting, such as "newer", "older", "list" 2218 */ 2219 public static int getAutoAdvanceInt(final String autoAdvanceSetting) { 2220 final int autoAdvance; 2221 2222 if (AUTO_ADVANCE_MODE_NEWER.equals(autoAdvanceSetting)) { 2223 autoAdvance = NEWER; 2224 } else if (AUTO_ADVANCE_MODE_OLDER.equals(autoAdvanceSetting)) { 2225 autoAdvance = OLDER; 2226 } else if (AUTO_ADVANCE_MODE_LIST.equals(autoAdvanceSetting)) { 2227 autoAdvance = LIST; 2228 } else { 2229 autoAdvance = UNSET; 2230 } 2231 2232 return autoAdvance; 2233 } 2234 2235 public static String getAutoAdvanceStr(int autoAdvance) { 2236 final String str; 2237 2238 switch (autoAdvance) { 2239 case OLDER: 2240 str = AUTO_ADVANCE_MODE_OLDER; 2241 break; 2242 case NEWER: 2243 str = AUTO_ADVANCE_MODE_NEWER; 2244 break; 2245 case LIST: 2246 str = AUTO_ADVANCE_MODE_LIST; 2247 break; 2248 default: 2249 str = "unset"; 2250 break; 2251 } 2252 2253 return str; 2254 } 2255 } 2256 2257 /** 2258 * Settings for what swipe should do. 2259 */ 2260 public static final class Swipe { 2261 /** Archive or remove label, if available. */ 2262 public static final int ARCHIVE = 0; 2263 /** Delete */ 2264 public static final int DELETE = 1; 2265 /** No swipe */ 2266 public static final int DISABLED = 2; 2267 /** Default is delete */ 2268 public static final int DEFAULT = ARCHIVE; 2269 } 2270 2271 /** 2272 * Settings for Conversation view mode. 2273 */ 2274 public static final class ConversationViewMode { 2275 /** 2276 * The user hasn't specified a mode. 2277 */ 2278 public static final int UNDEFINED = -1; 2279 /** 2280 * Default to fit the conversation to screen view 2281 */ 2282 public static final int OVERVIEW = 0; 2283 /** 2284 * Conversation text size should be the device default, and wide conversations may 2285 * require panning 2286 */ 2287 public static final int READING = 1; 2288 public static final int DEFAULT = OVERVIEW; 2289 } 2290 2291 public static final class SnapHeaderValue { 2292 public static final int ALWAYS = 0; 2293 public static final int PORTRAIT_ONLY = 1; 2294 public static final int NEVER = 2; 2295 } 2296 2297 public static final class MessageTextSize { 2298 public static final int TINY = -2; 2299 public static final int SMALL = -1; 2300 public static final int NORMAL = 0; 2301 public static final int LARGE = 1; 2302 public static final int HUGE = 2; 2303 } 2304 2305 public static final class DefaultReplyBehavior { 2306 public static final int REPLY = 0; 2307 public static final int REPLY_ALL = 1; 2308 } 2309 2310 /** 2311 * Setting for whether to show sender images in conversation list. 2312 */ 2313 public static final class ConversationListIcon { 2314 public static final int SENDER_IMAGE = 1; 2315 public static final int NONE = 2; 2316 public static final int DEFAULT = 1; // Default to show sender image 2317 } 2318 2319 /** 2320 * Action for an intent used to update/create new notifications. The mime type of this 2321 * intent should be set to the mimeType of the account that is generating this notification. 2322 * An intent of this action is required to have the following extras: 2323 * {@link UpdateNotificationExtras#EXTRA_FOLDER} {@link UpdateNotificationExtras#EXTRA_ACCOUNT} 2324 */ 2325 public static final String ACTION_UPDATE_NOTIFICATION = 2326 "com.android.mail.action.update_notification"; 2327 2328 public static final class UpdateNotificationExtras { 2329 /** 2330 * Parcelable extra containing a {@link Uri} to a {@link Folder} 2331 */ 2332 public static final String EXTRA_FOLDER = "notification_extra_folder"; 2333 2334 /** 2335 * Parcelable extra containing a {@link Uri} to an {@link Account} 2336 */ 2337 public static final String EXTRA_ACCOUNT = "notification_extra_account"; 2338 2339 /** 2340 * Integer extra containing the update unread count for the account/folder. 2341 * If this value is 0, the UI will not block the intent to allow code to clear notifications 2342 * to run. 2343 */ 2344 public static final String EXTRA_UPDATED_UNREAD_COUNT = "notification_updated_unread_count"; 2345 2346 /** 2347 * Integer extra containing the update unseen count for the account/folder. 2348 */ 2349 public static final String EXTRA_UPDATED_UNSEEN_COUNT = "notification_updated_unseen_count"; 2350 } 2351 2352 public static final class EditSettingsExtras { 2353 /** 2354 * Parcelable extra containing account for which the user wants to 2355 * modify settings 2356 */ 2357 public static final String EXTRA_ACCOUNT = "extra_account"; 2358 2359 /** 2360 * Parcelable extra containing folder for which the user wants to 2361 * modify settings 2362 */ 2363 public static final String EXTRA_FOLDER = "extra_folder"; 2364 2365 /** 2366 * Boolean extra which is set true if the user wants to "manage folders" 2367 */ 2368 public static final String EXTRA_MANAGE_FOLDERS = "extra_manage_folders"; 2369 } 2370 2371 public static final class SendFeedbackExtras { 2372 /** 2373 * Optional boolean extras which indicates that the user is reporting a problem. 2374 */ 2375 public static final String EXTRA_REPORTING_PROBLEM = "reporting_problem"; 2376 /** 2377 * Optional Parcelable extra containing the screenshot of the screen where the user 2378 * is reporting a problem. 2379 */ 2380 public static final String EXTRA_SCREEN_SHOT = "screen_shot"; 2381 } 2382 2383 public static final class ViewProxyExtras { 2384 /** 2385 * Uri extra passed to the proxy which indicates the original Uri that was intended to be 2386 * viewed. 2387 */ 2388 public static final String EXTRA_ORIGINAL_URI = "original_uri"; 2389 /** 2390 * String extra passed to the proxy which indicates the account being viewed. 2391 */ 2392 public static final String EXTRA_ACCOUNT_NAME = "account_name"; 2393 /** 2394 * String extra passed from the proxy which indicates the salt used to generate the digest. 2395 */ 2396 public static final String EXTRA_SALT = "salt"; 2397 /** 2398 * Byte[] extra passed from the proxy which indicates the digest of the salted account name. 2399 */ 2400 public static final String EXTRA_ACCOUNT_DIGEST = "digest"; 2401 } 2402} 2403