From 334d64141fa7c07a62a705364ec984b790f10e8a Mon Sep 17 00:00:00 2001 From: Daniel Applebaum Date: Wed, 31 Dec 2008 03:49:09 +0000 Subject: [PATCH] Complete merge of DAmail functionality into K9mail. Following features are added to K9mail: 1) Show unread message count on each folder 2) Sum unread count of all shown folders in an account to the account display 3) Periodically check selected folders for new mail, not just Inbox 4) Don't refresh folder when opened (unless folder is empty) 5) Show date and time of last sync for each folder 6) Fix timer for automatic periodic sync (use wakelock to assure completion) 7) Optimize local folder queries (speeds up account and folder lists) 8) Show Loading... message in status bar indicating which folder is being synced 9) Eliminate redundant sync of new messages (performance enhancement) 10) Improve notification text for multiple accounts 11) Do not automatically sync folders more often than the account-specific period 12) Use user-configured date and time formats 13) Select which folders are shown, using configurable Classes 14) Select which folders are synced, using configurable Classes 15) Added context (long press) menu to folders, to provide for Refresh and Folder Settings 16) Status light flashes purple when there are unread messages 17) Folder list more quickly eliminates display of deleted and out-of-Class folders. 18) Delete works 19) Mark all messages as read (in the folder context menu) 20) Notifications only for new unread messages 21) One minute synchronization frequency 22) Deleting an unread message decrements unread counter 23) Notifications work for POP3 accounts 24) Message deletes work for POP3 accounts 25) Explicit errors show in folder list 26) Stack traces saved to folder K9mail-errors 27) Clear pending actions (danger, for emergencies only!) 28) Delete policy in Account settings 29) DNS cache in InetAddress disabled 30) Trapped some crash-causing error conditions 31) Eliminate duplicate copies to Sent folder 32) Prevent crashes due to message listener concurrency 33) Empty Trash 34) Nuclear "Mark all messages as read" (marks all messages as read in server-side folder, irrespective of which messages have been downloaded) 35) Forward (alternate) to allow forwarding email through other programs 36) Accept text/plain Intents to allow other programs to send email through K9mail 37) Displays Outbox sending status 38) Manual retry of outbox sending when "Refresh"ing Outbox 39) Folder error status is persisted 40) Ability to log to arbitrary file Fixes K9 issues 11, 23, 24, 65, 69, 71, 79, 81, 82, 83, 87, 101, 104, 107, 120, 148, 154 --- AndroidManifest.xml | 16 +- res/layout-land/message_view.xml | 12 +- res/layout/account_setup_options.xml | 5 - res/layout/folder_message_list_group.xml | 8 +- res/menu/accounts_context.xml | 4 + res/menu/folder_context.xml | 22 + res/menu/folder_message_list_context.xml | 4 + res/menu/folder_message_list_option.xml | 6 + res/menu/message_view_option.xml | 6 + res/values/arrays.xml | 67 + res/values/strings.xml | 65 +- res/xml/account_settings_preferences.xml | 58 +- res/xml/folder_settings_preferences.xml | 39 + src/com/android/email/Account.java | 126 +- src/com/android/email/Email.java | 24 +- .../android/email/MessagingController.java | 1148 ++++++++++--- src/com/android/email/MessagingListener.java | 12 +- src/com/android/email/Preferences.java | 2 +- src/com/android/email/activity/Accounts.java | 28 +- .../email/activity/FolderMessageList.java | 1427 +++++++++++------ .../email/activity/MessageCompose.java | 13 +- .../android/email/activity/MessageView.java | 94 +- .../email/activity/setup/AccountSettings.java | 55 +- .../activity/setup/AccountSetupIncoming.java | 20 +- .../activity/setup/AccountSetupOptions.java | 6 +- .../email/activity/setup/FolderSettings.java | 136 ++ src/com/android/email/mail/Flag.java | 9 + src/com/android/email/mail/Folder.java | 52 +- src/com/android/email/mail/Message.java | 2 + .../android/email/mail/store/ImapStore.java | 193 ++- .../android/email/mail/store/LocalStore.java | 298 +++- .../android/email/mail/store/Pop3Store.java | 63 +- .../email/mail/transport/SmtpTransport.java | 4 + .../android/email/service/BootReceiver.java | 6 +- .../android/email/service/MailService.java | 205 ++- 35 files changed, 3328 insertions(+), 907 deletions(-) create mode 100644 res/menu/folder_context.xml create mode 100644 res/xml/folder_settings_preferences.xml create mode 100644 src/com/android/email/activity/setup/FolderSettings.java diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 6a9ea5988..18bdc36af 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -8,7 +8,7 @@ - + + + + + + + + + + @@ -110,7 +122,7 @@ diff --git a/res/layout-land/message_view.xml b/res/layout-land/message_view.xml index 63fcefa44..d454693a2 100644 --- a/res/layout-land/message_view.xml +++ b/res/layout-land/message_view.xml @@ -33,17 +33,17 @@ android:layout_height="wrap_content" android:layout_width="0dip" android:layout_weight="1" /> -