Jesse Vincent
3d583da450
ant astyle
2011-06-01 16:03:56 -04:00
cketti
30d31c7074
Explicitly use Locale.US when dealing with dates in message headers
2011-05-26 04:32:26 +02:00
Jesse Vincent
29117ae7a6
Switch a StringBuffer to StringBuilder, which replaced it
2011-05-24 21:21:03 -04:00
Koji Arai
b4f3712246
Should retrieve just visibleLimit messages when the local folder is cleared.
2011-05-25 00:37:51 +09:00
Koji Arai
cb46f170cd
Should reset visibleLimit on clear messages.
2011-05-25 00:37:49 +09:00
Koji Arai
a4f7288d37
Avoid NullPointerException.
...
The name parameter in Content-Type may be not set.
2011-05-25 00:37:46 +09:00
cketti
8fc714ac4a
Don't show "null" for partially downloaded messages with empty text body
2011-05-16 00:36:46 +02:00
cketti
41b039b691
Fix bug introduced with commit b7a6dbd973
...
Fixes issue 3297
2011-05-15 16:23:53 +02:00
cketti
95288b37d7
Removed unnecessary method implementation
...
Make Pop3Folder.setFlags(Flag[],boolean) throw an
UnsupportedOperationException instead of calling a method that does
just that.
2011-05-14 23:46:26 +02:00
cketti
dc96bf3186
Only mark all messages as read on the server if that's supported
...
This change prevents K-9 Mail from establishing a connection to the
server when all messages are marked as read on a POP3 account.
2011-05-14 23:30:47 +02:00
cketti
ba9bc2f8e9
Added method Folder.isFlagSupported(Flag)
2011-05-14 23:19:24 +02:00
cketti
86fca9c1f2
POP3: Check for support of the TOP command (if CAPA isn't supported)
...
This will allow to download partial messages if the server doesn't
support the CAPA command but supports the TOP command (e.g. Hotmail).
Fixes issue 2042
2011-05-14 21:40:21 +02:00
cketti
8e1c4acef9
Get rid of constant K9.OUTBOX
...
Use Account.getOutboxFolderName() instead (still hardcoded, though)
2011-05-08 02:22:38 +02:00
cketti
92ea452163
Restore hardcoded Outbox
2011-05-07 23:57:47 +02:00
cketti
33c0bf9e31
Avoid NullPointerException for messages with html_content = NULL in DB
...
Fixes issue 3302
2011-05-06 20:02:55 +02:00
Jesse Vincent
8a907f9be7
remove a pointless extra assignment
2011-05-05 12:47:57 -04:00
Jesse Vincent
196a9c167d
comment some preview regexes
2011-05-05 12:47:39 -04:00
cketti
b7a6dbd973
Skip IMAP folders with names that are not correctly encoded.
...
Configure the CharsetDecoder to throw an exception if malformed input
is encountered. Not doing this can cause an endless loop that
allocates memory until the application dies with an OutOfMemory error.
Until we have support for both a folder display name and a raw folder
name we simply ignore folders with names that aren't correctly encoded
with the modified UTF-7 variant.
Fixes issue 3268
Credits: Bernhard Redl (aatdark) analysed the problem and wrote the
initial version of the fix.
2011-04-28 04:46:01 +02:00
cketti
4b2fe6efab
Removed unused imports
2011-04-21 00:00:16 +02:00
cketti
49308922d9
Refactored code to calculate number of unread messages some more
2011-04-20 23:58:10 +02:00
Bernhard Redl
92f7c3a19f
Refactored the code to calculate the number of unread messages in an account
2011-04-20 23:35:02 +10:00
Bernhard Redl
415c11d712
"When calculating the number of unread messages shown in the account list, INBOX now is always counted, even if a "special" folder has been set to INBOX (issue 3074)
2011-04-20 23:09:02 +10:00
Jesse Vincent
d3848d352d
astyle
2011-04-12 22:17:22 +10:00
bitblaster
d2c56edbd2
Restored original imports, added comments, changed method createFolder
2011-04-12 22:17:11 +10:00
bitblaster
0a5d7ba953
In getPersonalNameSpaces now we ask the server for the real folder names corresponding to the special folders ids (for which we have constants), so we can map the account folders using the real names.
2011-04-12 22:17:11 +10:00
bitblaster
c46372b58c
Replaced references to K9.INBOX with account.getInboxFolderName()
2011-04-12 22:17:11 +10:00
bitblaster
59b1d57658
Replaced references to K9.INBOX with account.getInboxFolderName()
2011-04-12 22:17:11 +10:00
bitblaster
20a9043a13
Replaced references to K9.INBOX with account.getInboxFolderName()
2011-04-12 22:17:11 +10:00
Jesse Vincent
0174988d27
astyle
2011-04-12 22:16:22 +10:00
Sander Bogaert
c283449d04
Added another badDateTimeFormat to ImapResponseParser.
...
Some IMAP servers generate timestamps without timezones. :/
Fixes gcode issue 3179
2011-04-12 21:34:22 +10:00
cketti
939660faf4
Quote CID before using it in a regular expression
...
Fixes issue 3227
2011-04-10 20:39:40 +02:00
Koji Arai
2cd178e684
Fixed NullPointerException
2011-04-10 01:10:25 +09:00
Koji Arai
79a96952f2
Correct encoding and decoding for the filename parameter in the Content-Disposition.
2011-04-08 00:58:53 +09:00
cketti
2cadff74b1
Extracted CRAM-MD5 computation into separate class.
...
This gets rid of duplicated code in ImapStore, Pop3Store, and
SmtpTransport.
2011-04-07 17:11:32 +02:00
Will Hawkins
d881832eca
Made the minor modifications to support CRAM-MD5 authentication
...
in POP3 accounts.
2011-04-06 11:42:37 -04:00
Koji Arai
37303d69d8
Should store the disposition-type without Content-Disposition parameters.
2011-04-04 00:58:59 +09:00
Jesse Vincent
39e3aecf73
Unify two IMAP date parsing paths, improving the exception so we can
...
learn what date format we don't cope with.
2011-04-03 14:56:12 +10:00
cketti
29c42eb1a3
More structure for the XML export (folder settings)
2011-03-30 04:57:05 +02:00
Jesse Vincent
97ec38d03f
Move our IMAP Store to using a message's sizing method
2011-03-27 23:09:41 +08:00
cketti
26258d7666
Removed unused imports
2011-03-26 06:43:39 +01:00
cketti
c9510f8f16
Merge branch 'mime_type_rewriting'
2011-03-25 01:31:27 +01:00
cketti
7c5c29e87e
Move MIME type fixing to AttachmentProvider
2011-03-24 23:07:46 +01:00
Apoorv Khatreja
168f6277da
Mime type rewriting must be done only when an attachment is viewed. Therefore, removed conflicting references to rewriting code from LocalStore.
2011-03-25 05:46:11 +08:00
Apoorv Khatreja
80d99baf29
Implemented table lookup for mime type replacement (issue 873 and similar), added javadocs, moved to MimeUtility.java.
2011-03-25 05:46:11 +08:00
cketti
83451cff10
Merge branch 'remove_non_api_dependencies'
2011-03-24 19:35:12 +01:00
cketti
330737c4c6
Fix length-check of BODYSTRUCTURE reply
...
Fixes issue 3116
2011-03-15 08:34:38 +01:00
cketti
a753f1ce5c
Removed unused import
2011-03-14 00:35:03 +01:00
danapple
a8440032e9
Fixes Issue 3102 in cooperation with vincent...@gmail.com
...
Reset service enablement and MailService scheduling whenever a storage
medium is mounted or unmounted.
2011-03-12 12:27:11 -06:00
danapple
7891b24c31
Fixes Issue 3102 in cooperation with vincent...@gmail.com
...
Reset service enablement and MailService scheduling whenever a storage
medium is mounted or unmounted.
2011-03-09 23:04:05 -06:00
cketti
171711fa9c
Remove trailing space from IMAP command
...
This could be the cause of the error reported in issue 3089.
2011-03-04 03:36:52 +01:00
cketti
6f90d791b5
Removed dependency on (external) commons-codec and commons-logging
2011-02-26 17:36:18 +01:00
cketti
397d01d513
Fix bug with partitioning of IMAP FETCH commands
2011-02-21 21:07:56 +01:00
Matt Johnston
d43f17ab94
Use java.util.zip for inflating
...
Can't use it for deflating since it doesn't have Z_PARTIAL_FLUSH
2011-02-21 04:57:46 +08:00
cketti
737cff0612
Hardcode folder name for (local) outbox and don't show outbox when
...
only being allowed to select remote folders.
2011-02-20 04:47:28 +01:00
Jan Berkel
a7a690e6ff
Simplify getTextForDisplay() and fix a potential ClassCastException
2011-02-19 15:25:09 -05:00
wongk
5c6e86006d
Support non-English Exchange installations.
2011-02-15 19:05:08 -05:00
Jesse Vincent
7cbbd72fac
Astyle
2011-02-13 21:20:21 -05:00
unknown
42edb24c4b
Merge branch 'master' of https://github.com/k9mail/k-9
2011-02-12 16:24:56 -05:00
unknown
9d0201edae
Correctly verify when the user is authenticated or not. Handle "quasi-absolute" form targets during authentication.
2011-02-12 16:10:12 -05:00
Matt Johnston
ae2c933181
Destroy all messages in one sqlite transaction
2011-02-11 15:30:50 -05:00
Jesse Vincent
7cd99bdfd2
When some message has an Application/octet-stream .jpg attachment, be a
...
bit more lenient and treat it as application/octet-stream, so we can
look up the content type by file extension
2011-02-07 20:34:08 -05:00
Jesse Vincent
12d1097a24
Big, scary massive "ant astyle" to get us back to something
...
approximating AOSP coding standards.
2011-02-06 17:09:48 -05:00
cketti
d2561f19af
Removed unused imports
...
git-svn-id: https://k9mail.googlecode.com/svn/k9mail/trunk@3270 9a7fa126-a48b-11dd-a887-7ffe1a420f8d
2011-02-04 23:19:07 -05:00
Dan Applebaum
40bdf99925
Fixes Issue 2934 Fixes Issue 2935
...
Provides for storing Folder Settings in the central Preferences
Storage as a back-up to the settings stored on each folder. In this
way, even if the LocalStore DB is recreated or otherwise lost, Folder
Settings can be recovered.
1) Does not change the methodology used to read settings while
running, nor the changes in r3107 & r3116 which tremendously improve
Accounts list loading time.
2) Loads Folder Settings from Preferences and stores on the folder
only when creating a new LocalFolder
3) Saves Folder Settings to Preferences and the DB row every time the
Folder Settings are changed.
4) When upgrading from DB version 41 to 42 or later, copies all
settings for existing folders from the DB storage to the Preferences
Storage.
5) Transactional bulk folder creation and single pass local folder
existence check during "Refresh folders" operation drastically reduces
time spent when refreshing folders from the remote store.
6) Uses prepared statement during Editor commit to reduce Preference
storing time.
Probably needs a reversion of r3239, but I'm unfamiliar with
translations, so am leaving that to others' discretion.
2011-02-04 23:19:06 -05:00
Kris Wong
9e5435a5f3
Fix the ability to accept invalid SSL certificates for exchange support.
2011-02-01 13:15:54 +00:00
Jesse Vincent
3d090e9626
astyle
2011-01-31 23:45:23 +00:00
Jesse Vincent
6550151684
Add serialVersionUID to Serializable classes to make eclipse happy
2011-01-31 23:45:14 +00:00
Jesse Vincent
4d5381f33d
Turns out to be some code which tries to be clever about removing the
...
multipart envelope in LocalStore.java. It is thrown away if there is
just one item in the multipart. This breaks the display of attachment
only message, since the attachment is no longer detected by the code
which creates the view. I made a fix (see patch below) which checks if
the single item in the multipart is not a attachment.
-- patch from wernermann29 at googlemail.com
2011-01-31 01:54:27 +00:00
Jesse Vincent
04e4dcb187
code reindenting
2011-01-24 03:27:26 +00:00
Jesse Vincent
59b3c1ba89
Extract out the list of folder columns
2011-01-24 03:27:19 +00:00
Jesse Vincent
22f422ea29
Use a heuristic to try to avoid notifying POP3 users about older mail
...
messages
2011-01-24 03:27:14 +00:00
Jesse Vincent
7858f72c53
Remove commented out code. that's what a version control system is for
2011-01-24 03:27:08 +00:00
Jesse Vincent
3444bb4134
Remove some duplicate code in the pop3 implementation
2011-01-24 03:26:57 +00:00
Jesse Vincent
24d03ce662
Deal with potential NPEs if folders aren't set up, as happens on new
...
accounts
2011-01-23 02:26:14 +00:00
cketti
bcb1131cb5
Don't rely on FolderClass implementation details outside of FolderClass
2011-01-19 01:50:28 +00:00
cketti
22834d6998
Removed unnecessary null pointer checks
2011-01-19 01:30:13 +00:00
cketti
7119c7165f
Removed unnecessary type casts
2011-01-19 01:21:27 +00:00
cketti
72d2d24cec
Fixed potential null pointer access
2011-01-19 00:13:58 +00:00
cketti
8279092070
Fixed lots of warnings (unused imports/variables, missing annotations, etc.)
2011-01-18 23:54:49 +00:00
Jesse Vincent
951dbcbd33
Set up some reasonableish defaults when creating folders
2011-01-18 00:04:24 +00:00
Jesse Vincent
65e89afc40
remove a duplicate codepath for folder insert
2011-01-18 00:04:17 +00:00
Marcus Wolschon
30767c3bd9
Fixed NullPointerExceptions
2011-01-17 10:28:58 +00:00
Jesse Vincent
6504d592ea
Try harder not to use "special folders" as count sources
2011-01-17 04:06:34 +00:00
Jesse Vincent
890564b926
Missed a case for stats computation
2011-01-17 03:22:30 +00:00
Jesse Vincent
30fed01784
Replace the expensive part of Account.getStats() that loaded all folders
...
and iterated through them with a SQL query.
2011-01-16 21:33:58 +00:00
Jesse Vincent
76e1165fea
we no longer need the special version of getDisplayClass
2011-01-16 21:33:39 +00:00
Jesse Vincent
5fb8b7c7e5
only do one preferences update per account when upgrading. Big perf
...
boost
2011-01-16 04:23:12 +00:00
Jesse Vincent
38ba071172
astyle
2011-01-16 04:23:08 +00:00
Jesse Vincent
4d0f489ab4
Initial implementation of folder attributes on the folder, rather than in preferences
2011-01-16 04:23:03 +00:00
Jesse Vincent
cafa08fc6a
generalize some repeated code
2011-01-16 04:22:59 +00:00
Jesse Vincent
ab5c7ea6ff
Refactoring of emoji transcoding code into the htmlconverter class
2011-01-15 15:25:48 +00:00
Jesse Vincent
4dcf32d2a9
Call the routine to convert emoji to images only when a message actually contains emoji.
...
This is to solve the performance issue repoted by jesse in Issue 2657.
Signed-off-by: HIRANO Takahito <hiranotaka@zng.info>
2011-01-15 15:25:42 +00:00
Jesse Vincent
e36ead77c4
ant doesn't like the unicode symbol
2011-01-13 16:28:57 +00:00
Andrew Chen
e56b044bbc
Add support for HTML composition with text alternative.
...
Revamp K9 Identity string.
Quote names in Address only when needed.
Remove quoted text bar and move button to quoted text area.
2011-01-12 23:48:28 +00:00
cketti
3aba9e11ae
Code/comment cleanup
2011-01-11 03:40:43 +00:00
cketti
d403e36f06
Don't count on skip() to actually skip as many bytes as requested.
2011-01-11 03:27:58 +00:00
cketti
c7a7d832e7
Better handle the case where a list in an IMAP response is prematurely ended by CRLF.
...
Fixes issue 2852
2011-01-11 03:10:24 +00:00
Jesse Vincent
9c847d3e9d
minor code cleanup
2011-01-06 16:55:34 +00:00
Jesse Vincent
de806f7715
astyle
2011-01-06 16:55:08 +00:00
cketti
f9f6160719
Correctly encode/escape strings when used in IMAP commands.
...
Fixes issue 2832
2011-01-06 00:39:09 +00:00
Jesse Vincent
9f4790088e
Escape backslashes in IMAP mailbox names
2011-01-05 13:12:30 +00:00
Andrew Chen
ead632aac6
Refactor html/text conversions into its own class.
...
Add more tags to be ignored during HTML to plain text conversion.
Remove UTF-8 non-breaking spaces from generated text.
2011-01-05 04:26:33 +00:00
Jesse Vincent
d25f12fa16
Switch K-9 from generating X-User-Agent to User-Agent headers.
...
Fixes issue 1917
2011-01-04 08:33:12 +00:00
Andrew Chen
f3e75d564a
Add custom HTML tag handler to be used when converting HTML to Text.
...
Hides code in STYLE and SCRIPT tags and adds text-equivalent of HR.
2011-01-04 06:58:13 +00:00
Jesse Vincent
0a8514888e
Map emoji code points defined by mobile carriers to ones defined by
...
Google in order to support various carriers. Patch by HIRANO Takahito
<hiranotaka@zng.info>
2011-01-03 18:07:44 +00:00
Andrew Chen
68ded8aa3e
Add some more documentation about temporary notification avoidance code using UIDs.
2011-01-03 03:26:31 +00:00
Andrew Chen
e794af0bbf
Prevent new mail notifications if they're older than our most recent message.
...
First attempt at fixing Issue 1276. Only works with services that use numeric message IDs, like IMAP.
2011-01-02 09:01:23 +00:00
Jesse Vincent
29fdb81f9b
Fix for the "K9 skips every 101st message when fetching on IMAP" bug by
...
e-t172 <e-t172@akegroup.org>. Fixes Issue 2819
2010-12-30 23:57:41 +00:00
Fiouz
47762a9baa
Remove coupling between ImapStore and ImapConnection by adding an settings indirection interface. Purpose: use the IMAP connection code to validate credentials without having an actual ImapStore instance.
2010-12-30 21:57:59 +00:00
Andrew Chen
605a0bdc93
Add more comments about LocalTextBody.
...
Display decrypted PGP data as text/plain (content type was being set, but not being passed to WebViews).
2010-12-29 07:34:57 +00:00
Jesse Vincent
4c9c478d8d
minor code and doc cleanups as recommended by IntelliJ
2010-12-28 09:10:50 +00:00
Jesse Vincent
bbf65f1335
remove temporary variables
2010-12-28 09:10:30 +00:00
Jesse Vincent
7623a02852
lift the "get display text" code out of the messageview and into
...
localmessage
2010-12-28 09:07:39 +00:00
Jesse Vincent
9878b74379
astyle
2010-12-24 18:55:05 +00:00
Andrew Chen
2806c267c9
Remove unreadable characters from message previews.
2010-12-23 23:16:54 +00:00
Fiouz
ab5caba92c
Factor out store locking code in an intermediate DB access layer.
2010-12-18 22:56:40 +00:00
Fiouz
c5f7dbf028
Execute LocalMessage.appendMessage() & LocalMessage.setFlag() in the same transaction for small message storing in order to speed up DB update.
...
This is a per message basis optimization. More improved speed could be attained by batching several messages in the same transaction.
2010-12-18 10:12:52 +00:00
Kris Wong
bb5052f848
Fix possible NPE.
2010-12-17 17:25:27 +00:00
Kris Wong
623217f6d0
Improved fallback authentication methods + ran source formatter.
2010-12-17 14:40:19 +00:00
Kris Wong
33f5a42562
Fix usage of 'advanced' exchange settings.
2010-12-15 17:00:54 +00:00
Fiouz
f8f2169643
Don't reference the enclosing type instance when it's not used (memory optimisation)
2010-12-14 19:27:11 +00:00
Fiouz
caabbd735a
Don't reference the enclosing type instance when it's not used (memory optimisation)
2010-12-14 19:27:04 +00:00
Fiouz
0d23157e3b
Don't reference the enclosing type instance when it's not used (memory optimisation)
2010-12-14 19:26:57 +00:00
Fiouz
05a8a31d4a
Don't reference the enclosing type instance when it's not used (memory optimisation)
2010-12-14 19:26:51 +00:00
Kris Wong
2b56464ad9
Fix form based re-authentication when logon cookies had expired.
2010-12-14 18:02:39 +00:00
Andrew Chen
b0e4d9cdff
Try calculating content preview from HTML part if text part is unsuccessful on appendMessages.
2010-12-13 00:33:00 +00:00
cketti
9f7b447181
POP3: Ignore messages without unique-id when parsing UIDL response
...
Fixes issue 2731
2010-12-01 18:14:12 +00:00
Jesse Vincent
f5eb6e03af
astyle
2010-12-01 06:32:29 +00:00
Jesse Vincent
e44a74c652
Get rid of a whole lot of crazy code that forced repeated attachment
...
downloads with the intent of only having one attachment downloaded at a
time.
2010-12-01 06:04:28 +00:00
Jesse Vincent
78c900b5fe
remove redundant ;s
2010-12-01 03:07:28 +00:00
Jesse Vincent
75aa644a23
Remove a bunch of stringification inside of string appends (per intellij)
2010-12-01 03:06:50 +00:00
Jesse Vincent
cead5c7060
flip some loops to using java internals instead (per intellij)
2010-12-01 03:04:57 +00:00
Jesse Vincent
c79ea226a5
Remove "throws" declarations that didn't actually get thrown. Remove a
...
couple of try blocks that only caught throws we didn't throw. IntelliJ
optimization.
2010-12-01 03:02:13 +00:00
Jesse Vincent
81f12f0e05
clean up a couple null checks
2010-12-01 03:01:20 +00:00
Jesse Vincent
4f376e8332
astyle
2010-11-28 20:28:37 +00:00
Jesse Vincent
75108f4078
move toMe and ccMe into LocalMessage from MessageInfoHolder
2010-11-27 04:03:10 +00:00
Jesse Vincent
f9981dcf7c
lift hasAttachments to LocalMessage
2010-11-27 04:02:56 +00:00
Jesse Vincent
5d33bc044b
when a message is seen _decrement_ the unread count, don't increment it
2010-11-21 05:31:42 +00:00
Jesse Vincent
14152a8585
Don't compare whether we're setting the delete flag with whether the
...
message is seen or not. (logic error)
2010-11-21 05:31:38 +00:00
Jesse Vincent
0e5b5de409
update our counts on destroy before actually destroying the message, so
...
we have something to call isSet on
2010-11-21 05:31:34 +00:00
Jesse Vincent
43cef54ad6
We don't cache positive DNS lokups. We shouldn't cache negative DNS lookups either
2010-11-21 02:10:59 +00:00
Fiouz
a67a2022d3
Added method name logging on transaction logging, when debug is enabled
2010-11-17 21:11:07 +00:00
Fiouz
dc16657480
Made LocalStore.destroy() transactional
2010-11-17 21:10:45 +00:00
Jesse Vincent
b6ccba9c7d
When getting a list of folders out of the database, ask for it in
...
asciibetical order, rather than random order
2010-11-17 03:42:14 +00:00
Jesse Vincent
80e4de6db4
fix a deleted message count logic error
2010-11-15 01:31:20 +00:00
Jesse Vincent
4f4fe87d5f
Minor refactoring of flag setting code
2010-11-15 01:31:16 +00:00
Jesse Vincent
36714d3b4a
astyle
2010-11-15 01:31:11 +00:00
Fiouz
f9d828a62c
Improved some comments
2010-11-14 23:21:48 +00:00
Jesse Vincent
675651286b
Added the ability to completely wipe the localy cached messages of a syncced folder.
2010-11-14 00:49:25 +00:00
Jesse Vincent
0eee80f08b
renamed deleteMessagesOlderThan to clearMessagesOlderThan to better
...
reflect that it just nukes local copies rather than the synced copies
2010-11-14 00:49:08 +00:00
Jesse Vincent
7d40596aa1
split apart "delete messages older than" for later reuse
2010-11-14 00:49:04 +00:00
Jesse Vincent
14055691a3
Merge branch 'mail-on-sd'
...
* mail-on-sd: (40 commits)
Added more comments to explain how the locking mecanism works for LocalStore
Fixed wrong method being called during experimental provider initialization (since provider isn't enabled, that didn't harm)
Add more comments about how the various StorageProviders work and how they're enabled
find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs
French localization for storage related settings
Remove unused SD card strings (replaced with storage indirection)
Merge mail-on-sd branch from trunk
Reset mail service on storage mount (even if no account uses the storage, to be improved)
find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs
Migraion -> Migration
move the Storage location preference into preferences rather than the wizard.
Made LocalStore log less verbose Added @Override compile checks
Added ACTION_SHUTDOWN broadcast receiver to properly initiate shutdown sequence (not yet implemented) and cancel any scheduled Intent
Be more consistent about which SQLiteDatabase variable is used (from instance variable to argument variable) to make code more refactoring-friendly (class is already big, code extraction should be easier if not referencing the instance variable).
Added transaction timing logging
Factorised storage lock/transaction handling code for regular operations.
Use DB transactions to batch modifications (makes code more robust / could improve performances)
Merge mail-on-sd branch from trunk
Update issue 888 Added DB close on unmount / DB open on mount
Update issue 888 Back to account list when underlying storage not available/unmounting in MessageView / MessageList
...
2010-11-13 21:40:56 +00:00
Jesse Vincent
a8de2d0000
astyle
2010-11-13 01:47:08 +00:00
Jesse Vincent
af5f78928c
Add a "fetch all messages" visible limit
2010-11-12 23:41:43 +00:00
Jesse Vincent
478bd876ee
There's no reason the getSubject accessor should throw a
...
MessagingException on LocalMessage
2010-11-12 22:27:32 +00:00
Jesse Vincent
b2e5d7afc5
extract our our folder-count updating code from the flag setting code
2010-11-12 21:38:11 +00:00
Jesse Vincent
eb908b67a3
try to clean up our message count update logic in flagging
2010-11-12 21:38:06 +00:00
Jesse Vincent
2d8a8998b0
factor out a "destroy" method for local messages
2010-11-12 21:38:02 +00:00
Jesse Vincent
33fd42e766
If we DELETE a message from the database, don't then try to UPDATE it
2010-11-12 21:37:54 +00:00
Jesse Vincent
69675bc935
Now that we can show bigger previews, actually generate a bigger preview
2010-11-05 04:23:09 +00:00
Jesse Vincent
a78776a9ee
Only look at the first 8k of a message when calculating message previews
2010-11-05 04:23:04 +00:00
Jesse Vincent
bfc24a58a0
Improvements to message preview heuristics
2010-11-05 03:55:24 +00:00
Jesse Vincent
d0e85ce43a
astyle
2010-11-05 02:59:21 +00:00
Marcus Wolschon
4aba667a4e
fix for "http:/"-links in plaintext -emails. (add http:// is a link has no schema)
2010-11-04 13:35:39 +00:00
Fiouz
be6ab18091
Update issue 2537
...
Try to gracefully handle account DB corruption by deleting file on open exception
2010-10-28 19:16:55 +00:00
Marcus Wolschon
b723769e65
translated "unable to connect".
2010-10-28 14:37:48 +00:00
Jesse Vincent
c216f42eb3
Exchange authenticaton and setup overhaul from Kris Wong
2010-10-24 01:03:29 +00:00
Jesse Vincent
07adaaee4d
Applied WebDavStore_cleanup.diff to remove dead code in the WebDav store from Kris Wong <wongk@seapine.com>
2010-10-24 01:02:46 +00:00
Jesse Vincent
983d7ad48f
The "viewport" hinting we used to try to better fit messages by default
...
made android zooming incredibly unreliable. Now it's only somewhat
unreliable.
2010-10-23 18:50:10 +00:00
Jesse Vincent
4ea6c1603b
We've been seeing a lot of FCs on htmlifcation of large messages due to
...
running out of memory during our heavy HTMLification. Try to be a bit
lighter on the poor RAM if a plain text message is big.
2010-10-23 17:33:08 +00:00
Jesse Vincent
e8756af4f1
astyle
2010-10-21 20:49:20 +00:00
Jesse Vincent
d02ddda19b
When doing a message search, break it into "first 10" and "more" -
...
because a long SQL query takes more time before starting to return
results, K-9 was increasingly slow on large folders.
Doing two searches may take marginally more time but starts getting
results back to the UI much faster.
2010-10-21 20:48:28 +00:00
Jesse Vincent
496677dad4
Calculate preview for html-only messages
...
Fixes 2465
2010-10-16 08:27:47 +00:00
Jesse Vincent
28388b235e
move "saveAllHeaders" to the account preferences screen.
2010-10-11 00:08:39 +00:00
Jesse Vincent
8c1eda3149
An attempt at cleaning up after the 3.00x and earlier bug that caused
...
K-9 to leave old headers hanging around in the database
2010-10-08 06:33:04 +00:00
cketti
9b5436d23b
Removed (redundant) debug logging from the IMAP parser code.
2010-10-06 01:50:02 +00:00
Jesse Vincent
6061c42ea9
find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs
2010-10-05 06:04:28 +00:00
Fiouz
ef1d958092
Optimization: don't invoke Cursor.getXXX(int) more than necessary
2010-10-02 18:45:51 +00:00
Jesse Vincent
b6124fb397
deleteHeaders deleted message headers by id when it should have been
...
deleting by message_id. I believe this was our last serious leak in
our flash storage
deleting message headers was....just wrong. we've fixed other similar
bugs inherited from android 1.0 before.
2010-09-22 02:46:20 +00:00
cketti
8cf2655dd8
Reverted r2332 and r2333 because the cause of the problem reported in issue 2078 seems to be different than initially thought.
2010-09-09 23:52:06 +00:00
cketti
a85ea2ee53
- Reworked the previous patch with suggestions by jessev to be as runtime/memory efficient as possible without being useless.
...
- Output debug message when invalid responses are encountered.
2010-09-03 15:32:25 +00:00
cketti
b9b15295cd
Added yet another work-around for an IMAP server implementation with a creative interpretation of the specification. Sanity check results returned for a SEARCH command.
...
Fixes issue 2078
2010-09-03 13:58:09 +00:00
cketti
525d9a2ef9
Don't choke on malformed UIDL responses (POP3).
...
Fixes issue 2252
2010-09-02 23:59:20 +00:00
Jesse Vincent
7030967fa7
astyle
2010-08-31 03:58:33 +00:00
Jesse Vincent
7d2804549e
Remove redundant "return" statements from the end of void methods (with
...
help from intellij)
2010-08-29 23:39:45 +00:00
Jesse Vincent
4f0bce1569
Simplify many, many boolean conditions with help from IntelliJ
2010-08-29 23:39:26 +00:00
cketti
3d27cf220a
Removed some code/string duplication.
2010-08-29 18:46:51 +00:00
Jesse Vincent
89dcc3646b
Database version bump to clear bogus cached attachments
2010-08-29 16:58:04 +00:00
Jesse Vincent
6031862bad
Before we delete messages earlier than the earliest acceptable date, make sure we also delete their attachments.
2010-08-29 16:57:57 +00:00
Jesse Vincent
fe62812ff2
Delete the attachments from disk before we delete them from the database, so we know what to delete.
2010-08-29 16:57:49 +00:00
Jesse Vincent
994ed6653c
simplify some of our flagging logic and remove duplication using ternary operators
2010-08-29 16:57:40 +00:00
Jesse Vincent
6d38c1c71a
Comments to better explain what's really going on on delete of messages
2010-08-29 16:57:31 +00:00
Jesse Vincent
a5b7aa97dd
typo fix
2010-08-29 16:57:24 +00:00
Jesse Vincent
7300aca2b8
Remove a call to deleteHeaders since headers are deleted implicitly by
...
an SQLite trigger.
Call our new variant of deleteAttachments() to avoid an extra lookup
2010-08-29 16:57:02 +00:00
Jesse Vincent
31613e15c7
extract the method for "delete a message" from the "Set flags" method
2010-08-29 16:56:54 +00:00
Jesse Vincent
54a4c84afa
Split out deleteAttachment to avoid an extra SQL call if we can.
2010-08-29 16:56:45 +00:00
Jesse Vincent
ff5024eaec
astyle
2010-08-18 02:48:55 +00:00
Jesse Vincent
8832933a60
It turns out that if you're only fetching the bodystructure, the mime4j
...
parser can't parse the message.
2010-08-17 04:21:22 +00:00
Koji Arai
7964c34dbd
Fixes issue 2145
...
Cannot show the emoji icon on Android 1.6 at least. Replaced all "< img" to "<img".
2010-08-15 14:52:59 +00:00
Jesse Vincent
73c3872dd0
Improve our display of inline images in HTML mail to not also offer
...
themselves up for download.
To do so, we need to start storing the original content-id and
content-disposition for attachments - this includes a database upgrade.
Based on a patch from @achen.code
2010-08-15 02:37:06 +00:00
Jesse Vincent
a0238904b6
Update our emoji implementation to support docomo, softbank and kddi
...
(with the exception of 3 kddi glyphs that overlap with softbank).
As of this commit, emoji sent by iPhone users are visible in K-9
2010-08-12 02:22:35 +00:00
Jesse Vincent
ece68bae5d
Off-by-one error in the recent IMAP fetch work :/
2010-08-12 02:21:56 +00:00
Jesse Vincent
0229d8a1fe
Implement windowing for IMAP UID FETCH
...
Our previous implementation of UID FETCH didn't ever take into account
maximum command line lengths. When fetching, say 800 messages from a
GMail IMAP server, we could easily overflow the max line length leading
to a fetch that didn't get all the messages we wanted to and was
truncated before the description of which fields we want. That caused
K-9 to fetch complete messages, exhaust memory and ultimately fail,
even when we were just trying to get message lengths.
An equivalent fix needs to be made to seach by UID.
2010-08-11 03:36:40 +00:00
Fiouz
dfb8f9e0f2
Memory management optimisation: help garbage collection by avoiding repeated instantiations of immutable arrays (empty arrays of String, Message, Flag, Address)
2010-08-07 15:10:07 +00:00
Fiouz
44cef83e0b
Use of constants for immutable empty arrays (prevent useless memory allocation)
2010-08-02 11:55:31 +00:00
Jesse Vincent
cd6b64d88f
Experimental changes to tell WebView that the HTML versions of messages
...
we generate from ascii are "mobile-optimized"
2010-08-02 01:27:50 +00:00
Jesse Vincent
a4381696f9
Support Emoji for DoCoMo.
...
Emoji icons are derived from http://start.typepad.jp/typecast/
2010-08-02 01:24:40 +00:00
cketti
0c67f1f4cf
Only ask for POP3 capabilities before authorization if TLS should be used. Always ask after authorization.
2010-07-30 00:58:22 +00:00
cketti
91e55f6fa1
Don't log POP3 passwords by default.
2010-07-30 00:53:46 +00:00
Jesse Vincent
2ca76e3db0
Fix for Issue 1956
...
A race condition made the outgoing certificate being compared to the old
incoming mHost,
throwing an exception with an untrusted certificate dialogue to accept
or decline.
2010-07-27 18:59:41 +00:00
Jesse Vincent
766a115155
Remove URLs from message previews. Suggested by Kevin Falcone
2010-07-24 02:09:12 +00:00
Jesse Vincent
7464a1527a
Convert for loops to "enhanced" syntax per SDK performance guidelines
...
(Automatic with Eclipse)
2010-07-19 01:52:18 +00:00
Jesse Vincent
f492ee9d0b
back out the rest of my localDate changes for now due to user
...
complaints.
2010-07-15 03:47:45 +00:00
Jesse Vincent
70a1eef943
astyle
2010-07-13 21:16:56 +00:00
Jesse Vincent
8ab165ef31
Allow per-protocol configuration of which wire protocols are
...
debug-logged
2010-07-13 21:16:42 +00:00
Jesse Vincent
5a43acff2a
Rather than accidentally reusing a public API function name with a
...
different signature, give the private command to pull a count
from the remote imap store its own name
2010-07-11 15:41:20 +00:00
Jesse Vincent
20e47991c3
astyle
2010-07-11 15:39:26 +00:00
Koji Arai
28d3967d0f
Fixes issue 305
...
Support Content-Id header to show inline images.
2010-07-11 13:44:16 +00:00
Jesse Vincent
c359b2c6bf
Comment out redundant logging of IMAP commands
...
Each IMAP command was logged 3 times in normal operation. It seriously
clouds the logs and makes it much harder to read and debug ongoing
connections
2010-07-11 12:31:47 +00:00
Jesse Vincent
7a543b45b1
Remove duplicate code between two message counting routines in ImapStore
2010-07-11 12:31:34 +00:00
Jesse Vincent
9321a045d9
When counting remote unseen/flagged messages, don't window to only the
...
most recent 300 messages - Since we display this # to the user, the
"last 300" heuristic ends up confusing and _wrong_ on a regular basis.
2010-07-11 12:31:22 +00:00
Jesse Vincent
ae339f1ac8
Add a per-account setting to choose how much of each message to download automatically.
2010-07-11 11:59:14 +00:00
Jesse Vincent
4024cca2aa
Add a comment about the custom IMAP command Yahoo! needs to work right.
2010-07-10 16:41:22 +00:00
Jesse Vincent
61b25c8760
only store an internalDate if we actually get it from the server; If we
...
don't have an internaldate, use the sentdate for sorting comparisons.
2010-07-10 16:40:34 +00:00
Jesse Vincent
a826f33eb3
find src/com/fsck/ -name \*.java|xargs astyle --style=ansi
...
--mode=java --indent-switches --indent=spaces=4 --convert-tabs
--unpad=paren
2010-07-06 10:29:26 +00:00
Daniel Applebaum
cdbcb188ec
Fixes Issue 1664
...
Correct thread safety on some member variables when doing null checks.
Explicitly check for mMessageCount == -1 and stop=true in idling loop.
However, the original error message "Message count = -1 for folder"
will still arise in some circumstances and is a valid error to
report.
2010-07-03 15:22:54 +00:00
Koji Arai
dab0c9a97f
Fixes Issue 1914
...
Show To, Cc and From headers on the part of additional headers without fetching all headers.
2010-07-02 14:57:55 +00:00
Daniel Applebaum
8cb7f8f317
Fixes Issue 1763
...
Patch from jca02266 to use locale independent date formatter.
2010-06-11 12:56:01 +00:00
Daniel Applebaum
80ed18c469
Fixes Issue 422
...
Committing this change to properly credit 'mpredosin' with the patch
committed at r1783 "Convert to hierarchical traveral from deep
traversal."
2010-06-08 11:33:47 +00:00
Daniel Applebaum
07f9abe162
Fixes Issue 422
...
Convert to hierarchical traveral from deep traversal.
2010-06-08 01:01:20 +00:00
Jesse Vincent
421ecac997
Strip PGP headers from message preview
2010-06-06 22:28:29 +00:00
Jesse Vincent
4bfebe42f1
Allow users to choose whether they want plaintext messages to be
...
fixed-width when uprezzed to HTML.
2010-06-06 21:33:33 +00:00
Jesse Vincent
0624f119df
Gr. typo to my "word character" regex
2010-06-06 21:33:15 +00:00
Jesse Vincent
222808b51d
Bump up preview length from 160 to 250 to make better use of larger
...
displays
2010-06-06 21:33:05 +00:00
Jesse Vincent
18cf923072
Only strip : lines containing word characters. This should improve the
...
preview when someone sends mail starting with a time. (12:01)
2010-06-06 21:32:57 +00:00
Daniel Applebaum
6d6a9d0ffd
Fixes Issue 1707
...
Eliminate extraneous spaces
Also, abort IMAP IDLE connection attempt if mConnection is null before
IDLEing. Otherwise, we cannot set the idle timeout.
2010-06-02 14:25:04 +00:00
Daniel Applebaum
b35f807820
Fixes Issue 227
...
Provide for controlling the maximum age of syncrhonized messages.
Efficient with IMAP, much less efficient with other Stores.
2010-05-30 21:20:47 +00:00
Daniel Applebaum
dedfd026be
Fixes Issue 254
...
Provide for only showing folders that are subscribed on the server
(IMAP only)
Also:
Change default for Notification behavior to the old way. Make going
to the search for unread messages off by default.
Fix up some hiding of labels, etc. on the incoming server settings.
Check for message suppression in search results.
2010-05-30 16:56:50 +00:00
Jesse Vincent
1a66072910
find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs --unpad=paren
2010-05-30 04:17:00 +00:00
Jesse Vincent
49c4a4f97c
refactor search code to allow us to search on specific fields.
2010-05-29 21:56:17 +00:00
Daniel Applebaum
291f6d18a2
Fixes Issue 1643
...
Fixes Issue 1664
Issue 1643: Some servers respond with an untagged EXISTS to every
NOOP. This change parses through all untagged responses in a loop
until no more are being generated, avoiding calling internalOpen each
time.
Issue 1664: I have never personally seen this error, and the log looks
like a thread safety problem. mMessageCount is being set in one
thread (the IDLE thread) but not properly visible in another thread
(the check mail thread). mMessageCount and other ImapFolder private
variables are now volatile in hopes of correcting this problem.
2010-05-26 03:24:33 +00:00
Daniel Applebaum
5e3e204a4c
Fixes Issue 1643
...
Enhance K-9 Mail to be more tolerant of non-compliant IMAP servers.
Do not require a space following the + in command continuation
requests. The rest of the token parser will swalow the space if it is
actually there but we don't really need it.
2010-05-22 20:52:01 +00:00
Daniel Applebaum
24b178773f
Make sure prefix is fetched before any call to getCombinedPrefix.
2010-05-22 17:34:16 +00:00
cketti
c5486469c2
- Add menu item to show additional headers in the message view
...
- Add option to save all headers locally (incoming server settings)
Applied patch provided by timmlinder with small modifications.
Fixes issue 43
2010-05-21 15:34:29 +00:00
Daniel Applebaum
6afb8c8506
Make sure to compare capabilities using upper case.
2010-05-20 11:55:42 +00:00
Daniel Applebaum
59f22d8e7e
Save capabilities in upper case so we handle them case-insensitively,
...
too. Make sure all CAPABILITY-detection constants are written in
upper case.
2010-05-20 04:19:15 +00:00
Daniel Applebaum
d873ecbe7a
From cketti's reminder: check untagged response with equalsIgnoreCase.
...
Also, reset mCombinedPrefix when the delimeter is discovered.
2010-05-20 04:13:49 +00:00
Daniel Applebaum
af55c6f48b
We don't need to log the content of the map each time we add to it.
2010-05-20 03:38:16 +00:00
Daniel Applebaum
44da2e1fe6
After discussion with cketti, reinstate using LIST to find the path
...
delimeter, but only if the server does not support NAMESPACE. Since
we've encountered non-compliant servers that freak out at the LIST
command, enclose in a try/catch structure so that failures do not
totally prevent IMAP communication.
2010-05-20 02:33:44 +00:00
cketti
6e3183f54f
Moved classes Regex and DomainNameChecker from android (package) namespace to K-9 namespace. This way we're protected from modifications to these classes in future Android versions.
2010-05-19 19:16:36 +00:00