Commit Graph

705 Commits

Author SHA1 Message Date
cketti bc4fb530d0 Remove all code using the old unread/flagged count database columns 2012-12-07 15:45:36 +01:00
cketti 04ec2abd2c Use local unread/flagged count in folder list and message list 2012-12-07 15:04:53 +01:00
cketti d5bb462917 Don't create Message objects when changing flags of selected messages
This changes the interface to MessagingController and the way flags are
updated in the database. Now messages aren't changed one by one but in
batches of 500. This should give better performance, but breaks the
unread and flagged count. I'm not very sad about this, because now we
can move towards only displaying the number of unread/flagged messages
in the local database.
2012-12-06 06:26:38 +01:00
cketti c0b5255e24 Make most important flags separate database columns
This is the first step to speed up searches and flag updates.
2012-12-04 05:13:58 +01:00
cketti b2098c8d1c Add activity that is displayed during database upgrades
See UpgradeDatabases.java for a detailed description of the upgrade
process.
2012-12-01 08:02:55 +01:00
cketti 2db8034c31 Use one database transaction when doing bulk flag changes
Previously we used one transaction per message. For 500 messages the
database updates alone took over 30s on my Nexus 7.
2012-11-27 16:46:59 +01:00
cketti b108e7a539 Don't fetch already downloaded messages found by a server-side search 2012-11-15 21:05:45 +01:00
cketti e339dd1f10 Delete all messages in a thread when 'delete' is used on the placeholder 2012-11-03 01:52:45 +01:00
cketti 2e1d25118a Fix JOIN-condition when searching for messages 2012-11-01 20:33:13 +01:00
cketti 08b361ed36 Fix search for Unified Inbox
We don't want to list the Inbox contents of all accounts but the
contents of folders whose "Unify" setting is true.
2012-10-31 01:45:44 +01:00
cketti 303c1ee85d Extract generation of SQL queries for searches to SqlQueryBuilder 2012-10-29 02:27:34 +01:00
cketti d703286833 Make LocalStore.searchForMessages() skip empty messages 2012-10-24 06:01:26 +02:00
cketti ec76dca57f Remove unused stuff 2012-10-24 01:37:33 +02:00
cketti 1fcce6fb8a Add database indices for thread columns in 'messages' table 2012-10-24 01:03:59 +02:00
cketti 3bef05b55d Removed LocalStore hack introduced in 16d2326 2012-10-24 00:32:29 +02:00
cketti 1b98ce57e1 Notify observers (e.g. CursorAdapter) when the messages table changed 2012-10-24 00:08:44 +02:00
cketti 1d655f5bc2 Added ability to display special folders combining multiple accounts 2012-10-18 05:15:40 +02:00
cketti 20ed1ebe61 Code style cleanup 2012-10-17 20:52:03 +02:00
cketti f1e433e6df Whitespace cleanup 2012-10-16 22:42:51 +02:00
cketti 83d5102f3d Merge branch 'new_search_framework' into content_provider
Conflicts:
	src/com/fsck/k9/fragment/MessageListFragment.java
2012-10-16 20:57:47 +02:00
cketti cc74a2ad2e Switched to ContentProvider and CursorLoader to display the message list 2012-10-16 15:46:40 +02:00
Sander Bogaert d27f909600 Add new search logic to the MessagingController and LocalStore classes. 2012-10-13 08:53:00 -04:00
cketti 16d2326033 Nasty hack to retain threads in MessageListFragment when polling 2012-10-10 03:02:36 +02:00
cketti 63b6b497a0 Early version of message threading
Missing:
- UI support for threading when polling
- code to upgrade existing installations
- UI elements to switch from/to threaded display mode
- threading of messages with same subject
2012-10-08 22:51:29 +02:00
Jesse Vincent 0c34a21ff0 Add a fromMe method on messages 2012-10-03 21:56:28 -04:00
Andrew Chen 39e2a973a1 Merge branch 'imapsearch'
* imapsearch:
  Change settings version to 18 to match what's currrently on master.
  Handle aborted imap searches by nuking in-progress connections.
  Move IMAP search into the Folder level.
  Remove duplicate notification on remote search start.
  Rename variables
  changed PREFERENCE_CLOUD_SEARCH_ENABLED from "cloud_search_enabled" to "remote_search_enabled" in activity/setup/AccountSettings.java to resolve FC.
  Add cloud search icon to local search result screen. Implement pull-to-remote-search.
  Log remote search exceptions in addition to toasting them.
  Add settings export for remote search settings.
  Whitespace; no functional changes.
  Handle implicit vs. explicit searches in ActionBar home button behavior.
  Whitespace fix; no functional changes.
  Add remote search actionbar icons.
  IMAP Search: log exceptions on remote search, properly dispatch MessageList changes.
  modified loadMessageForView() to dowload message if neither X_DOWNLOADED_FULL nor X_DOWNLOADED_PARTIAL.
  Add remote IMAP search support.

