1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-08-13 17:03:48 -04:00
Commit Graph

705 Commits

Author SHA1 Message Date
ashley willis
b1b6d5fce4 Yahoo! IMAP seems to no longer require 'ID ("GUID" "1")' over non-3G.
see http://mobile.yahoo.com/mail for IMAP setup instructions.
2012-05-09 13:48:36 -05:00
ashley willis
ca6d697eed fixed commit ed4c74983e due to crashing on 2.1 devices 2012-05-07 09:24:13 -05:00
ashley willis
ed4c74983e fixed security issue -- account databases previously world-readable and accessible to any app if UUID is known. 2012-04-26 08:03:06 -05:00
Andrew Chen
7e26b62227 Remove horizontal rules in message previews. 2012-04-08 16:52:55 -07:00
Jesse Vincent
4723ea0ae5 Possible to select email addresses from the ContactPicker
Conflicts:

	src/com/fsck/k9/activity/MessageCompose.java
	src/com/fsck/k9/helper/ContactsSdk3_4.java
2012-04-08 12:29:08 -04:00
cketti
0caac114a6 Added some error checks when processing IMAP FETCH responses 2012-04-03 07:55:52 +02:00
cketti
f181e923ca Don't modify draft messages when storing them in the database 2012-03-15 21:21:00 +01:00
cketti
0cb4207ef7 IMAP: don't create the destination folder when copying messages 2012-03-09 21:51:48 +01:00
cketti
7163d39091 Change ImapException to always be a permanent error
This way IMAP commands that get anything but an "OK" response are never
tried again (pending actions).
2012-03-09 21:50:26 +01:00
cketti
5591865f17 Merge branch 'uidplus' 2012-02-29 14:09:41 +01:00
cketti
e72afc1641 Set content type of attachment even when no file name was found 2012-02-27 23:20:30 +01:00
cketti
fbc187a3e2 IMAP: Send the Message-ID as quoted string in getUidFromMessageId() 2012-02-19 19:51:06 +01:00
cketti
4adfc51339 Use HtmlConverter.convertEmoji2Img() in LocalFolder.updateMessage() 2012-02-18 00:44:24 +01:00
cketti
8ce78408c2 Fixed HTML generation in MimeUtility.extractTextAndAttachments() 2012-02-17 19:42:35 +01:00
cketti
5083b8f1e8 Use newly imported AOSP code instead of ImapStore.parseSequenceSet() 2012-02-17 15:01:30 +01:00
cketti
deb01bcd16 Imported ImapUtility.java from AOSP Email
Modified it to fit our needs.
2012-02-17 14:59:50 +01:00
cketti
c3885bc475 Cleaned up LocalFolder.appendMessages() a bit 2012-02-16 23:52:44 +01:00
cketti
023c60513e Fixed UID mapping return value of LocalStore.moveMessages() 2012-02-16 23:37:44 +01:00
cketti
3e4e6c72fd Cleaned up ImapStore.ImapFolder.copyMessages() 2012-02-16 22:12:44 +01:00
cketti
396005974a Cleaned up ImapStore.ImapFolder.appendMessages() 2012-02-16 21:33:53 +01:00
cketti
8e1627e1b9 Merge branch 'master' into uidplus
Conflicts:
	src/com/fsck/k9/controller/MessagingController.java
	src/com/fsck/k9/mail/store/WebDavStore.java
2012-02-16 19:57:24 +01:00
cketti
cf9631d481 Changed the way we decide what message parts to display 2012-02-13 23:11:59 +01:00
cketti
7a252bf002 Changed method to update the unread widget 2012-02-13 12:16:20 +01:00
cketti
29e1a68288 Added widget to display the unread count for an account 2012-02-13 12:16:18 +01:00
cketti
e8eae37389 Reset unread/flagged count on "empty trash" 2012-01-27 00:51:18 +01:00
cketti
4e5d116713 Delete attachment metadata and thumbnails when deleting attachments 2012-01-24 16:15:45 +01:00
cketti
bddacf6b64 Use database ID to keep track of the current draft
By using the database ID we avoid having to deal with the problem of
changing UIDs. First the message has a local UID, then, when the upload
to the server is completed, it gets a remote UID.
2012-01-22 05:20:41 +01:00
cketti
96f827d291 Modified LocalStore to use UPDATE when replacing existing messages
This way we can later use the database ID to keep track of drafts.
2012-01-22 05:20:41 +01:00
cketti
32a29f131b Make sure an IOException is always passed through as MessagingException
This is important for the code handling pending actions in
MessagingController. If a non-permantent MessagingException is
encountered, the pending action is retried later.

