diff options
| author | Yu Ping Hu <yph@google.com> | 2013-08-01 16:19:28 -0700 |
|---|---|---|
| committer | Yu Ping Hu <yph@google.com> | 2013-08-01 16:19:28 -0700 |
| commit | eb4ee8a7aa540e77c57af1635ede7f89124f1259 (patch) | |
| tree | c45138dcc9818bf7a714ee5cbbda38ea54e574e9 /emailcommon | |
| parent | e37acba25997e931f696e5d0e1b55c6946eb5943 (diff) | |
| download | android_packages_apps_Email-eb4ee8a7aa540e77c57af1635ede7f89124f1259.tar.gz android_packages_apps_Email-eb4ee8a7aa540e77c57af1635ede7f89124f1259.tar.bz2 android_packages_apps_Email-eb4ee8a7aa540e77c57af1635ede7f89124f1259.zip | |
Move required system folder types to Mailbox.
I'm formalizing the concept of folders that must exist,
and the list of such folders should be accessible to all
sync adapters.
Change-Id: I9e4d2d51aa495d211eab2d1e36c3fa197a1ac00d
Diffstat (limited to 'emailcommon')
| -rw-r--r-- | emailcommon/src/com/android/emailcommon/provider/Mailbox.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/emailcommon/src/com/android/emailcommon/provider/Mailbox.java b/emailcommon/src/com/android/emailcommon/provider/Mailbox.java index 13b1b5dfa..4a998209b 100644 --- a/emailcommon/src/com/android/emailcommon/provider/Mailbox.java +++ b/emailcommon/src/com/android/emailcommon/provider/Mailbox.java @@ -210,6 +210,18 @@ public class Mailbox extends EmailContent implements MailboxColumns, Parcelable // A mailbox that holds Messages that are attachments public static final int TYPE_ATTACHMENT = 0x101; + /** + * For each of the following folder types, we expect there to be exactly one folder of that + * type per account. + * Each sync adapter must do the following: + * 1) On initial sync: For each type that was not found from the server, create a local folder. + * 2) On folder delete: If it's of a required type, convert it to local rather than delete. + * 3) On folder add: If it's of a required type, convert the local folder to server. + * 4) When adding a duplicate (either initial sync or folder add): Error. + */ + public static final int[] REQUIRED_FOLDER_TYPES = + { TYPE_INBOX, TYPE_DRAFTS, TYPE_OUTBOX, TYPE_SENT, TYPE_TRASH }; + // Default "touch" time for system mailboxes public static final int DRAFTS_DEFAULT_TOUCH_TIME = 2; public static final int SENT_DEFAULT_TOUCH_TIME = 1; |