Conflicts:
	res/menu/message_list_option.xml
	res/values/attrs.xml
	res/values/themes.xml
	src/com/fsck/k9/activity/MessageList.java
	src/com/fsck/k9/preferences/Settings.java
2012-09-25 16:01:52 -07:00
Andrew Chen 2541753aff Handle aborted imap searches by nuking in-progress connections. 2012-09-25 15:46:30 -07:00
Andrew Chen 9f96cd36a7 Move IMAP search into the Folder level.
Should also consider moving the LocalStore search into the folder level and have the store call the folder level searches.
2012-09-25 14:34:59 -07:00
Andrew Chen 7631af1572 Log remote search exceptions in addition to toasting them. 2012-09-22 09:37:50 -07:00
cketti 2ee3378eef Use executeSimpleCommand() for UID COPY so the response type is checked
The previous code never failed e.g. on a "NO" response. That lead to
messages being deleted for a move action.
2012-09-14 02:08:39 +02:00
Rob Bayer fdb1267cb1 Add remote IMAP search support.
* rbayer/IMAPsearch: (21 commits)
  More cleanup
  Code Cleanup getRemoteSearchFullText -> isRemoteSearchFullText line wraps for preference items
  Refactor to allow fetching of extra search results beyond original request.  Most code moved out of ImapStore and ImapFolder and into MessagingController.searchRemoteMessagesSynchronous.  Should make it easier to add remoteSearch for other server types.
  Prevent delete of search results while search results open
  remove duplicated code block
  Don't hide Crypto when IMAPsearch disabled
  Code Style Cleanup: Tabs -> 4 spaces Remove trailing whitespace from blank lines
  tabs -> spaces (my bad...)
  Fix opening of folders to be Read-Write when necessary, even if they were previously opened Read-Only.
  add missing file
  Working IMAP search, with passable UI.
  UI improvements
  Simple help info when enabling Remote Search
  Dependency for preferences
  Basic IMAP search working
2012-09-13 09:10:37 -07:00
Jesse Vincent d5f739030a Always save all headers. Not doing so is kind of a crazy space microoptimization and can get a little messy 2012-09-10 12:07:35 -04:00
Bernhard Redl e5d56a4eac Fixes 4517: Junk special folder not autoconfigured (rfc6154 implementation was incomplete) 2012-09-09 19:12:37 -05:00
Bernhard Redl 474f32ad02 changed parseFlags to directly manimpulate member 2012-08-30 18:15:19 +02:00
Bernhard Redl 56105bcfe3 + add support for $Forwarded IMAP flag 2012-08-29 02:26:38 +02:00
cketti 83e57064ff Check database version after ending the transaction 2012-07-07 17:15:14 +02:00
cketti d08169b004 Corrected indentation 2012-07-07 17:14:03 +02:00
cketti 400487b8aa Merge branch 'pullreq150' 2012-07-07 17:04:17 +02:00
cketti e1d9a4779d Changed the rest of ImapStore to use longs for storing UIDs 2012-07-07 16:46:07 +02:00
cketti 2ad748fad7 Change ImapUtility to use 'long' for the values of sequence sets 2012-07-07 16:21:07 +02:00
cketti a37c95b456 Move auto-unboxing out of if-clause 2012-07-07 15:41:55 +02:00
cketti c359eb3cb7 Use auto-unboxing when iterating over a List<Long> 2012-07-07 15:36:43 +02:00
cketti 08c6c63b31 Merge branch 'pullreq153' 2012-07-07 15:06:41 +02:00
András Veres-Szentkirályi 9413cf5c9d Removed override merely calling super() 2012-07-06 14:35:01 +02:00
András Veres-Szentkirályi bff1602da1 combined nested if statements in LocalStore 2012-07-06 14:35:01 +02:00
András Veres-Szentkirályi 961872edf0 combined nested if statements in ImapStore 2012-07-06 14:35:01 +02:00
Joe Steele 102c6153a1 Issue 4359: IMAP message UIDs are 32 bit unsigned values and cannot be
stored in int, so we now parse them as long.
2012-07-05 18:00:49 -04:00
cketti 67caa357fd Fixed loading messages from the database when message format is AUTO 2012-06-01 20:03:03 +02:00
Romain Vimont (®om) fb36389d20 Create database in a transaction (for performance)
On my emulator, it takes 70ms instead of 250ms.
On a very specific hardware, it takes 0,5s instead of 4,1s.

I willingly did not indent the code between my try/catch (for the patch to be readable).
2012-05-30 12:57:05 +02:00
ashley willis 7e5717ed81 use the new way on internal storage, or the original way otherwise 2012-05-09 21:09:10 -05:00
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