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

971 Commits

Author SHA1 Message Date
Jesse Vincent
e9a0cbb269 Ask SQLite for a simpler calculation when counting unread messages. The docs imply this is a decent perf win. I'm seeing at least a bit of one 2013-07-30 21:32:35 -04:00
Wang Li
50a8d89468 remoteStore assocciated with account indirectly should also be reseted when acccount was removed. Otherwise, there might be residual data that will affec account being added later. 2013-07-23 14:09:53 +08:00
Jesse Vincent
1fa6d5f960 Add an index for a heavy query 2013-07-18 20:09:39 -04:00
cketti
dda8395c7a Make sure we always have the ID of a folder when fetching the unread/flagged count 2013-07-16 16:54:26 +02:00
Jesse Vincent
876d478ad7 Opening a folder (especially in threaded mode) does a very heavy SQL query. This method doesn't use or modify the folder object. Don't cargo-cult the Open here.
(cketti may well tell me I'm wrong about this. Happy to listen & fix)
2013-07-11 18:44:44 -04:00
cketti
306b258f25 Merge pull request #323 from jca02266/adapt_broken_server
Adapt broken pop3 server
2013-07-07 19:43:55 -07:00
cketti
5d07b6691b Don't load unread/flagged count when creating LocalFolder instances
This avoids a potentially expensive LEFT JOIN when querying the database.
2013-07-07 03:31:14 +02:00
cketti
422ba279b5 Refactor code to create LocalFolder instances from a database query. 2013-07-07 03:31:14 +02:00
cketti
ed6eb7bade Fix code to reset the database when upgrading fails
Previously the app crashed when upgrading the database failed. Now we
reset the database version and run the upgrade code again (recreating
all tables).
2013-07-03 05:25:39 +02:00
Koji Arai
b88fbb7fd8 adapt to a corner case for broken server. 2013-06-29 22:28:27 +09:00
Koji Arai
35c79a5656 adapt broken pop3 server 2013-06-26 23:57:55 +09:00
Joe Steele
769ad843dd Revert "Fix for StrictMode error."
This reverts commit bbdec62e37.

Aside from being the incorrect solution for fixing the problem
described in pull request 211, the patch generates 'Dead code'
warnings inside the if(){} statements on lines 46 and 47.

The correct fix for the problem was already implemented in commit
5678786c97.

Although the logcat in the pull request was generated after the fix,
line numbers in the log indicate that it was based on an outdated
version of MimeUtility.java from before the fix.
2013-06-03 11:59:58 -04:00
cketti
46ed21d9f5 Merge branch 'smtp_port_fix' 2013-04-26 02:30:27 +02:00
cketti
b91b86c657 Change SMTP default port to 587 2013-04-26 02:29:36 +02:00
dzan
6c1b3cbc68 Change smtp+tls default port to 587. 2013-04-20 18:02:30 +02:00
cketti
4890cd9ea0 Better cope with messages having identical message IDs 2013-04-17 02:09:43 +02:00
cketti
9ea46cf03b Merge branch 'Issue_4019_pinch_zoom'
Conflicts:
	src/com/fsck/k9/view/MessageWebView.java
2013-03-19 21:09:23 +01:00
cketti
a619a9df93 Hide delete policy "Mark as read on server" for POP3 accounts 2013-03-13 06:34:14 +01:00
cketti
0319ee4a5d Move KOI8-U -> KOI8-R fixup to charset fall-back table 2013-03-10 09:55:25 +01:00
cketti
4b42d0e062 Code cleanup 2013-03-10 09:39:03 +01:00
eagan
c5802ed8ef Java5 style 'for' 2013-03-10 09:25:28 +01:00
eagan
a5f4ddae91 Enhancement for charset fallback.
Fallback rule is defined in CHARSET_FALLBACK_MAP.
Multi-level fallback is supported.
2013-03-10 09:25:13 +01:00
cketti
337487e2ae Merge pull request #211 from colund/master
Close stream in case of an exception
2013-03-10 00:11:53 -08:00
cketti
658b5dbff6 Fix and vastly simplify the query for the threaded message list
This requires another database schema change. With this change messages
at the root of a thread reference themselves in the 'threads' table,
i.e. 'root' contains the value of 'id' for these messages. It makes
selecting all messages in a thread much simpler.
2013-03-08 01:15:26 +01:00
Joe Steele
6a844a2553 Remove unused code in HtmlConverter.
HtmlConverter.getHtmlHeader() and getHtmlFooter() are
no longer used.  Remove them and other related code.
2013-03-01 14:30:42 -05:00
Joe Steele
e2c5229e85 Change when <html> tags are applied to messages.
Previously, <html>, <head>, & <body> tags were
attached to messages before they were stored locally.
But now that the <head> element also needs to include
a <meta> element (for proper MessageWebView display),
it seems unecesary to store all these tags with each
message.

Now the tags are no longer stored with the messages.  Instead,
MessageWebView applies the tags before displaying the message.

This also eliminates the need to upgrade an older
message database where all the old messages would have
otherwise needed to be wrapped with the new tags.
2013-03-01 12:59:59 -05:00
cketti
50fcff76fd Add a caching layer to EmailProvider
Database updates can be surprisingly slow. This lead to slow updates of
the user interface which in turn made working with K-9 Mail not as fun
as it should be. This commit hopefully changes that.
2013-02-19 04:45:14 +01:00
Danny Baumann
275700e482 Fix a number of build warnings.
This gets rid of about 50 warnings. Deprecation warnings still remain,
though.
2013-02-04 11:18:49 +01:00
Danny Baumann
5d1e42c453 Improve certificate failure notifications.
The commit that introduced those notifications also introduced a rather
... interesting design pattern: The CertificateValidationException
notified the user of its pure existance - it's no longer a 'message'
only, but defines policy. As this is more than unusual, replace this
pattern by the MessagingController treating
CertificateValidationException specially when accessing remote folders.

Also make clear which account failed when constructing the notification.
2013-02-02 13:04:41 +01:00
Jesse Vincent
ae6c7e37ca Merge remote-tracking branch 'zjw/issue_2389_cert_error_notice2'
* zjw/issue_2389_cert_error_notice2:
  Fix Issue 2389:  Self signed certificate expiry causes silent send/receive failure.
2013-01-15 14:44:21 -05:00
cketti
543fefebaa Merge branch 'threading_schema_change' 2013-01-12 23:03:38 +01:00
cketti
65a5a73737 Rewrite/optimize some SQL statements 2013-01-12 04:21:53 +01:00
cketti
0a5a330820 Fix getFoldersAndUids() for threads 2013-01-12 04:02:21 +01:00
cketti
421558c148 Optimize setting flags for whole threads 2013-01-12 02:28:12 +01:00
cketti
1df88ea153 Use separate table to store the thread structure 2013-01-11 03:40:35 +01:00
Joe Steele
29f15d715d Fix Issue 2389: Self signed certificate expiry causes silent send/receive failure.
With this fix, a CertPathValidatorException or CertificateException will
create a "Certificate error:  Check your server settings" notification
in the status bar.  When the user clicks on the notification, they are
taken to the appropriate server settings screen where they can review their
settings and can accept a different server certificate.
2013-01-10 16:49:55 -05:00
Andrew Chen
5ac3d1d5c2 Use existing LocalMessage for the JB notifications.
LocalMessage already has a content preview in it; reuse that.
Remove unneeded MimeMessage#getPreview() method now that we don't need
to generate a preview anymore.
2013-01-07 23:20:35 -08:00
Andrew Chen
068f87380c More javadoc 2013-01-07 22:15:49 -08:00
Andrew Chen
d4eae05630 Javadoc 2013-01-07 22:11:04 -08:00
Danny Baumann
45328189f3 Strip off signatures from preview. 2013-01-07 10:39:08 +01:00
Danny Baumann
6f7ec3e401 Incorporate review comments. 2013-01-05 13:21:17 +01:00
cketti
bcd52a6707 Fetch in-reply-to header when downloading envelope on IMAP accounts 2012-12-13 17:03:35 +01:00
cketti
44348e08a4 Create non-existent IMAP folders when copying/moving messages 2012-12-10 21:42:57 +01:00
cketti
7db33ce8c6 Ignore null-rows in results of SQL queries 2012-12-10 17:34:48 +01:00
cketti
8d652b2f61 Fix some compiler warnings 2012-12-07 15:50:55 +01:00
cketti
7b49f67c51 Remove unused methods 2012-12-07 15:47:15 +01:00
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
luyang
bbdec62e37 Fix for StrictMode error.
When the device lost connectivity, a StrictMode error could be thrown since
the stream was never closed.
2012-11-28 19:55:42 +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
3799ecfb21 Check message uids first when comparing messages. message uids are less likely to be the same than folders, so it's a slight optimization 2012-09-12 21:56:17 -05: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
cketti
3253466f14 More magic to work around BinaryTempFileBodyInputStream 2012-09-09 01:15:26 +02:00
cketti
5678786c97 Properly closing InputStreams to avoid StrictMode warnings 2012-09-05 05:57:52 +02: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
Bernhard Redl
89f6c2f6d0 upgraded Mime4J 0.7-SNAPSHOT -> 0.7.2 (fixes MimeMultipart parser bug) 2012-08-15 01:47:57 +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
cketti
8493847895 Removed unused class 2012-07-07 14:29:40 +02:00
András Veres-Szentkirályi
d0c08fb705 removed unread private field mSecure 2012-07-06 15:04:46 +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
András Veres-Szentkirályi
57f364ca69 combined nested if statements in MimeHeader.hasToBeEncoded 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
602ce7be99 Trim the first value in getHeaderParameters()
Previously a value like 'text/html ; charset="windows-1251"' for the
Content-Type header would not be decoded correctly.

Fixes issue 4348
2012-06-18 04:46:46 +02:00
cketti
67caa357fd Fixed loading messages from the database when message format is AUTO 2012-06-01 20:03:03 +02:00
cketti
116e9598da Create an HTML version of text/plain-only drafts in the database
Without this, text/plain-only messages with K-9 Mail's "identity header"
are displayed as "No text" (when moved out of the Drafts folder).
2012-06-01 16:15:07 +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
9e1fa63139 fixed MimeHeader.hasToBeEncoded() to include TAB.
bug encounted when replying to a message such as:
From: "bar,	foo" <foobar@example.com>
the field was originally folded on the tab, but the CRLF was already stripped before this error.
2012-04-30 13:58:02 -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
85da3d8667 workaround to detect the charset from HTML mail without charset parameter on the header.
Conflicts:

	src/com/fsck/k9/mail/internet/MimeUtility.java
2012-04-08 12:38:45 -04: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
Koji Arai
10c37942a6 Added two domains handle docomo emoji 2012-03-17 23:24:12 +09:00
Koji Arai
f9fb74241a avoid NPE. address may be null when the parser is failed. 2012-03-17 23:23:27 +09:00
cketti
f9a35aeaee Replace CRLF with LF when loading drafts
This is necessary because we save the offset and length of the user-
supplied text in the identity header. These values are then later used
to split the draft in user text and quoted message.
When calculating these values we operate on a string with LF line
endings. Ideally we want to do the reverse operation on the same
string, but when saving the message to the server LF is converted to
CRLF to create RFC-conforming messages.

This is only a hack and will probably be the cause of more trouble in
the future. A better solution would be to make the identity header more
robust or get rid of it entirely.
2012-03-17 04:15:30 +01:00
cketti
3fa8081e88 Fixed MimeUtility.extractTextual() when loading messages from the server 2012-03-17 03:19:09 +01:00
cketti
dbf38dae65 Fixed the change of the previous commit 2012-03-17 00:30:40 +01:00
cketti
a48adafbbc Don't use null for 'text' and 'html' in ViewableContainer 2012-03-16 22:56:09 +01:00
cketti
f181e923ca Don't modify draft messages when storing them in the database 2012-03-15 21:21:00 +01:00
cketti
aeb0220e56 Fixed MimeUtility.getHeaderParameter() to not crash on unexpected input 2012-03-12 17:45:34 +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
2cb31a2fac Added button to show unnamed and inline attachments 2012-02-27 21:45:46 +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
b9803ece19 Fixed divider before text part with filename 2012-02-18 00:05:56 +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
d848b434f5 Fall back to HELO command if the server doesn't know EHLO (SMTP)
Fixes issue 2704
2012-01-05 03:53:23 +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
f2253a95d7 Modified ServerSettings to be able to create instances with "extras" 2011-12-01 02:57:53 +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
cketti
9350a3b1b6 Merge pull request #105 from andrewgaul/writer-string-concatenation
Avoid string concatenation in Writer.write
2011-11-27 16:32:25 -08:00
cketti
23c72cd181 FixedLengthInputStream - code cleanup
Inspired by andrewgaul
2011-11-28 01:21:50 +01:00
cketti
798d6753dd FixedLengthInputStream - implement skip which honors mLength
Patch by andrewgaul
2011-11-28 01:14:49 +01:00
cketti
e145a621c7 FixedLengthInputStream - increment mCount only when read() succeeds
Patch by andrewgaul
2011-11-28 01:10:41 +01:00
Andrew Gaul
e93510b4b3 Avoid string concatenation in Writer.write 2011-11-27 13:57:11 -08: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
cketti
20eab9c812 Rewrite application/x-zip-compressed to application/zip 2011-11-21 11:49:03 +01: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
6497ac4cf4 Default authentication type for SMTP is automatic 2011-11-07 01:58:38 +01:00
cketti
70dc27c481 Make MimeUtility.getMimeTypeForViewing() return lower case MIME types
MIME type matching in Android is case-sensitive. So we convert the MIME
types we read from the email to lower case.
2011-11-06 02:05:47 +01: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
1e9a40ffd2 Merge pull request #81 from aatdark/issue3814
Improve handling of From: Headers without parseable email addresses (fixes 3814)
2011-11-02 17:55:58 -07:00
Bernhard Redl
68cecb168e added testcases for address#parse function,changed empty to null (conforms to existing code) 2011-11-03 01:36:57 +01:00
Andrew Chen
b5dca5cf68 Merge pull request #76 from sunglim/string_util
Added StringUtils.isNullOrEmpty().
2011-11-02 10:50:52 -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
Bernhard Redl
6a76b073c3 Improve handling of From: Headers without parseable email addresses (fixes 3814) 2011-11-02 02:08:06 +01: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
Lim Sungguk
8ab10a7586 applied StringUtils.isNullOrEmpty() 2011-10-29 15:12:49 +09: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
91ee21bb2d Use "String.length() == 0" instead of String.isEmpty() [API 9+] 2011-10-27 19:11:44 +02:00
cketti
b69d6cb64c Use Locale.US with toUpperCase() and toLowerCase() where appropriate 2011-10-27 17:17:43 +02:00
cketti
9327c86fe7 Use Locale.US when calling toUpperCase() on the generated MIME boundary
Fixes issue 3733
2011-10-27 16:52:27 +02:00
Andrew Chen
b6cdec43e9 Merge pull request #73 from andrewgaul/address-parse-npe
Fix NPE in Address.Parse
2011-10-26 18:15:40 -07:00
Andrew Gaul
ad5676ed28 Fix NPE in Address.Parse
Found by FindBugs.  Also avoid an allocation in the uncommon case.
2011-10-25 21:24:38 -07:00
Andrew Gaul
e394924ce4 Prefer Random.nextInt over Math.random
Addresses a FindBugs complaint.
2011-10-25 21:21:23 -07: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
d87e25dde1 Added new authentication methods to SmtpTransport.createUri() 2011-10-17 04:57:01 +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
fd61b4f20b Merge pull request #52 from andrewgaul/peekable-bad-offset
Fix bad offset in PeekableInputStream
2011-09-28 21:10:41 -07:00
Andrew Gaul
7cf1bfcc98 Fix bad offset in PeekableInputStream 2011-09-20 21:21:50 -07: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