Issue 252
394: Replace code change lost with move of DAmail MailService.java to
K-9. Eliminate the stopSelfs. Without the stopSelfs, the Service
remains active and the Android platform is far less likely to kill the
process, although not absolutely forbidden from doing so. Better will
be to implement the full BroadcastReceiver methodology referred to in
Issue 394, which would allow replacing the stopSelfs, which would make
K-9 a better good citizen.
252: Fix logic for raising and canceling notifications based on number
of new unread messages and total unread messages.
Issue 201
Issue 224
Issue 342
Handle untagged EXISTS messages at any time. Should increase
synchronization speed and accuracy.
Handle IMAP servers that send a NIL where a literal is normally.
Avoids failure to sync when folder contains certain messages.
Throw Exception if folder message count is less than 0, avoiding
accidentally emptying a folder.
Issue 192
Do not remove markers for deleted messages, even if the corresponding
remote message is not returned by the remote store. The remote
message may not be returned simply because the query did not encompass
it on this run. If the account's delete policy is set to "Do not
delete from server", or the delete hasn't succeeded before a folder
refresh, a message for which the deleted marker has been removed can
errorneously reappear.
This will lead to the local store eventually having a large number of
deleted message markers. In the long term, we'll need a way to manage
and possibly automatically remove them.
Merged from branch issue143 @ revision 426:
Complete replacement for SharedPreferences. Uses SQLite database
stored in application's databases folder.
Will load from legacy preferences if DB-backed preferences are empty.
Editor conforms to atomic commit contract.
Hardening of POP3 and SMTP communication:
SMTP: Decrement failure counter when no possible message send
occurred. This way, K-9 will only stop attempting to send messages
for which a possible successful send occurred, but K-9 could not
detect. Any message that is known to have completely failed to send
will be reattempted indefinitely.
POP3: Some reworking of Exception handling. Also, if it is not
possible to get a "message number" for the UID of the message that is
being deleted, conclude that the message has already been deleted on
the server. Mark this as a permanent error, so that it gets removed
from the pending actions queue.
MessagingController: Look for the permanentFailure flag on the
MessagingException, and if a pending action raised a permanent
failure, remove the pending action from the queue so that it will not
be re-attempted nor block later requests.
Significant hardening of the email sending process.
A given message in the Outbox is only attempted to be sent 5 times.
Once the threshold is reached, the message is flagged. asses through
the Outbox skip flagged messages. The message can be tried again by
manually unflagging. When any messages are flagged during a pass
through the Outbox, K-9 raises a notification with a fast flashing red
LED, alerting the user to the failure to send. A note is also placed
in the K9mail-errors.
The read timeout on SMTP connections has been changed to 300000ms (5
minutes)
The send attempt counter is kept in memory, not stored with the
message, so a phone or application restart will clear the counters,
but not the flagged state. As the intent of this revision is to avoid
runaway message sending, this is deemed to be acceptable for now.
The moving of messages from the Outbox to the Sent folder has been
changed to an atomic move.
Extra error checking has been added to the SMTP communication code.
The flashing LED may be excessive.
Provide preference for which folder is automatically expanded when
entering the Folder/Message list.
Can be set to -NONE-, so that no folder is automatically expanded.
Defaults to Inbox, which is like the default behavior of the core
Android Email.
Fails to move the automatically opened folder to the top of the
screen. This needs more work.
The already selected folder should be highlighted (or otherwise
indicated) in the ChooseFolder Activity. This needs more work.
Accounts: Option menu->Check mail = check mail in all
folders of all accounts
Accounts: Context (long-press on account) menu->Check mail = check mail
in all folders of this account
Folder/Message List: Option menu->Check mail = check mail in all
folders of this account
Folder/Message List: Contet (long-press on folder) menu->Check mail = check mail in this
folder*
*All "Check mail" options, except for the long-press on an individual
folder, respect the normal synchronization class settings.
Eliminate all Refresh menu items.
Add progress indicators to Accounts activity. Indeterminite progress
indicator while email checking is in progress. Determinite progress
indicator while fetching unread counts.
dumbfile on Feb 28, 2009.
One change of my own, putting the actual folders name outside the
parentheses, and the functional/special name inside the parentheses.
Copy now copied body (but attachments might not work right).
Move is now reliable (needed to open the destination folder), and
leaves a placeHolder message behind in the source folder so that
messages are not resynced.
3.
Each remote Store (IMAP, POP3, WebDAV) can provide indications to the
higher level classes as to whether copy and move are implemented.
Currently, copy and move are only provided by ImapStore.java. When
the facilities are not available, the user interface suppresses the
menu options.
The available destination folders can be configured using folder
classes.
Copy results in null message bodies in the destination copy of the
message until the next sync. This is a problem that occurred with
deletes previously, and is likely a fault with the copyMessages method
of LocalStore.java.
Utilizes a modified version of the ChooseFolder.java Activity that
debuachedsloth contributed in a patch attached to Issue 285 on 16 Feb
2008.
All messages in all folders that were sent from the email address
associated with the account display the recipient, preceeded by To:,
instead of the sender.
Puts quotes around username and password for IMAP authentication.
Also, if authentication fails, closes the connection so that it will
be retried. Otherwise, there is no way to fix the problem, say, by
changing the password in the Incoming Settings.
ConcurrentHashMap seems to serialize as a HashMap. Not sure why or
how.
This change has re-enabled the saving of the unread counts during an
orientation change, giving somewhat fast response. If it fails again,
just comment out the block of code.
Provide two options for each Account:
Compact (which VACUUMs the accounts and prunes recreatable
attachments)
Clear all data (danger!) (which wipes all messages and attachments in
the account, except placeholder deleted messages)
Displays a Toast when the Compact or Clear is queued, and another
Toast with the shrinkage results.
(Also, a small change to increase probability of seeing messages after
a sync, by setting the needsRefresh on all folders when a sync is done.)
orientation change (onResume) until I figure out the
ClassCastException
Will slow down display of unread message counts, but they will show up
after a slight delay.
thread.
Push unread message counting into the background.
Should increase startup performance and reduce black-screens-of-death
that some Market "commentators" report.
Also, updates the per-account unread message count when email account
is finished synchronizing.
Note: Notifications are displayed after all accounts are sync'ed but are delayed to be 1sec. apart
TODO: Display notifications at the end of each individual sync
folders are sorted first by subject, then by date. Subject sorting is
case insensitive and disregards leading re:, fw: and fwd: prefixes.
Threading can be toggled via the T hotkey or the option menu.
The icons could use improvement.
Threading state is maintained during a run of K-9, among all
accounts.
Re-enable instant deletes in MessageView
Deleted message suppression should be generalized into a flag cache,
serving Seen, Flagged, and Answered flags, as well.
Copy message to Trash still needs work, so that no duplicates are ever
visible and server-sync is more clean. This will be especially
important, as the same code will be needed for the future "message
copy/move" facility.
Account settings) for scrolling the navigation buttons with the
message, or keeping the buttons on screen. Scrolling mode can be
automatically switched based on availability of keyboard. (Issue 197
and Issue 194)
Add ability to flag/unflag message from options menu
1) Eliminate the top row Next Message and Previous Message
2) In the bottom buttons for portrait mode, replace Reply and Forward
with Prev and Next
Justification: if you're going to be replying or forwarding, you're
about to embark on a lot of typing, anyway. Having to hit Menu
isn't an undue burden.
3) Prev goes to the adjacent *older* message, next goes to the
adjacent *newer* message
4) In the bottom buttons for landscape mode, added Prev and Next as the
outer buttons
5) Add Account option for hiding the bottom buttons when the keyboard
is available.
Also, temporarily (hopefully!) reverted the instant delete from the
MessageView because it isn't working right. The method here is slower
but safer.
date/time formats. With this change, K-9 can run on original master
or cupcake versions for the platform.
This seems like an excessive amount of code. Perhaps there is a
public API that accomplishes this work. Alternatively, the code in
MessageView.java and FolderMessageList.java should be consolidated
into a utility class used by both of the classes needing this
functionality.
Patches were handling uppercase MIME types were submitted by gwillen
in K-9 issue 94 (MimeBodyPart.java and MimeMessage.java)
and
Josh Guilfoyle as part of Android patch 1539 (MimeUtility.java)
Sorry for missing the attribution on the original commit
a red/bold subject. Can be done in the FolderMessageList using the
hotkey G (toggle) or by long-pressing the message to bring up the
message context menu. Can be done while viewing an individual message
by using the hotkey G (toggle). To-do: add a Flag/Unflag option to a
menu in the individual message view.
Add sending the Answered flag to the IMAP server when replying to a
message. This is currently done as soon as the reply is started.
Perhaps it would be better to wait until the reply is sent, but that
would require keeping additional state with the draft. Messages to
which the user has replied are indicated with a white arrow next to
the subject.
To-do: In the MessageView, provide visual indication of Flagged and
Answered states.
approach should guarantee that the syncing never stalls just because a
single attempt exceeds the (currently 10 minute) WakeLock timeout. At
the sync frequency, K-9 will wakeup again and refresh the WakeLock for
another go at syncing. This should make synchronization much more
reliable in the face of slow or unavailable connections, in particular
ones which hit the socket read timeouts.
Also, fixed the audible notifications so that the ringtone selected
is always for one of the accounts with new unread mail.
Developers now have the option to turn on a fast-flashing LED during
synchronization in order to observe whether synchronization is
happening while the handset is apparently asleep. I think this option
would be aggravating to non-developer users. See
Email.NOTIFICATION_LED_WHILE_SYNCING
Issue 175
Issue 170
folders
Automatically clean up deleted messages in Outbox (make deleted
messages destroyed); don't try to send deleted messages, destroy
messages in outbox when deleting. (Yep, the first and third items are
redundant, but will automatically clean up damaged outboxes)
Added support for default mailbox path setting if we can't automatically determine what it is.
Fixed a bug exposed by changes relating to a fix for non-relative email paths being returned.
to send the proper delete requests (delete, mark read, nothing).
Otherwise, this code will delete on the server any message deleted on
the handset, no matter option the user selects.
MessageView
Deleting a message in Trash deletes it for real (permanently)
All message operations are allowed on messages in the Outbox. Special
handling for deleting, so that the message is copied to Trash, then
copied asynchronously to the remote Trash.
Add some more items to the hotkey help
Fixed "loading more messages" to use the cleaner String.format way of doing things, and changed the corresponding entries in strings.xml.
Deleted the now-unused build_number.xml file.
Accounts are now set:
Folder display mode = All except 2nd Class
Folder sync mode = Only 1st Class
Only the Inbox is set for:
Folder sync class = 1st Class
All other folders have class set to None for sync and display
Also restored an optimization on opening local folders that I
removed. It is now optimistic, and in the normal case does not have
to make an explicit existence check
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
r55941@173-101-60-247 (orig r204): jessev | 2008-12-16 14:58:33 -0800
r55942@173-101-60-247 (orig r205): jessev | 2008-12-16 15:07:33 -0800
* step 1 of rename
r55943@173-101-60-247 (orig r206): jessev | 2008-12-16 15:08:52 -0800
step 2 of rename
r55944@173-101-60-247 (orig r207): jessev | 2008-12-16 15:09:23 -0800
oops
r55945@173-101-60-247 (orig r208): jessev | 2008-12-16 15:34:01 -0800
* Even more progressive rename/unfork work
r55947@173-101-60-247 (orig r210): jessev | 2008-12-16 16:16:43 -0800
* Doesn't work, but close to what danapple has recommended
r56039@173-101-60-247 (orig r213): young.bradley | 2008-12-18 16:14:49 -0800
This is a working semi-deforked application. i.e. most of it is still in the com.android.email namespace, but choice bits are in com.fsck.k9 so that it won't try to overwrite the builtin client.
Changes: corrected the package (or something equally simple for K9.java
build.xml has an additional stanza that copies the R.java file from fsck to android namespace, and changes the package inside the file.
AndroidManifest.xml has the package set to fsck, and all the activities are now explicity named.
r56040@173-101-60-247 (orig r214): jessev | 2008-12-18 16:20:56 -0800
* merged from trunk as of r213
Changes: corrected the package (or something equally simple for K9.java
build.xml has an additional stanza that copies the R.java file from fsck to android namespace, and changes the package inside the file.
AndroidManifest.xml has the package set to fsck, and all the activities are now explicity named.
r51837@31b (orig r127): ismarc31 | 2008-11-10 19:10:50 -0500
Experimental branch for Exchange WebDAV support
r51838@31b (orig r128): ismarc31 | 2008-11-10 19:24:52 -0500
Initial proof-of-concept code for WebDav support
r51839@31b (orig r129): ismarc31 | 2008-11-10 22:02:37 -0500
Fixed a couple of migration issues and enabled WebDav as a mail type
r53269@31b (orig r132): ismarc31 | 2008-11-21 21:55:55 -0500
Mostly rewritten class and organization. Better implementation of message fetching.
Consolidated response parsing. Removed a large number of redundant calls. There is still
some unused functions needing cleaning up, and some unimplemented actions
r53338@31b (orig r133): ismarc31 | 2008-11-22 16:50:02 -0500
Removed more redundant and unused calls. Implemented checking read status
r53453@31b (orig r134): ismarc31 | 2008-11-24 20:13:24 -0500
Added support for marking messages as read.
r53454@31b (orig r135): ismarc31 | 2008-11-24 22:04:04 -0500
Added support for deleting messages server side
r53455@31b (orig r136): ismarc31 | 2008-11-25 01:32:19 -0500
Improved flag setting functionality, do bulk HTTP request instead of lots of little ones
r53589@31b (orig r138): young.bradley | 2008-11-29 16:18:25 -0500
Missing some ports (webDavPorts); this causes an array index out of bounds exception when anything other than "None" or "SSL (Optional)" are selected.
Adding the three additional ports solves this issue.
r53590@31b (orig r139): young.bradley | 2008-11-30 00:47:42 -0500
Initial support for sending via WebDav
r53591@31b (orig r140): ismarc31 | 2008-11-30 20:12:41 -0500
Fix for display names being URL Encoded for folders. Initial support of Uid Hashmaps instead
of plain arrays.
r53592@31b (orig r141): ismarc31 | 2008-11-30 21:46:06 -0500
Fix to constructor of HttpGeneric(final String uri). URLs returned from Exchange aren't
always fully encoded, this fixes the encoding before creating the method.
r53593@31b (orig r142): ismarc31 | 2008-12-01 02:22:16 -0500
Completed support for using hashmaps instead of arrays for indexing urls to emails and read
status. Delete is safe again and read status is correct the first time through.
r53594@31b (orig r143): ismarc31 | 2008-12-01 22:20:50 -0500
Fix for double-Inbox display issue. Removed volumous amounts of Log.d messages.
r53644@31b (orig r157): young.bradley | 2008-12-04 15:14:28 -0500
Fix for wildcard certificates (e.g. issued to *.example.com). Only checking the
trust of the certificate itself, since apparently the full chain causes it to
not work.
r53765@31b (orig r161): ismarc31 | 2008-12-06 18:55:08 -0500
Implemented new functionality for pulling message envelope. Uses a WebDAV call for all messages rather than parsing the stream. Message size is properly set now as well.
r54055@31b (orig r163): jessev | 2008-12-06 19:28:24 -0500
* merge fixes
Now pulls k9.VISIBLE_LIMIT_INCREMENT and says "Load up to (increment value) more".
Also, the build number was auto-updated by my build script. This shows up in the debug menu. It would be nice to have ant handle this, but I'm not sure how to make it do that.
Believe this fixes the IMAP prefix issue (27)
Trash still deletes itself, which is technically a separate issue, but now it deletes the *right* trash. :)
Create local branch for IMAP prefix fix (Issue 27)
r110@stilgar: brock | 2008-11-03 00:08:29 -0500
Fixed IMAP prefix problem.
Based on this comment in MIME4J, this seems like a win:
* Utility class for working with character sets. It is somewhat similar to
* the Java 1.4 <code>java.nio.charset.Charset</code> class but knows many
* more aliases and is compatible with Java 1.3. It will use a simple detection
* mechanism to detect what character sets the current VM supports. This will
* be a sub-set of the character sets listed in the
* <a href="http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html">
* Java 1.5 (J2SE5.0) Supported Encodings</a> document.
* <p>
* The <a href="http://www.iana.org/assignments/character-sets">
* IANA Character Sets</a> document has been used to determine the preferred
* MIME character set names and to get a list of known aliases.
* <p>