Fixes issue 3696
2012-01-20 19:50:07 +01:00
cketti
258b0039d5 IMAP: also get the Message-ID when fetching the message "envelope"
This should fix issue 3994
2012-01-14 06:30:22 +01:00
cketti
66b7805a57 Fixed a bug in the IMAP response parser
Also got rid of ImapResponse.more() which isn't necessary anymore.
2012-01-12 07:56:52 +01:00
cketti
71174417ce Clone Message object to avoid ConcurrentModificationExceptions
Fixes issue 3953
2012-01-04 03:57:53 +01:00
edpeur
daeedc2222 Close resources properly 2011-12-31 17:38:41 +00:00
wongk
fb3cd234fa Merge branch 'master' of github.com:k9mail/k-9 2011-12-28 14:04:37 -05:00
wongk
b2d5ea3ce2 Fixed the parsing of response data for WebDAV requests. 2011-12-28 14:03:44 -05:00
cketti
852dca4124 Removed unused import 2011-12-26 02:30:59 +01:00
András Veres-Szentkirályi
cea6f4468d Removed unused private field 2011-12-26 02:28:31 +01:00
cketti
6de081c5b0 Minor cleanup 2011-12-19 02:21:27 +01:00
mwolschon
696666ca5e Issue 1303: can't send mail get "no route to host" error 2011-12-19 02:10:17 +01:00
cketti
63605b65b6 Add support for new auto-detect namespace setting to ImapStore 2011-12-01 06:30:47 +01:00
cketti
75cdbd860e Only save IMAP path prefix in store URI if auto-detection isn't used 2011-12-01 05:58:44 +01:00
cketti
cb7b88680b Use Store.decodeStoreUri() in AccountSetupIncoming 2011-12-01 02:28:57 +01:00
cketti
9e0ea7dd79 Extended ImapStore URI to support empty IMAP path prefix 2011-12-01 01:57:50 +01:00
cketti
d6fbeb2913 Fixed creation of store URIs when a "path" was used. 2011-11-29 21:45:52 +01:00
Andrew Gaul
057b316bcb Avoid NPE in getOldestMessageDate
Caused by autounboxing a possibly null Long into a long.
2011-11-27 10:35:06 -08:00
Apoorv Khatreja
4b0d3ccf21 Removed an unnecessary portion of code that attempted to handle command continuation requests after a UID COPY command. Also removed some extraneous test code that mysteriously creeped into the repo. 2011-11-17 02:46:01 +05:30
cketti
4f060642ee Merge branch 'imap_parser' 2011-11-16 04:52:05 +01:00
cketti
99163dc9b9 Removed isSizeOrExpungeResponse()
I don't understand what the purpose of this code was. It stopped parsing
before the end of the line was reached, thus causing problems with
parsing subsequent lines of the response.
2011-11-16 04:48:50 +01:00
cketti
8cdd283bb8 Added Javadoc comment 2011-11-16 03:59:27 +01:00
cketti
e9b0f82c11 Minor code cleanup 2011-11-16 03:23:59 +01:00
cketti
f8779095d9 Parse resp-text on command continuation requests 2011-11-16 03:17:36 +01:00
cketti
43f5cbb361 Renamed parseStatusResponse() to parseResponseText() 2011-11-16 03:11:35 +01:00
cketti
727c8564ec Cleaned up readTokens() 2011-11-16 03:10:26 +01:00
cketti
688db057ac Removed unused imports 2011-11-16 02:51:46 +01:00
Jesse Vincent
a8ef6594ec Preserve header order (with the exception of duplicate headers like
"received" they all show up where the first one did
2011-11-15 00:00:42 -05:00
Andrew Chen
7ca438669e Add theoretical support for RFC6154 SPECIAL-USE for auto-configuration. 2011-11-14 18:55:11 -08:00
Andrew Chen
95215f00b7 Kerio also supports auto-configuration; remove the gmail.com requirement to use XLIST for auto-configuration. 2011-11-14 18:27:08 -08:00
Andrew Chen
2f3565d180 Implement Gmail's XLIST IMAP command to determine Gmail-specific folders. 2011-11-14 18:15:32 -08:00
cketti
88a2dd6289 Merge branch 'issue549'
Conflicts:
	src/com/fsck/k9/Account.java
	src/com/fsck/k9/mail/store/WebDavStore.java
2011-11-05 18:47:55 +01:00
Andrew Chen
4a1046a893 Merge pull request #93 from andrewgaul/cursor-close-quietly
Introduce and use Utility.closeQuietly(Cursor)
2011-11-04 16:20:22 -07:00
Andrew Gaul
39aa577651 Introduce and use Utility.closeQuietly(Cursor)
This helper is in the same spirit as IOUtils.closeQuietly.
2011-11-04 09:58:55 -07:00
Andrew Gaul
d301089f3c Avoid string concatenation in String.format 2011-11-03 18:47:34 -07:00
Andrew Chen
57e0abbf8f Merge pull request #84 from andrewgaul/api7
Use LinkedList instead of Deque.
2011-11-03 07:41:09 -07:00
Andrew Chen
7f046e5f0a Merge pull request #91 from andrewgaul/findbugs-stream-close
Improve the way we open/close streams.
2011-11-03 06:40:07 -07:00
Andrew Chen
d80e5bfbd0 Merge pull request #90 from andrewgaul/close-quietly
Call IOUtils.closeQuietly instead of using empty try/catch block.
2011-11-03 06:35:42 -07:00
Andrew Chen
64b299ebec Merge pull request #89 from andrewgaul/is-empty
Prefer Collection.isEmpty over size
2011-11-03 06:34:15 -07:00
Andrew Chen
9e74f9ffcf Merge pull request #88 from andrewgaul/log-throwable
Log Throwables instead of concatenating
2011-11-03 06:32:20 -07:00
Andrew Chen
64e2247e8f Merge pull request #87 from andrewgaul/map-initialization
Optimize static map, remove unneeded inner class, and use unmodifiable map.
2011-11-03 06:31:32 -07:00
Andrew Chen
8dccc7a996 Merge pull request #86 from andrewgaul/findbugs-concatenation
Prefer StringBuilder.append over String.concat
2011-11-03 06:28:51 -07:00
Andrew Gaul
b53b0d33ba Close streams on exceptional paths
Addresses FindBugs complaints.
2011-11-02 22:48:37 -07:00
Andrew Gaul
b1a807a712 Call IOUtils.closeQuietly where appropriate 2011-11-02 22:22:15 -07:00
Andrew Gaul
2599bdcc75 Log Throwable instead of concatenating 2011-11-02 22:18:30 -07:00
Andrew Gaul
70b635ec30 Initialize static map optimally
Remove unneeded inner class, use unmodifiable map, and mark as static.
2011-11-02 22:16:12 -07:00
Andrew Gaul
cb14cd9d78 Prefer StringBuilder.append over String.concat
Addresses FindBugs complaints.
2011-11-02 22:10:02 -07:00
Andrew Gaul
61c850e077 Remove dead stores
Addresses FindBugs complaints.
2011-11-02 22:02:41 -07:00
Andrew Gaul
98d0b61890 API 7 fixes 2011-11-02 20:47:48 -07:00
Andrew Gaul
647ae0a31c Prefer Collection.isEmpty over size 2011-11-02 20:03:07 -07:00
Andrew Chen
66881c0f2b Merge branch 'master' of git@github.com:k9mail/k-9.git
* 'master' of git@github.com:k9mail/k-9.git:
  Optimize java.util.* imports.
2011-11-02 08:37:12 -07:00
Andrew Chen
f884e967c9 Use MimeHeader.* constants when referring to content headers. Minor whitespace changes. 2011-11-02 08:34:06 -07:00
Andrew Chen
406aae6e61 Optimize java.util.* imports.
Conflicts:

	src/com/fsck/k9/mail/store/WebDavStore.java
2011-11-01 13:54:55 -07:00
Andrew Chen
ea05f3b5d0 Merge branch 'legacy-collections' of https://github.com/andrewgaul/k-9 into andrewgaul
* 'legacy-collections' of https://github.com/andrewgaul/k-9:
  Prefer unsynchronized Collection types
2011-11-01 13:26:54 -07:00
Andrew Chen
4395da270d Merge pull request #77 from andrewgaul/findbugs-entryset
Prefer entrySet over keySet and get
2011-11-01 12:44:26 -07:00
Andrew Gaul
773f2e8870 Prefer Integer.valueOf over explicit boxing
Addresses a FindBugs complaint.
2011-10-31 21:58:32 -07:00
Andrew Gaul
bfd11c444f Prefer entrySet over keySet and get
Addresses FindBugs complaints.
2011-10-31 21:42:12 -07:00
cketti
807907cb9e Merge branch 'master' into issue549
Conflicts:
	res/values/strings.xml
	src/com/fsck/k9/service/MailService.java
2011-10-29 05:22:07 +02:00
Andrew Chen
f24d4c9155 Merge pull request #72 from andrewgaul/remove-literal
Remove unused literal methods
2011-10-27 23:32:28 -07:00
cketti
e3f6561008 Don't crash when trying to connect to an non-SSL service using SSL
Fixes issue 3798
2011-10-28 04:59:08 +02:00
cketti
b69d6cb64c Use Locale.US with toUpperCase() and toLowerCase() where appropriate 2011-10-27 17:17:43 +02:00
Andrew Gaul
a2d0f9ccb7 Remove unused literal methods 2011-10-25 13:56:07 -07:00
Jesse Vincent
ae3f098b4a Merge pull request #64 from andrewgaul/typesafe-set
Avoid type-unsafe Set
2011-10-20 05:34:48 -07:00
Andrew Gaul
5b9f542bd7 Avoid type-unsafe Set 2011-10-19 23:05:34 -07:00
Andrew Gaul
ce4b42f66b Remove duplicated combine flags code 2011-10-19 22:04:57 -07:00
Andrew Gaul
80d9246130 Prefer unsynchronized Collection types 2011-10-19 21:56:20 -07:00
cketti
dd8cd33c5a Fixed decoding of store URIs with empty passwords 2011-10-18 05:05:40 +02:00
cketti
6b5b4e474e Fixed store URI encoding/decoding in Pop3Store 2011-10-17 05:59:36 +02:00
cketti
52a92d93a1 Add dialog to ask for server passwords after import 2011-10-17 04:34:26 +02:00
cketti
fc8d2e9979 Merge branch 'master' into issue549
Conflicts:
	res/menu/accounts_context.xml
	res/menu/accounts_option.xml
	res/values/strings.xml
	src/com/fsck/k9/Account.java
	src/com/fsck/k9/activity/Accounts.java
	src/com/fsck/k9/activity/AsyncUIProcessor.java
	src/com/fsck/k9/activity/FolderList.java
	src/com/fsck/k9/activity/ImportListener.java
	src/com/fsck/k9/activity/K9Activity.java
	src/com/fsck/k9/activity/K9ListActivity.java
	src/com/fsck/k9/activity/MessageView.java
	src/com/fsck/k9/mail/store/ImapStore.java
	src/com/fsck/k9/mail/store/Pop3Store.java
	src/com/fsck/k9/mail/store/WebDavStore.java
	src/com/fsck/k9/mail/transport/SmtpTransport.java
2011-10-14 20:33:25 +02:00
cketti
b05750c245 Better input validation in *Store.createUri() 2011-10-13 02:35:08 +02:00
cketti
1ab7dbae54 Added input validation for folder settings 2011-10-08 21:30:45 +02:00
Andrew Gaul
57be9e3ee3 Make sets immutable
Use final and unmodifiable and avoid anonymous inner classes.
2011-10-06 20:22:18 -07:00
cketti
2e2428b093 Merge pull request #55 from andrewgaul/stringbuilder
Prefer StringBuilder over StringBuffer
2011-10-06 09:04:43 -07:00
cketti
31af4526ab Merge pull request #58 from andrewgaul/spelling
Spelling corrections
2011-10-06 09:01:37 -07:00
Andrew Gaul
220e55603d Spelling corrections 2011-10-05 22:04:39 -07:00
Andrew Gaul
dad0332667 Make an inner class static 2011-10-05 22:01:53 -07:00
Andrew Gaul
47eb0fa2e1 Prefer StringBuilder over StringBuffer
The former is unsynchronized and slightly faster.
2011-10-05 21:50:31 -07:00
cketti
0619eaf79c Catch NumberFormatException when parsing disposition size parameter
Fixes issue 3712
2011-10-01 21:17:00 +02:00
Jesse Vincent
1b7481f854 optimize cketti's pop3 space-splitting code to not make lots of extra
copies of responses.
2011-09-04 15:53:12 -04:00
Jesse Vincent
1ac652dc5f Small bug introduced during a refactoring "Extracted POP3 commands and capabilities to constants" introduced a typo that broke interactions wit some POP3 servers. 2011-08-28 18:28:12 -04:00
Apoorv Khatreja
47bedec410 Fixed an issue which caused space characters to throw exceptions when being parsed. Some cosmetic changes, and context sensitivity for EXISTS, RECENT and EXPUNGE responses which have empty token lists. 2011-08-04 23:30:27 +05:30
Apoorv Khatreja
9335dacd46 Added a separate handler for status responses to parse the resp-text tokens contained in these responses. 2011-08-02 02:19:12 +05:30
Adam
be1be56e3a Fixed bug where uid in response was truncated
The SAX parser returns chunks of text to the
WebDavHandler. Other tags were correctly appending
values while the special cased <uid> tag was
simply assigned the value it was given, which would
result in the last chunk assigned to it and not
the whole string of text.
2011-07-28 15:08:00 -04:00
Apoorv Khatreja
cf39070048 Whitespaces :/ 2011-07-25 18:56:21 +05:30
Apoorv Khatreja
da9a5e6c17 Made some cosmetic changes for clarity, added debug messages for erroneous conditions. Fixed potential NPE in ImapFolder.parseSequenceSet(). 2011-07-25 06:50:26 +05:30
Jesse Vincent
0543183b11 Work around a weird NPE in WebDAV sync reported by Jon Blow 2011-07-19 22:43:32 -04:00
cketti
2acd55a9ef Implemented work-around to handle malformed UIDL responses (POP3).
Fixes issue 3546
2011-07-17 14:37:21 +02:00
cketti
9f581cb6f3 Extracted POP3 commands and capabilities to constants 2011-07-17 14:13:04 +02:00
Apoorv Khatreja
adc7d65d09 Newline :/ 2011-07-17 01:42:12 +05:30
Apoorv Khatreja
c6a2cb48b1 Added method to check for status response. 2011-07-17 01:41:14 +05:30
Jesse Vincent
b85c9b7b0e Work around the fact that when we can't get read status for a message,
we'd end up with an NPE as we then queried the hashmap
2011-07-11 11:08:20 -04:00
Jesse Vincent
98ae8cf2be refactoring to use the object we extracted from the array 2011-07-11 11:08:20 -04:00
Jesse Vincent
d7dfba15cf It appears that Exchange is returning responses
without a visiblecount element for empty folders
Which resulted in this code returning -1 (as that was
the previous default.)
-1 is an error condition. Now the default is empty
2011-07-09 17:00:35 -04:00
Jesse Vincent
220be75473 Add a bit of logging to find out what webdav servers tell us about how
many messages they have in debug mode
2011-07-09 16:24:18 -04:00
Jesse Vincent
8cffc5b682 Bullet proofing for user-reported exceptions in WebDAV sync:
E/k9      ( 5735): java.lang.NullPointerException
E/k9      ( 5735):      at
com.kaitenmail.mail.store.WebDavStore$WebDavMessage.setNewHeaders(WebDavStore.java:1903)
E/k9      ( 5735):      at
com.kaitenmail.mail.store.WebDavStore$WebDavFolder.fetchEnvelope(WebDavStore.java:1655)
E/k9      ( 5735):      at
com.kaitenmail.mail.store.WebDavStore$WebDavFolder.fetchEnvelope(WebDavStore.java:1627)
E/k9      ( 5735):      at
com.kaitenmail.mail.store.WebDavStore$WebDavFolder.fetchEnvelope(WebDavStore.java:1627)
E/k9      ( 5735):      at
com.kaitenmail.mail.store.WebDavStore$WebDavFolder.fetchEnvelope(WebDavStore.java:1627)
E/k9      ( 5735):      at
com.kaitenmail.mail.store.WebDavStore$WebDavFolder.fetchEnvelope(WebDavStore.java:1627)
E/k9      ( 5735):      at
com.kaitenmail.mail.store.WebDavStore$WebDavFolder.fetch(WebDavStore.java:1404)
E/k9      ( 5735):      at
com.kaitenmail.controller.MessagingController.fetchUnsyncedMessages(MessagingController.java:1418)
E/k9      ( 5735):      at
com.kaitenmail.controller.MessagingController.downloadMessages(MessagingController.java:1253)
E/k9      ( 5735):      at
com.kaitenmail.controller.MessagingController.synchronizeMailboxSynchronous(MessagingController.java:1031)
E/k9      ( 5735):      at
com.kaitenmail.controller.MessagingController.access$400(MessagingController.java:81)
E/k9      ( 5735):      at
com.kaitenmail.controller.MessagingController$30.run(MessagingController.java:3768)
E/k9      ( 5735):      at
com.kaitenmail.controller.MessagingController.run(MessagingController.java:276)
E/k9      ( 5735):      at java.lang.Thread.run(Thread.java:1096)
2011-07-09 15:26:30 -04:00
Jesse Vincent
b02b895aaf Add 2MB, 5MB and "All" message download options 2011-07-02 15:29:49 -04:00
Apoorv Khatreja
bc9b7030d7 COPYUID implementation now in place and working, restructured appendMessages, copyMessages and moveMessages globally to return a Map of srcUids -> destUids rather than returning nothing. This is now used to bring local and remote UIDs upto speed without the need for additional requests. 2011-06-28 16:50:48 +05:30
Apoorv Khatreja
0ba7f20622 Attempt to implement COPYUID, works for the most part except for updation of the LocalStore with freshly copied messages. 2011-06-24 02:54:12 +05:30
Apoorv Khatreja
970271dbf9 If the response for an APPEND command contains the APPENDUID response code, read the UID of the newly appended message from there. 2011-06-21 04:34:57 +05:30
cketti
1bdf7095a7 Delete the old localized outbox. Fixes the "two outboxes" problem.
Rename the "new" hardcoded outbox to "K9MAIL_INTERNAL_OUTBOX". This
is done to avoid collisions with folders named "OUTBOX" in a remote
store. See
https://groups.google.com/group/k-9-mail/browse_thread/thread/cbb1c77abba84695

Fixes issue 3411
2011-06-17 06:17:01 +02:00
Jesse Vincent
379a8dfa9e It turns out that 79a96952f2 has caused a
lot of messages to be unreadable in K-9 3.8.  (see mailing list
threads)
2011-06-09 21:54:22 -04:00
cketti
ded489daab Add support for incoming-server and outgoing-server elements on import 2011-06-09 05:50:43 +02:00
cketti
bccf0b5546 Renamed class StoreSettings to ServerSettings 2011-06-07 16:09:15 +02:00
cketti
f4bcb4d923 Extracted inner class Store.StoreSettings 2011-06-07 15:59:23 +02:00
cketti
f6de6f8e42 Save name of the store type in StoreSettings 2011-06-07 04:07:50 +02:00
cketti
25c1a565e7 WebDavStore cleanup
Store port number so we can throw away the store URI once decoded
2011-06-07 03:01:02 +02:00
cketti
29738993d9 Added function to decode store URIs into a container object
This will later be used by the export code to make exporting the
password optional (and the XML output "pretty").
It's also the first step to get away from store URIs towards something
more easily extensible, like Store.StoreSettings.
2011-06-07 00:08:43 +02:00
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