1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-12 04:25:08 -05:00
Commit Graph

3201 Commits

Author SHA1 Message Date
ashley willis
a021ab71de Override onStop() to save email as draft when activity is changed (go to home screen, call received) 2011-11-01 22:12:51 -05: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
30151f1a70 Add parameter to MyGestureDetector to enable gestures for a specific detector, even if system-wide gestures are disabled. 2011-11-01 17:25:49 -07:00
Andrew Chen
edd78ea10c Make the K9Activity GestureDetector more generic so that it can be used by both MessageList and MessageView.
Make the mTopView a ToggleScrollView.  The only consumer is currently the MessageView, which uses a ToggleScrollView anyway.  This should make it easier to reuse the anti-scrolling features in ToggleScrollView for ListView later on.
2011-11-01 16:55:13 -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
186b65e523 Merge pull request #70 from andrewgaul/combine-one-element
Optimize Utility.combine for length 1 arguments
2011-11-01 12:51:44 -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
ashley willis
57b9321a1e issue-1424: saving duplicate or similar drafts fixed. 2011-11-01 03:02:29 -05: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
cketti
f345c33728 Removed useless try block 2011-10-29 05:10:13 +02:00
cketti
2d1f9f9c84 Reworked MailService to cut overhead when executing background tasks
Since MailService uses the auto shutdown mode of CoreService we can't
use CoreService.execute() with a startId parameter that is null. So this
change should also fix the problem some users reported where the pushers
weren't set up correctly.

See issue 2777
2011-10-29 05:08:37 +02:00
cketti
74f7abaec2 Cosmetic changes and documentation updates/fixes 2011-10-29 05:00:37 +02:00
cketti
987a1ea511 Merge branch 'master' of ssh://github.com/k9mail/k-9 2011-10-29 03:09:15 +02:00
cketti
7e1c19d4d8 Cosmetic changes - kill whitespace at the end of lines 2011-10-28 21:29:39 +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
Lim Sungguk
7903797080 stringutils 2011-10-28 03:50:23 +09: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
cketti
d3baa299f1 Use "reply after quoted text" value when editing drafts 2011-10-27 08:20:03 +02:00
Sven-Hendrik Haase
f4f726ae67 Fixed restoring drafts saved with "reply after quoted text" enabled
Fixes issue 2568
2011-10-27 07:23:01 +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
cketti
ae465789b7 Export default value for keys not found in preference storage 2011-10-26 05:13:22 +02:00
Andrew Gaul
a2d0f9ccb7 Remove unused literal methods 2011-10-25 13:56:07 -07:00
Andrew Gaul
844db81b8d Optimize Utility.combine for length 1 arguments 2011-10-25 13:10:47 -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
Jesse Vincent
ea384b40a1 Merge pull request #66 from andrewgaul/redundant-combine-flags
Remove duplicated combine flags code
2011-10-20 05:33:37 -07:00
Andrew Gaul
4c5f2e59a0 Remove unused Utility.readInputStream
Consider IOUtils.toString instead.
2011-10-19 23:11:03 -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
afd355f83c Use Preferences.getAvailableAccounts() where appropriate 2011-10-18 05:09:20 +02:00
cketti
4d6946f47c Start services and list folders after account has been activated 2011-10-18 05:06:32 +02:00
cketti
dd8cd33c5a Fixed decoding of store URIs with empty passwords 2011-10-18 05:05:40 +02:00
cketti
9fa802afe2 Validate file format version and content version of settings file 2011-10-18 01:30:41 +02:00
cketti
e7ad0e296e Validate account UUID on import 2011-10-17 23:33:32 +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
75dc38a1c4 Added new settings to GlobalSettings 2011-10-17 04:52:33 +02:00
cketti
f08b1ef739 Added new settings to AccountSettings 2011-10-17 04:34:26 +02:00
cketti
3967654a3e Show short message when moving accounts 2011-10-17 04:34:26 +02:00
cketti
52a92d93a1 Add dialog to ask for server passwords after import 2011-10-17 04:34:26 +02:00
cketti
849a4e37a0 Mark accounts as disabled on import
If the settings file doesn't contain passwords for the incoming and
outgoing servers we disable those accounts.
2011-10-16 19:24:31 +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
effb45c463 Cleaned up success message after settings import 2011-10-14 06:19:30 +02:00
cketti
f5e684310e Renamed StorageImportExportException to SettingsImportExportException 2011-10-14 06:00:10 +02:00
cketti
c835bb757a Renamed StorageImporter to SettingsImporter 2011-10-14 05:58:55 +02:00
cketti
cf8bdef0a8 Renamed StorageExporter to SettingsExporter 2011-10-14 05:58:15 +02:00
cketti
0ae176bab3 Code/documentation cleanup. No functional changes. 2011-10-14 05:54:23 +02:00
cketti
470ba8bb03 Removed everything related to settings file encryption
The plan is to (re)add this feature later. With a proven method to
encrypt files; maybe OpenPGP.
2011-10-14 05:38:27 +02:00
cketti
fd16ff8fe6 Remove reference to NonConfigurationInstance when no longer needed 2011-10-14 04:15:45 +02:00
cketti
5b81dbc2ed Use resource strings instead of hardcoding things 2011-10-14 03:42:04 +02:00
cketti
b146fcb2fd Improved handling of object retention on configuration changes 2011-10-14 02:52:32 +02:00
cketti
b05750c245 Better input validation in *Store.createUri() 2011-10-13 02:35:08 +02:00
ashley willis
2058fc378d Option to show next message after delete by default instead of previous. 2011-10-12 17:50:24 +02:00
cketti
a258415629 Merge pull request #60 from andrewgaul/builder-append-no-concatenation
Avoid concatenation in StringBuilder append
2011-10-12 08:28:32 -07:00
cketti
c34d896474 Merge pull request #59 from andrewgaul/immutable-sets
Make sets immutable
2011-10-12 08:26:43 -07:00
Marcus Wolschon
4c8ebb4bcd added check for Null 2011-10-11 08:53:51 +02:00
cketti
7a9c747db9 Don't export incoming/outgoing server passwords 2011-10-11 03:12:18 +02:00
cketti
1de28150e2 Require accounts to at least have one identity when importing 2011-10-09 01:23:45 +02:00
cketti
13b74d0d9e Added error logging 2011-10-09 01:14:59 +02:00
cketti
d791770154 Code cleanup 2011-10-09 00:31:33 +02:00
cketti
6714a7ec5a Improved logging in StorageImporter 2011-10-09 00:04:00 +02:00
cketti
1ab7dbae54 Added input validation for folder settings 2011-10-08 21:30:45 +02:00
cketti
f21e14afc7 Added input validation for identity settings 2011-10-08 17:58:57 +02:00
cketti
060d21db3e Make collections immutable 2011-10-07 21:20:12 +02:00
cketti
0920b0c14d Changed the way SettingsDescription is used
Added ability to rewrite the string representation used internally to
something "pretty" on export.
Now only settings that have entries is GlobalSettings and
AccountSettings are exported. This prevents export of newer settings
that are left in the preference storage when downgrading.
2011-10-07 20:29:03 +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
Andrew Gaul
9b27aba2ba Avoid concatenation in StringBuilder append 2011-10-06 09:20:11 -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
83ee4253d5 Whitelist settings for export instead of blacklisting keys
Use GlobalSettings.SETTINGS an AccountSettings.SETTINGS to decide
which settings to export.
2011-10-04 05:13:17 +02:00
cketti
644571cfe5 Make sure the InputStream of the import file is always closed 2011-10-04 00:48:43 +02:00
cketti
f2a3752930 Added constants for (export) file format version and "settings version" 2011-10-04 00:09:38 +02:00
cketti
33ae5ff7d0 Added code to skip some account settings on export 2011-10-03 20:16:02 +02:00
cketti
0619eaf79c Catch NumberFormatException when parsing disposition size parameter
Fixes issue 3712
2011-10-01 21:17:00 +02:00
cketti
88dc36da8a Added a check to prevent an ArrayIndexOutOfBoundsException
Fixes issue 3683
2011-10-01 20:30:22 +02:00
cketti
dfa97cd878 Handle activity restarts due to configuration changes
Close existing dialogs before the activity is destroyed. Recreate them
and rewire AsyncTasks to the new activity instance after its creation.
2011-10-01 20:11:14 +02:00
cketti
6e1bf2965d Fixed DateFormatValidator to handle placeholders SHORT and MEDIUM 2011-09-30 16:54:01 +02:00
cketti
cd72e197ec Added code to skip certain settings on export 2011-09-30 16:47:59 +02:00
cketti
c76bec971b Fixed compiler warning
Use new variable instead of overwriting an argument.
2011-09-30 14:58:13 +02:00
Jesse Vincent
defabdc20c Additional service fixes from the original author of the issue 2777 fix
to stop the service from being shutdown when we have push enabled
2011-09-29 00:16:27 -04: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
Koji Arai
f3795f3df5 Search same sender from searchable folders instead of the unified inbox 2011-09-16 01:33:51 +09:00
Andrew Chen
dd1334b874 Add some JavaDoc to SearchAccount stuff; astyle. 2011-09-12 15:08:34 -07:00
Jesse Vincent
cbaa9f5b3d Work around cases where mail was last checked in the future.
Sometimes, user devices will have their clock misset. Previously, K-9
would just stop checking mail until the device caught up with the
future.
2011-09-05 22:16:04 -04:00
danapple
7d5bb99dbd Add progress indicator during account move. 2011-09-05 12:45:53 -05:00
danapple
2867a90286 Disable account move menu items when account is at an end of the list.
Conflicts:

	src/com/fsck/k9/activity/Accounts.java
2011-09-05 12:45:33 -05:00
danapple
06cabdbde1 Working version of moving accounts within the Accounts view. 2011-09-05 12:38:03 -05:00
danapple
c67ac4735f Fixes Issue 3177
Dynamically update the FolderList titlebar when the unread state of a
listed folder changes.  This implementation applies the folder unread
count delta to the account-level unread count, to avoid the expense of
recomputing the entire account's unread count.  If no FolderInfoHolder
for this folder already exists, skip the recomputation of the
account-level unread message count.
2011-09-05 11:20:57 -05:00
Jesse Vincent
50e6218c1d Merge pull request #49 from senab/master
Expose SenderAddress through ContentProvider. Issue: 3665
2011-09-04 18:44:08 -07:00
Jesse Vincent
8223e4d4bf Removed some doc annotations from chrisk's fix for the service stopping
issue (2777)
2011-09-04 16:13:19 -04:00
Christian Knecht
7cd6334c64 Stop service(s) if not in use - Fixes Issue 2777 2011-09-04 16:00:02 -04: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
Chris Banes
b002f3178b Move Sender Address to end of Default Projection 2011-09-02 11:33:20 +01:00
Chris Banes
caa02b16eb Expose SenderAddress through ContentProvider. Issue: 3665 2011-09-01 11:57:06 +01:00
cketti
f6a647d7b0 Cosmetic changes 2011-08-31 02:17:45 +02:00
cketti
e9e9d5afcb Removed unused method 2011-08-31 02:12:01 +02:00
cketti
dfc370c057 Merge pull request #42 from jca02266/wip-fix-activity-switching-for-message-view
Fix for message list opening the wrong message view

Fixes issue 3592
2011-08-30 17:09:11 -07:00
Andrew Chen
16c1f9c35b Add the remaining two return receipt headers upon request. 2011-08-28 16:08:41 -07: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
Jesse Vincent
a1378789b2 Merge pull request #48 from rpimonitrbtch/master
Loosened the restrictions on the TLD to support custom private TLD's, as well as single label hostnames.

Resolves Issue 2784: Cannot set server hostname
2011-08-28 12:48:10 -07:00
rpimonitrbtch
bdcb19e344 Issue 2784: Cannot set server hostname
Loosened the restrictions on the TLD to support custom private TLD's, as well as single label hostnames. Removed the localhost and localhost.localdomain exceptions, as they are now redundant.
2011-08-28 15:24:52 -04:00
Alessandro Russo
f5c679fb95 Added support for requesting read receipts 2011-08-27 20:46:04 -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
Jesse Vincent
3679b31b12 Workaround for market-reported error:
java.lang.Error: org.apache.james.mime4j.io.MaxHeaderLimitException: Maximum header limit exceeded
at com.kaitenmail.mail.internet.MimeMessage.parse(MimeMessage.java:85)
at com.kaitenmail.mail.store.Pop3Store$Pop3Message.parse(Pop3Store.java:932)
at com.kaitenmail.mail.store.Pop3Store$Pop3Folder.fetchBody(Pop3Store.java:714)
at com.kaitenmail.mail.store.Pop3Store$Pop3Folder.fetch(Pop3Store.java:579)
at com.kaitenmail.controller.MessagingController.downloadSmallMessages(MessagingController.java:1562)
at com.kaitenmail.controller.MessagingController.downloadMessages(MessagingController.java:1288)
at com.kaitenmail.controller.MessagingController.synchronizeMailboxSynchronous(MessagingController.java:1031)
at com.kaitenmail.controller.MessagingController.access$400(MessagingController.java:81)
at com.kaitenmail.controller.MessagingController$8.run(MessagingController.java:823)
at com.kaitenmail.controller.MessagingController.run(MessagingController.java:276)
at java.lang.Thread.run(Thread.java:1096)
Caused by: org.apache.james.mime4j.io.MaxHeaderLimitException: Maximum header limit exceeded
at org.apache.james.mime4j.stream.AbstractEntity.parseField(AbstractEntity.java:153)
at org.apache.james.mime4j.stream.MimeEntity.advance(MimeEntity.java:120)
at org.apache.james.mime4j.stream.MimeTokenStream.next(MimeTokenStream.java:351)
at org.apache.james.mime4j.parser.MimeStreamParser.parse(MimeStreamParser.java:179)
at com.kaitenmail.mail.internet.MimeMessage.parse(MimeMessage.java:83)
... 10 more
2011-07-25 01:49:42 -04:00
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
7b7601082b the refactoring to combine batch and record logic added an extra check
that broke delete of single messages from message list.
2011-07-23 18:45:43 -04:00
Koji Arai
fda43206a3 Fixed the below issue for GalaxyS and S2.
When scrolling a ListView, all items turn black.
it was reproduced on FolderList, MessageList and Accounts, other views were not.
2011-07-20 22:13:20 +09:00
Jesse Vincent
0543183b11 Work around a weird NPE in WebDAV sync reported by Jon Blow 2011-07-19 22:43:32 -04:00
Koji Arai
8d264b159e Workaround for below issue.
1. Show a message in MessageView.
2. Press HOME button to back home.
3. Re-launch the K-9 and select another message.
4. Show first selected message.

See also: https://github.com/k9mail/k-9/commit/fix_activity_stack
2011-07-18 00:59:30 +09: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
Koji Arai
45e29ccba4 Fixed issue 3530.
Should not HTMLify the message when it is sent without quoted message.

The problem is:
1. set MessageFormat in Account setting to the TEXT.
2. reply a message without quoted text.
3. it is sent with HTML tags.
2011-07-17 08:56:28 +09: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
Apoorv Khatreja
021d5641e5 ant astyle 2011-07-17 01:40:20 +05:30
Jesse Vincent
2e173150d5 Rather than disabling imap-specific preferences on POP3, hide em 2011-07-13 22:15:36 -04:00
Jesse Vincent
87640719dd Disable "download by date range" for webdav and pop3.
The previous behavior caused catastrophic network abuse, downloading
messages outside the date range over and over.
2011-07-12 22:05:49 -04:00
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
c7e8969b01 remove a bunch of listener notification duplication that crept into the
code. this caused all attachments to be double-opened, among other
things
2011-07-09 00:27:56 -04:00
cketti
a60a2a4295 Changed code to show/hide the correct views for CC/BCC
Fixes issue 3509
2011-07-07 04:59:45 +02:00
cketti
d310167b99 Rewrite mime type image/pjpeg to image/jpeg
Fixes issue 1712
2011-07-07 03:05:12 +02:00
Jesse Vincent
b02b895aaf Add 2MB, 5MB and "All" message download options 2011-07-02 15:29:49 -04:00
Jesse Vincent
2a698f1ab9 ant astyle 2011-07-02 15:18:43 -04:00
Apoorv Khatreja
3321ebdc33 COPYUID changes were being updated only in memory, but were not being written to db. 2011-07-02 11:59:00 +05:30
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
Jesse Vincent
2f48309f82 We forgot to HTML markup the body of the message in cases where we
weren't quoting any text
2011-06-20 18:26:19 -07:00
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
Apoorv Khatreja
6c84e196aa Astyle is seriously getting on my nerves. I'm committing this with nothing but astyle changes so that forthcoming commits are clean. 2011-06-21 02:56:53 +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
cketti
222cd43c80 Some code cleanup. No functional changes. 2011-06-17 04:13:32 +02:00
Marcus Wolschon
5eec09d37a Merge branch 'refs/heads/master' of git@github.com:k9mail/k-9.git 2011-06-14 15:23:20 +02:00
Marcus Wolschon
b8f04b8a4f typo 2011-06-14 15:22:45 +02:00
Jesse Vincent
a558466c36 ant astyle 2011-06-13 19:49:06 -04: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
Fiouz
c416f02d52 Improve BACK button handling for MessageView
Remove memory leak from referencing MessageView context from the
Intent that is created to go back to MessageList. MessageView is no
longer hardcoded to go back to MessageList, it instead uses an Intent
given at creation to get back to the originating Activity.

Try our best to restore the MessageList in its previous state when
"Manage BACK button" option is enabled:
Since MessageList lives in its own task, we look for the previous
active task and check whether its top activity matches it. If it does,
we just finish MessageView and Android will automatically restore the
previous task. If it doesn't, we launch the originating Intent (and
MessageList state will be lost).

If option is off, we get the regular Android behavior: got back to the
previous screen, whenever it's the MessageList or another application
if the user long-pressed HOME.

The consequence of this is the need for a new permission in order to
check the previous active task: android.permission.GET_TASKS
2011-06-08 22:53:23 +02:00
cketti
4d11c80f65 Fix account selection on import if file doesn't contain global settings 2011-06-08 22:28:34 +02:00
Fiouz
5ee63c47fe Implemented BACK handling for MessageView
Implemented because MessageList is now in singleInstance launchMode so
the default behavior may not match user options.
2011-06-08 08:42:40 +02:00
cketti
8d97287ffd Write outgoing-server element instead of transportUri to export file 2011-06-07 23:09:40 +02:00
cketti
4a807e33d9 Decode transport URIs into ServerSettings objects 2011-06-07 16:39:41 +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
6abb5b5850 Write incoming-server element instead of storeUri key to export file 2011-06-07 04:25:17 +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
Fiouz
9b0ce3c75a Remove no longer used references on confirmation dialog disapproval 2011-06-07 01:25:38 +02:00
Fiouz
fc4dd077e4 Don't attempt to configure a dismissed dialog during Android activity
reloading

As part of automatic activity reloading following a configuration
change, Android invokes Activity#onPrepareDialog() even for dismissed
dialogs. Consequently, one can't make the assumption that this method
is only invoked by explicit calls to Activity#showDialog() from our
code.

The actual problem here was the mActiveMessages member being null
at such times.
2011-06-07 01:15:04 +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
cketti
0e2afc38ef Cosmetic changes
- Grouped static fields and functions
- Renamed static fields to match code standard
2011-06-06 21:10:14 +02:00
cketti
9a3ce9e03e Added file format version attribute to export file 2011-06-06 19:54:54 +02:00
cketti
a57e605496 Added first version of input validation for account settings 2011-06-06 19:44:01 +02:00
Fiouz
72870174ce Pluralize the "Move to spam" confirmation dialog since code paths were
unified in MessageList and multi-selection is now subject to this
dialog.
2011-06-05 01:35:11 +02:00
Fiouz
de7b75a1df Properly keep selection in case of a
configuration change (orientation, keyboard, etc.) during user
interaction (e.g. a dialog)
2011-06-05 01:16:34 +02:00
Fiouz
5366a07f28 Add @Override compiler check 2011-06-04 23:55:48 +02:00
Fiouz
190d028669 Javadoc fix 2011-06-04 23:17:47 +02:00
Fiouz
821a00e727 MessageList refactoring to remove duplicate code paths.
Message operations should be more consistent now, regardless of how
the messages are selected (long click, checkbox+Menu, future group selection).

This is a backport of the modifications made on the issue258 branch,
without the threading specific features (no new feature introduced).
2011-06-04 23:01:34 +02:00
Fiouz
40546edcf7 Remove local.properties, new default projection column introduced by merge d3cf49a5e4 2011-06-02 20:30:10 +02:00
Fiouz
d3cf49a5e4 Merge remote-tracking branch 'refs/remotes/unread/master' into unread 2011-06-02 20:20:56 +02:00
João Pedro Taveira
503b88e2fd Merge remote branch 'k-9/master' 2011-06-02 14:39:58 +01:00
Jesse Vincent
31adcd2ed8 Revert "http://code.google.com/p/k9mail/issues/detail?id=3408&sort=-id&colspec=ID%20Product%20Type%20Status%20Priority%20Milestone%20Owner%20Summary"
This reverts commit 0c2e06133c.

The patch would cause an extra SMTP connection on _any_ meesage with
attachments. Marcus is headed away on holiday and asked me to revert it
for him (after I asked him to revert it) - With luck, we'll talk through
a design to work around this issue on the list

Conflicts:

	src/com/fsck/k9/mail/transport/SmtpTransport.java
2011-06-02 09:35:03 -04:00
Jesse Vincent
3d583da450 ant astyle 2011-06-01 16:03:56 -04:00
Marcus Wolschon
0c2e06133c http://code.google.com/p/k9mail/issues/detail?id=3408&sort=-id&colspec=ID%20Product%20Type%20Status%20Priority%20Milestone%20Owner%20Summary
Issue 3408: 	SMTP timeouts while calculating message size
2011-06-01 09:13:16 +02:00
Marcus Wolschon
0b6f0a09bb http://code.google.com/p/k9mail/issues/detail?id=3407&sort=-id&colspec=ID%20Product%20Type%20Status%20Priority%20Milestone%20Owner%20Summary
Issue 3407: 	Handling of SMTP 5xx error codes unclean

fix part one: 5xx error codes are detected in SMTP-code and reported as permanent failures.
2011-06-01 09:07:05 +02:00
Andrew Gaul
2fd9bd5a03 Cleanup Utility.combine()
Fix spelling mistakes, simplify adding separators, use unsynchronized
StringBuilder, and fix Javadoc.
2011-05-31 15:11:36 +02:00
cketti
c5342472f2 Load AbsoluteSizeSpan(int,boolean) constructor via reflection
This will allow us to run on Android 1.5/1.6 devices.
2011-05-26 23:43:35 -04:00
Jesse Vincent
a9b28d62d7 Fix a NPE 2011-05-26 22:59:50 -04:00
cketti
30d31c7074 Explicitly use Locale.US when dealing with dates in message headers 2011-05-26 04:32:26 +02:00
cketti
de4abf87cb Respect "move/copy destination folders" setting in ChooseFolder
Fixes issue 2664
2011-05-26 04:11:09 +02:00
Jesse Vincent
92239739b0 microoptimize peekableInputStream's peek method to not do an extra
method dispatch and boolean check on every peek.
2011-05-24 21:35:18 -04: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
Koji Arai
90a5ca8ec2 Merge pull request #34 from jca02266/possible-to-toggle-quoted-text-display
Possible to toggle quoted text display
2011-05-24 08:33:53 -07:00
Koji Arai
7f93cfcbca Refactoring 2011-05-25 00:25:23 +09:00
Koji Arai
33a92b11a2 Use the Button instead of the ImageButton. 2011-05-22 04:12:41 +09:00
Koji Arai
ce9b280746 Added account preference to display quoted text. 2011-05-22 03:56:51 +09:00
Koji Arai
5d6df85aac possible to toggle to display the quoted message to send. 2011-05-22 03:55:50 +09:00
cketti
4f67a6be24 Fixed counting of new unread messages 2011-05-21 00:33:43 +02:00
cketti
6c1b1ebf32 Moved checks from notifyAccount() to shouldNotifyForMessage()
This should fix the "notification count" for cases where messages
passed the shouldNotifyForMessage() checks but not the ones in
notifyAccount().
2011-05-20 23:00:48 +02:00
cketti
2d7fad1fa9 Use InetAddress.getCanonicalHostName() instead of getHostName()
This should always return a FQDN.
2011-05-19 00:55:34 +02: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
e90a479384 Renamed member variables to match code style guidelines 2011-05-14 22:17:15 +02:00
cketti
92b17ec2e2 Hide "Show only subscribed folders" checkbox for POP3 accounts 2011-05-14 22:15:39 +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
969e2d93fd Don't use the "owner name" as default value for the email name
Get rid of Contacts.getOwnerName() and associated permissions.

Fixes issue 3331
2011-05-14 04:53:17 +02:00
Andrew Chen
e5d952bff4 Save and restore the cursor position when saving or loading a draft. This is the first step in making "resume composition on context switch" a reality. 2011-05-10 15:23:25 -07:00
Marcus Wolschon
e0ef94f64b Issue 3319: unseen message count can add up to infinity 2011-05-09 11:21:24 +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
f4931a3167 Get rid of constant K9.INBOX
Use Account.getInboxFolderName() instead
2011-05-08 02:17:23 +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
Andrew Chen
e12dd323f8 Issue 3105: Drop newlines in favor of preserving multiple spaces in htmlified text bodies. 2011-05-05 13:52:47 -07:00
Jesse Vincent
cfd1ad7cdb comment some htmlifciation regexes 2011-05-05 12:50:45 -04: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
Andrew Chen
1ea27d7020 Issue 3105: Generate proper HTML-ified versions of text messages so that textification of the HTMLified text message preserves the original newlines. 2011-05-05 00:17:34 -07:00
Andrew Chen
3fcca67ae5 Preserve legacy SMTP authentication behavior for PLAIN by trying LOGIN if supported. 2011-05-04 23:34:02 -07:00
cketti
71c5e3c611 Remove unnecessary null pointer check 2011-05-05 02:54:20 +02:00
cketti
141e2d2ad9 Make the "pick directory intent" array a constant 2011-05-05 02:52:47 +02:00
cketti
837b7da206 Changed order of pick directory intents 2011-05-05 02:36:15 +02:00
jmccabe
50b6d62169 Refactor of showFileBrowserActivity to add a couple of extra options
to the list of possible file browser intents (ES File Explorer and
Blackmoon File Browser) and simplify possible future updates.
2011-05-05 08:29:05 +08:00
Koji Arai
870791958f Refresh folder list when folder is cleared 2011-05-05 07:08:33 +09:00
Vitaly Polonetsky
37ae2e41f5 fixed displaying of "(null)" account description in notification at account setup wizard 2011-05-05 04:38:33 +08:00
João Pedro Taveira
af7d57561f Message ContentProvider field rename from READED to UNREAD to maintain
names consistency.
2011-05-02 16:00:04 +01:00
cketti
42987cee51 Use current values for missing or malformed global settings in the import file 2011-05-02 04:06:22 +02:00
cketti
01937d4ab8 Don't crash if "footer view" is clicked in search results
Fixes issue 3071
2011-05-01 05:34:17 +02:00
Bernhard Redl
f2283aa91e Catch IllegalCharsetNameException causing force-close on unsupported japanese charsets (issue 3272) 2011-05-01 04:32:10 +02:00
cketti
7e24377bb8 Return detailed information on imported accounts 2011-04-29 04:29:16 +02: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
037b0ff64d Fix automatic authentication method selection for SMTP
Only use automatic authentication method selection if none was
explicitly selected in outgoing server settings.
2011-04-26 18:23:41 +02:00
cketti
e8a1a9a466 Restored semantics of auth*Supported in SMTP authentication code
Also, display a debug message if a certain authentication method was
selected by the user but the server didn't advertise support for it in
the EHLO response.
2011-04-26 17:49:40 +02:00
cketti
80f60a06ca Merged pull request #21 from jott/master.
Support for SMTP authentication methods that are not announced by the server.
2011-04-26 08:18:49 -07:00
Koji Arai
9b2e4c43a9 Fixed default sender color in the MessageList 2011-04-26 23:49:25 +09:00
Jonas Hurrelmann
da38149091 Support for SMTP authentication methods that are not announced by the server.
- Added AUTOMATIC as a new authentication method that will automatically choose the best authentication method (basically old behavior with CRAM_MD5). All other options will now enforce the selected authentication method.
- Added LOGIN as selectable option.
- Cleaned up code so strings to the different authentication methods are only defined once.
2011-04-25 22:32:48 +02:00
Jesse Vincent
c3480db129 Add missing file from the file chooser work 2011-04-25 13:17:18 +10:00
Bernhard Redl
f90fccbfa7 fix NullPtr Exception when there is no Sent Mail folder on the imap server 2011-04-24 14:19:58 +10:00
Bernhard Redl
ab4bae214f Make attachment saving respect the new preference. Allow long-press to
choose a folder.

(new constant renamed from CHOOSE_FOLDER to CHOOSE directory for
clarity)
2011-04-24 14:01:03 +10:00
Bernhard Redl
96842b3ce6 Unroll import statements in AttachmentView.java 2011-04-24 13:56:54 +10:00
Bernhard Redl
e278ea23e9 Add a preference for selecting a default folder in which to save attachments 2011-04-24 13:55:25 +10: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
cketti
71f423d029 Added first version of import file validation 2011-04-20 21:37:48 +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
Bernhard Redl
120a39d5d6 * Fix Bug https://code.google.com/p/k9mail/issues/detail?id=3224
12/24 timesetting is no based on the android system settings
2011-04-20 10:12:59 +08:00
cketti
237302cc2b Changed import code to set "defaultAccountUuid" if necessary 2011-04-19 23:04:43 +02:00
Marcus Wolschon
6f4bef3530 Issue 3259: Show SubjectAltNames in acceptKeyDialog 2011-04-19 10:46:17 +02:00
Marcus Wolschon
59399506df fixed very rare NullPointerException 2011-04-19 09:01:01 +02:00
Jesse Vincent
724b6eaaa5 For a while, it was possible for users to conifgure their outbox and
drafts folders to be the same folder. This could result in drafts being
sent over and over.  This change uses the K-9 Identity header as a
shibboleth for drafts, as it's not actually set when a message is sent.
2011-04-17 21:07:13 +10:00
Koji Arai
659a5d36b2 Fixed issue 2991: Should display colorized name in the message list. 2011-04-16 18:16:33 +09:00
mwolschon
7f5c18bd2b updated comments 2011-04-14 10:07:33 +02:00
mwolschon
9bdfb0d023 BUGFIX: time changes are still honored even if the user choose the
[abort] button of the DialogPreference.
2011-04-13 12:18:07 +02:00
cketti
8240d7ff10 Always reload all accounts after importing one or more accounts 2011-04-13 03:44:43 +02:00
cketti
12d87854ac First version of the import code that reads the new file format 2011-04-13 03:37:44 +02: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
bitblaster
461b57747c Replaced references to K9.INBOX with account.getInboxFolderName() 2011-04-12 22:17:11 +10:00
bitblaster
879d872616 Replaced references to K9.INBOX with account.getInboxFolderName() 2011-04-12 22:17:11 +10:00
bitblaster
3290166749 Replaced references to K9.INBOX with account.getInboxFolderName() and disabled the call to reverseTranslateFolder in case of WebDav account 2011-04-12 22:17:11 +10:00
bitblaster
ccc79f62b9 Replaced references to K9.INBOX with account.getInboxFolderName() 2011-04-12 22:17:11 +10:00
bitblaster
236226858c Replaced references to K9.INBOX with account.getInboxFolderName() 2011-04-12 22:17:11 +10:00
bitblaster
680e2e4191 Replaced references to K9.INBOX with account.getInboxFolderName() 2011-04-12 22:17:11 +10:00
bitblaster
50b906aef7 Added mInboxFolderName and mOutboxFolderName fields 2011-04-12 22:17:11 +10:00
Jesse Vincent
0174988d27 astyle 2011-04-12 22:16:22 +10:00
Sander Bogaert
17cb5106f6 The date format preference is now refreshed each time the messages get listed.
Previously, changes to the date format preference weren't noticed until
the app restarted.
2011-04-12 21:44:51 +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
João Pedro Taveira
591d7a3c6f Added readed field to MessageProvider to indicate if message was
readed yet.
2011-04-11 20:34:23 +01: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
Jesse Vincent
e3818e7739 Merge branch 'master' of https://github.com/dnet/k-9 into dnet-master
* 'master' of https://github.com/dnet/k-9:
  Added SHA-1 checksum to acceptKeyDialog
2011-04-07 15:44:09 +10:00
Will Hawkins
d881832eca Made the minor modifications to support CRAM-MD5 authentication
in POP3 accounts.
2011-04-06 11:42:37 -04:00
András Veres-Szentkirályi
dcf5d150a6 Added SHA-1 checksum to acceptKeyDialog 2011-04-04 18:14:46 +02: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
8a112f04f9 Disable "Enable refile buttons" preference for POP3 users 2011-04-01 06:44:50 +02:00
cketti
4aec4b096c Added option to disable confirmation dialog for "mark all as read"
Fixes issue 1415
2011-04-01 05:34:27 +02:00
cketti
867b251e6d Added @Override annotations to fix warnings 2011-04-01 04:36:29 +02:00
cketti
aa4c970baa Added "move to spam folder" confirmation dialog to MessageList 2011-04-01 04:21:27 +02:00
cketti
e3e31062ad Only keep reference to selected message if necessary
Only keep mSelectedMessage pointing to the currently selected message
if we use the spam action and ask for confirmation before moving.
2011-04-01 03:45:50 +02:00
cketti
ea9213cd4d Converted some more confirmation dialogs to use ConfirmationDialog 2011-04-01 03:40:08 +02:00
cketti
ac148a1ef7 Extracted confirmation dialog creation to ConfirmationDialog
Confirmation dialogs in MessageList and MessageView now use the new
ConfirmationDialog class.
2011-04-01 03:17:47 +02:00
cketti
449d4df2a9 Minor code cleanup 2011-04-01 03:13:23 +02:00
Archibald Sheran
80f055a0a7 Issue 2296 Spam message 2011-04-01 05:54:51 +08:00
DraSine on Rails
e698c78190 Fixed gcode #3182
Sending mail (SMTP) doesn’t work is the SMTP server is picky about RFC
conformance of envelope dialogue.

k9mail:

MAIL FROM: <sender@dom.ain>
RCPT TO: <receiver@dom.ain>

rfc:

MAIL FROM:<sender@dom.ain>
RCPT TO:<receiver@dom.ain>
2011-03-31 21:41:03 +08:00
cketti
d5197fdc56 Put all import code in StorageImporter
Get rid of StorageImporterEncryptedXml and IStorageImporter. Also
AsyncUIProcessor is now obsolete.
2011-03-30 21:00:34 +02:00
cketti
45afa3a747 Make XML element/attribute names for export public 2011-03-30 20:56:26 +02:00
cketti
49e30b1be4 Export settings sorted by key 2011-03-30 06:44:16 +02:00
cketti
70f9a7b852 Granted some account/identity keys their own XML element (export) 2011-03-30 06:37:10 +02:00
cketti
8850915987 Add method to export an encrypted settings file 2011-03-30 05:31:48 +02:00
cketti
6258118ed6 Write identity elements in correct order (export) 2011-03-30 05:08:49 +02:00
cketti
29c42eb1a3 More structure for the XML export (folder settings) 2011-03-30 04:57:05 +02:00
cketti
83b2972a13 Rename "settings" tag to "global" for global settings (export) 2011-03-30 04:23:54 +02:00
cketti
24785bab66 More structure for the XML export (identity) 2011-03-30 03:55:14 +02:00
cketti
77f7303aa2 Use constants for element names and attributes in XML export code 2011-03-30 00:21:15 +02:00
cketti
fbe1b26f24 Reflect some of the settings structure in exported XML 2011-03-29 07:08:29 +02:00
cketti
81931967a9 Fix code so accounts are exported when exporting everything 2011-03-29 06:59:02 +02:00
cketti
0ac406d3cd Removed per key/value encryption on export 2011-03-29 06:15:58 +02:00
cketti
c36182f586 Use XmlSerializer instead of writing XML tags manually 2011-03-29 05:27:18 +02:00
cketti
9a78145e22 Merge StorageExporterEncryptedXml into StorageExporter 2011-03-29 04:27:41 +02:00
cketti
84f4331766 Disable import for now 2011-03-28 08:12:12 +02:00
cketti
6510919eee Moved export to file code from Accounts activity into StorageExporter 2011-03-28 08:04:43 +02:00
cketti
f5c153b405 Get rid of StorageFormat 2011-03-28 07:25:07 +02:00
cketti
97f493c881 Get rid of ExportListener 2011-03-28 07:18:47 +02:00
cketti
1d146278b0 Moved password input dialog for export to Accounts activity. 2011-03-28 01:55:46 +02:00
cketti
a559a35249 Use AsyncTask instead of AsyncUIProcessor for export 2011-03-28 01:18:36 +02:00
danapple
ad4c7f7071 UUIDs could have been generated by different generators within the
same instance due to local upgrades of K-9 Mail.
2011-03-27 15:27:14 -05:00
danapple
90e88c251e Explanation of the reasons for mapping imported UUIDs into new local
UUIDs.
2011-03-27 13:14:36 -05:00
danapple
e5ef068c15 Move the generation of the XML envelope to a common place since it
would be used in all storageFormats.  StorageImporter uses the header
to figure out which specific import implementation to use.
2011-03-27 11:37:43 -05:00
Jesse Vincent
03d05e9331 If an SMTP server tells us how big the biggest message they accept is,
don't even try to deliver it to them
2011-03-27 23:09:41 +08:00
Jesse Vincent
97ec38d03f Move our IMAP Store to using a message's sizing method 2011-03-27 23:09:41 +08:00
Jesse Vincent
4f63a3de24 Add a pair of methods to help optimize countingmessagestream 2011-03-27 23:08:25 +08:00
Jesse Vincent
604e532879 Add a method to calculate a message's serialized size 2011-03-27 23:08:25 +08:00
Jesse Vincent
c8d38da568 Pull out the maximum acceptable message size from SMTP servers that tell
us when we EHLO.

Next step is to _use_ this data.
2011-03-27 23:08:25 +08:00
Jesse Vincent
0bded12843 Kill off ExportHelper. It had become clutter that was only used once 2011-03-27 13:09:26 +08:00
Jesse Vincent
b3b8302c52 Remove some vestiges of HashSet 2011-03-27 12:40:00 +08:00
Jesse Vincent
9deeaf9c11 No longer export global settings when exporting one account 2011-03-27 12:03:23 +08:00
Jesse Vincent
52825f409f As suggested by cketti, HashSet -> Set in our method signature
definition
2011-03-27 11:37:37 +08:00
cketti
087feb478b First step at replacing the term "version" with "storageFormat" 2011-03-26 07:19:20 +01:00
cketti
4bdc20c127 Rename StorageVersioning to StorageFormat 2011-03-26 07:00:53 +01:00
cketti
18cefedf32 Get rid of the STORAGE_VERSION enum in StorageVersioning 2011-03-26 06:59:45 +01:00
cketti
26258d7666 Removed unused imports 2011-03-26 06:43:39 +01:00
Jesse Vincent
fd38dc3519 Further wordings cleanups 2011-03-25 17:15:46 +11:00
Jesse Vincent
b4a43893a3 Lift the choice of which accounts to export all the way up to
Accounts.java in advance of adding a dialog
2011-03-25 16:28:14 +11:00
Jesse Vincent
b8949abaca Kill some now-dead and duplicate code 2011-03-25 15:56:25 +11:00
cketti
c9510f8f16 Merge branch 'mime_type_rewriting' 2011-03-25 01:31:27 +01:00
cketti
0aa03ccdc4 Extract MIME type fixup code to method MimeUtility.getMimeTypeForViewing() 2011-03-25 00:37:53 +01:00
cketti
522634fba7 Extend AttachmentProvider to be able to get "raw" attachment
AttachmentProvider can now return an attachment with an unmodified
MIME type. However, when viewing attachments this is not desirable. So
we try hard to return a sensible MIME type (use extension to look up
a MIME type if it's originally "application/octet-stream"; or replace
with canonical MIME type if it's known to be wrong, e.g.
"image/jpg" -> "image/jpeg")
2011-03-24 23:36:59 +01:00
cketti
7c5c29e87e Move MIME type fixing to AttachmentProvider 2011-03-24 23:07:46 +01:00
cketti
f3e4618702 Cosmetic + documentation changes 2011-03-24 23:04:58 +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
Apoorv Khatreja
fa5901d404 Fixed issue 873 where JPEG images with the MIME type "image/jpg" failed to open on some Motorola phones. 2011-03-25 05:45:54 +08:00
cketti
83451cff10 Merge branch 'remove_non_api_dependencies' 2011-03-24 19:35:12 +01:00
cketti
277c358f87 Cache information whether or not contact picker intent is available for this device. 2011-03-24 05:19:42 +01:00
cketti
b6561c8b29 Cosmetic changes 2011-03-24 05:16:25 +01:00
cketti
55440f8a18 Fixed javadoc comments 2011-03-24 05:16:25 +01:00
danapple
fd468e95fb Specify a particular mime type. Although the K-9 settings file mime
type will not be generally known, specifying something in particular
means that only file browsers that can handle */* will used as options
in the chooser.  In my tests, OI File Manager responds immediately (and
the chooser is bypassed) and the camera, music and ringtone selectors
are not provided as options.
2011-03-23 00:00:24 -05:00
danapple
0a0cfac1cb Better internationalization, using real Android pluralization API. 2011-03-22 22:59:30 -05:00
Jesse Vincent
e19162cb86 ant astyle 2011-03-22 18:07:47 +11:00
Jesse Vincent
81644d0f4b Initial support for a button to look up contacts in a contact provider 2011-03-22 18:07:47 +11:00
danapple
3f45df2bd4 Astyle recent changes for StorageManager listener. 2011-03-20 15:37:51 -05:00
danapple
8e5c50a8ef astyle 2011-03-20 15:21:24 -05:00
danapple
2e7a785209 Clarify logic for when an importer needs a password prompt. 2011-03-20 12:01:29 -05:00
danapple
89bdbdce94 Build a structure to allow for more easily creating new versions of
preferences Storage importers/exporters.  Password/encryption key
prompting is now down in centralized place.  On import, the password
prompt is given if the file to be imported uses an importer
implementation that requires a password and no password is provided.
On export, the password prompt is given if the chosen version is for
an exporter that requires a password and no password was provided.

For instance, for automatic backups, a password could be stored in
preferences and provided to the exporter, so no password prompt would
be given.
2011-03-20 11:52:13 -05:00
danapple
90fc3d2c8d Grey out unavailable accounts.
Display a short toast when attempting to open an unavailable account.

Conflicts:

	res/values/strings.xml
	src/com/fsck/k9/activity/Accounts.java
2011-03-19 12:36:58 -05:00
HIRANO Takahito
6c37741e63 Could not handle iso-2022-jp streams which contain continuous escape
sequences.

Signed-off-by: HIRANO Takahito <hiranotaka@zng.info>
2011-03-19 18:05:07 +09:00
danapple
c3cc43675b Grey out unavailable accounts.
Display a short toast when attempting to open an unavailable account.
2011-03-16 17:05:41 -05:00
cketti
330737c4c6 Fix length-check of BODYSTRUCTURE reply
Fixes issue 3116
2011-03-15 08:34:38 +01:00
steiler
e2a7a55cf3 Issue 3104: Can't bcc to more than 1 address 2011-03-14 19:28:44 -04:00
mwolschon
6fa1f39fcc merging refs/remotes/origin/master into HEAD 2011-03-14 13:38:08 +01:00
mwolschon
0be4f95430 update issue 3130
"Allow filtering in FolderList"
2011-03-14 13:37:22 +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
Jesse Vincent
daf04c2a9c When showing the root cause of a controller failure, show a better
message if the exception wasn't generated internally
2011-03-09 22:45:57 -05:00
Jesse Vincent
a54cf7a757 Tempfail outgoing messages after 5 delivery attempts 2011-03-09 22:45:57 -05:00
Jesse Vincent
2affa9d52b Permanent failures when trying to deliver a message move it back to
drafts.

Opening a "permfail" message takes you to the drafts folder
2011-03-09 22:45:57 -05:00
Jesse Vincent
d80a941dba Split out "tempfail" and "permfail" message deliver errors 2011-03-09 22:45:57 -05:00
Jesse Vincent
c305397d05 Fix "sending message failed" notifications to actually report the server
error
2011-03-09 22:45:57 -05:00
Jesse Vincent
9996d80080 When making sure not to offer up the outbox as a potential folder for
things like Drafts or Inbox, use a case-insensitive comparison
2011-03-09 16:32:25 -05:00
Jesse Vincent
79a4557500 Switch K-9 to using the SMTP submission port rather than the regular
server-to-server transport port.
2011-03-09 00:21:16 -05:00
baolongnt
06ecc11ee7 Merge commit '4586ba560e3498ead43fc4eacb7a92a3ce62de75'
Merged branch issue-3060 to master: Option to hide special accounts
2011-03-06 16:53:21 -08: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
danapple
4f59a04fd5 Make importer usable by other things handling InputStreams, like a
facility to use the Android-wide Backup Service.
2011-03-03 10:14:19 -06:00
danapple
9224876768 Make exporter usable by other things handling OutputStreams, like a
facility to use the Android-wide Backup Service.
2011-03-03 10:00:58 -06:00
danapple
fdb38da2e5 Discourage accidental deletion of essential mime types. 2011-03-02 19:28:36 -06:00
Andrew Chen
5a22137d54 Use <pre> instead of <div> so that plain text clients get the line wrapping correct. 2011-03-02 08:17:36 -08:00
danapple
32b5afc702 astyle 2011-03-02 07:34:54 -06:00
danapple
107408c0d9 K-9 Mail now opens the Accounts Activity when started with an Intent
with an enclosed URI with a content type of application/x-k9settings.
This allows a user to bootstrap K-9 Mail configuration by email a
settings file from one device to another, perhaps using a GMail
account on the receiving end.
2011-03-01 22:34:41 -06:00
danapple
d9cb84047b Delete obsolete import 2011-03-01 21:43:43 -06:00
danapple
88f6034cbb When emailing a K-9 settings export file, use specific special content type. 2011-03-01 21:43:11 -06:00
danapple
9cd5f61539 Change import/export completion Toasts to Dialogs. 2011-03-01 21:21:00 -06:00
Koji Arai
da34a5ec8c Avoid IllegalArgumentException for Charset.forName(null). 2011-03-02 00:59:20 +09:00
danapple
8a3e1336e0 Although I believe SimplyCrypto was made available without
restriction, with no license, K9Krypto is a completely new, completely
taint-free implementation of encryption for K-9 Mail settings files.

Also, K9Krypto reuses the cryptography infrastructure
between strings, so should be more efficient.
2011-02-28 21:27:58 -06:00
cketti
203dab5c64 Revert changes for issue 549 (import/export settings).
The feature will be polished in branch "issue549".
2011-02-28 22:55:34 +01:00
danapple
7b82061535 Add provenance explanation. 2011-02-27 22:22:09 -06:00
danapple
a756f70eb6 Turn off some logging 2011-02-27 13:36:36 -06:00
danapple
a7e134164f Handle pluralization of import toasts. 2011-02-27 13:35:59 -06:00
danapple
932d178679 Merge branch 'issue549'
Conflicts:
	src/com/fsck/k9/Account.java
	src/com/fsck/k9/K9.java
	src/com/fsck/k9/Preferences.java
	src/com/fsck/k9/activity/Accounts.java
	src/com/fsck/k9/activity/ActivityListener.java
	src/com/fsck/k9/activity/ChooseFolder.java
	src/com/fsck/k9/activity/FolderInfoHolder.java
	src/com/fsck/k9/activity/FolderList.java
	src/com/fsck/k9/activity/K9Activity.java
	src/com/fsck/k9/activity/K9ListActivity.java
	src/com/fsck/k9/activity/MessageList.java
	src/com/fsck/k9/activity/MessageReference.java
	src/com/fsck/k9/activity/MessageView.java
	src/com/fsck/k9/activity/setup/AccountSettings.java
	src/com/fsck/k9/controller/MessagingController.java
	src/com/fsck/k9/crypto/Apg.java
	src/com/fsck/k9/helper/DateFormatter.java
	src/com/fsck/k9/helper/DomainNameChecker.java
	src/com/fsck/k9/mail/Address.java
	src/com/fsck/k9/mail/internet/MimeHeader.java
	src/com/fsck/k9/mail/internet/MimeMessage.java
	src/com/fsck/k9/mail/internet/MimeUtility.java
	src/com/fsck/k9/mail/store/ImapStore.java
	src/com/fsck/k9/mail/store/LocalStore.java
	src/com/fsck/k9/mail/store/WebDavStore.java
	src/com/fsck/k9/mail/transport/SmtpTransport.java
	src/com/fsck/k9/view/AttachmentView.java
2011-02-27 13:09:38 -06:00
danapple
807f85d38e Astyling recent change 2011-02-27 11:10:32 -06:00
danapple
f0a8d2edee Update date formatter on when importing preferences. 2011-02-26 19:28:47 -06:00
danapple
ad3dd07a7a astyle-d 2011-02-26 18:39:06 -06:00
cketti
4724848a5a Merge branch 'focus_to_box' 2011-02-27 01:26:04 +01:00
cketti
766674c27c Code/comment cleanup 2011-02-26 23:04:49 +01:00
cketti
6686b3e993 Merge branch 'remove_bouncycastle_dependency' into HEAD 2011-02-26 22:59:48 +01:00
Jesse Vincent
c7a3b28289 Change our technique for sending \r\n at the end of smtp commands to
deal with a weird failure on honeycomb
2011-02-26 16:53:53 -05:00
danapple
6dc94fb78e First mostly working copy of export/import. Committing while I sort
out how to use git.
2011-02-26 11:31:56 -06:00
cketti
6f90d791b5 Removed dependency on (external) commons-codec and commons-logging 2011-02-26 17:36:18 +01:00
cketti
77f4625cd9 Use SslCertificate that is part of the official Android API instead of
BouncyCastle's X509Name (which is not shipped anymore in Android 3.0)
to verify domain names on SSL/TLS connections.
2011-02-26 16:57:58 +01:00
baolongnt
457479cd43 Removed dup check (keeping the more explicit one) per cketti recommendation 2011-02-25 14:49:39 -08:00
baolongnt
fce2fc12d0 Implemented option to hide special accounts (issue 3060) 2011-02-25 12:36:47 -08:00
cketti
daf92a7b95 Use FLAG_ACTIVITY_NEW_TASK when starting activity
for SHOW_OR_CREATE_CONTACT.
2011-02-25 19:15:13 +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
Matt Johnston
eb9fca69c6 Don't need to reparse addresses from database 2011-02-21 02:45:40 +08:00
cketti
0c02fb1027 Merge branch 'open-attachment' 2011-02-20 19:31:42 +01:00
cketti
d354905f21 Cosmetic changes 2011-02-20 19:18:17 +01:00
cketti
5f0e51caa9 Added a comment 2011-02-20 19:02:42 +01:00
Jan Berkel
41378188f9 Updates to the view need to happen on the UI thread
Fixes downloading attachments (would just fail silently)

  Also added a ProgressDialog since progress() just asks for
  progress to displayed in the title bar. Since there is no title bar,
  no progress is shown at all.
2011-02-20 18:49:55 +01:00
Jan Berkel
cc0b935b38 Performance fix: Use ListView#addFooterView to add the footer
The previous approach (generating the view in the adapter) kills performance
  because list views cannot be recycled anymore, as soon as the user scrolls to
  the bottom of the list. The Android ListView widget already provides support
  for list header/footers, so use them.
2011-02-20 17:47:06 +01:00
cketti
ea590cbe39 Removed unused import + constant 2011-02-20 06:25:19 +01:00
cketti
a79b7ea93c Inlined methods that were extracted to use
@SuppressWarnings("unchecked"). That's now unnecessary after the
Serializable -> Parcelable switch
2011-02-20 06:23:06 +01:00
cketti
bb40049212 Remove unused imports 2011-02-20 05:31:35 +01:00
cketti
ad159b3093 Merge branch 'hardcoded_outbox' into HEAD 2011-02-20 05:14:22 +01: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
HIRANO Takahito
580d19ec17 Allow emoji input in subjects.
Signed-off-by: HIRANO Takahito <hiranotaka@zng.info>
2011-02-20 10:15:50 +09:00
Jan Berkel
a7a690e6ff Simplify getTextForDisplay() and fix a potential ClassCastException 2011-02-19 15:25:09 -05:00
Jan Berkel
685df0ff67 Perf improvement: use parcels instead of serializable
Standard Java serialization is slow on Android. Replacing it w/
  parcelable makes it around 10x faster (on a N1, with ~ 500 messages
  in the list).

  To avoid further confusion and potential bugs MessageReference was
  made no longer implement Serializable.
2011-02-19 15:24:53 -05:00
Koji Arai
68381d4725 Should not use double-quoted empty string.
Some host may reject such the From address.
2011-02-17 00:41:55 +09:00
wongk
5c6e86006d Support non-English Exchange installations. 2011-02-15 19:05:08 -05:00
Jesse Vincent
8a778a0222 reformatting 2011-02-14 20:45:08 -05:00
Jesse Vincent
fb663508e0 remove an unused method 2011-02-14 20:44:53 -05:00
Jesse Vincent
143ca4df26 replace redundant calls with a helper 2011-02-14 20:26:00 -05:00
Jesse Vincent
ea6e5e0e62 Lifting more of the "Show this message" over to the SingleMessageView 2011-02-14 13:40:49 -05:00
Jesse Vincent
dc1444d1ac Rename a method that was confusingly similar to another method 2011-02-14 13:32:30 -05:00
Jesse Vincent
10da146e93 clean up unused imports 2011-02-14 13:32:25 -05:00
Jesse Vincent
5aad882976 Move the "isScreenReader" active code down into the MessageView 2011-02-14 13:32:14 -05:00
Jesse Vincent
04bc32db9e move a call to setLoadPictures down 2011-02-14 13:31:43 -05:00
Jesse Vincent
043535f7a5 Migrate a method into SingleMessageView 2011-02-14 13:31:34 -05:00
cketti
e70d091433 Explicitly set focus to "To:" input field when composing or forwarding
a message.
2011-02-14 08:28:03 +01:00
Jesse Vincent
260b933a3b Move the "update the title" code from almost every single
ActivityListener callback to the superclass, removing the need for many
sublcass methods
2011-02-13 21:20:22 -05:00
Jesse Vincent
7cbbd72fac Astyle 2011-02-13 21:20:21 -05:00
Jesse Vincent
4e48366243 Remove more redundant checks 2011-02-13 21:20:21 -05:00
Jesse Vincent
be106c21a1 remove completely redundant code from batch archive/spam codepaths. (It
duplicated code in the batch move codepath)
2011-02-13 21:20:21 -05:00
cketti
35f0b953c2 Merge branch 'share_extras' 2011-02-13 05:24:49 +01:00
cketti
44d2194a00 Add extra for the sender address(es) to the "Share intent" 2011-02-13 05:23:18 +01: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
0d0415e705 use a single layout inflater for loading attachments 2011-02-11 12:13:18 -05:00
Jesse Vincent
e099337c52 remove dead code 2011-02-11 12:12:52 -05:00
Jesse Vincent
20623dc18a slight clean up to cryptoprovider view interface 2011-02-11 12:12:09 -05:00
Jesse Vincent
abc921093c refactor display of the download button 2011-02-11 12:11:21 -05:00
Jesse Vincent
9deea33426 re-enable setOnFlagListener 2011-02-11 12:10:45 -05:00
Jesse Vincent
06baf3f602 simplify the "load a url for the message body" signature 2011-02-11 12:09:47 -05:00
Jesse Vincent
111b9a6305 remove a pointless indirection and an extra method call to set the
options menu when we didn't need to
2011-02-11 11:16:50 -05:00
Jesse Vincent
49b35f9236 More reshuffling toward having a reusable "Show a message" widget - what
should eventually be a Fragment.

Lifted part of the cryptoView back up to the activity since the
factoring felt forced.
2011-02-11 10:59:31 -05:00
Jesse Vincent
d634bcb381 Switch the Message view to our new SingleMessageView 2011-02-10 19:31:15 -05:00
Jesse Vincent
015baa06b4 Renamed "next" and "previous" buttons to match code style 2011-02-10 16:39:49 -05:00
Jesse Vincent
fe21d6951f remove unused method 2011-02-10 16:39:49 -05:00
Jesse Vincent
98f3909ecc Split out a "clear the current message view" method 2011-02-10 14:56:56 -05:00
Jesse Vincent
a3793ac651 Merge branch 'crypto-view'
* crypto-view:
  Move as much of the Apg code as possible to its own "view" class (should eventually be a fragment?)
  Bumped manifest to 3.702
2011-02-10 14:20:09 -05:00
Jesse Vincent
850aee9008 Move as much of the Apg code as possible to its own "view" class
(should eventually be a fragment?)
2011-02-10 14:02:21 -05:00
mwolschon
673b1fdf94 bugfix for
2e981afaed
( forgot a call to finish() )
2011-02-10 07:59:29 +01:00
Andrew Chen
a51daf9798 Use interface Map.Entry. 2011-02-09 11:06:01 -08:00
cketti
14abb68772 Get rid of the "Fwd: " prefix when sharing a message. Add recipients
to the intent ("To:" -> EXTRA_EMAIL, "CC:" -> EXTRA_CC)
2011-02-09 07:08:10 +01:00
cketti
7e824fc748 Log error message when switching local storage provider fails. 2011-02-09 06:58:06 +01:00
Marcus Wolschon
2e981afaed if account is not ready (sd-card removed), fall through to the
"else"-case, so onItemClick -handler still gets registred.
Else inserting the SD-card without leaving the activity,
THEN clicking the account will not do anything.
2011-02-08 08:56:08 +01:00
Jesse Vincent
2aee63e242 make it possible to define Providers that don't require
username+password auth
2011-02-07 22:07:31 -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
bb1e66c70d If android's content-type lookup says "why yes, I have no idea what that
is", at least look at our local list
2011-02-07 20:33:46 -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
Andrew Chen
cc9d6ac5ea Add button to allow editing of quoted message in HTML mode by dropping user back to text mode. Fixes issue 2959. 2011-02-05 15:14:02 -08: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
4842051de6 Immediately update the title bar when the syncing status changes due to external events. 2011-02-04 23:19:06 -05:00
Andrew Chen
19d863ee41 Move linkification into a separate method. Linkify text in textToHtmlFragment. Fixed Issue 2951. 2011-02-04 23:19:06 -05:00
Andrew Chen
1b37fc69f6 Another potential NPE fix. 2011-02-04 23:19:06 -05:00
Dan Applebaum
e31d218dc5 At Jesse's suggestion, avoid the use of the Android term-of-art "density". Instead use "Compact layouts" to refer, both internally and externally, to the feature of elminating minimum sizes on UI elements and other minor layout changes for maximizing information quantity to be displayed on a page.
Others are free to adjust the user-facing text further.
2011-02-04 23:19:06 -05:00
Andrew Chen
66f6999c53 Fix for NPE introduced in r3258. 2011-02-04 23:19:06 -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
Dan Applebaum
ea3619b733 Display a message in the titlebar when K-9 Mail is not performing any message synchronization. This state will happen when no network is available, when background ops/background data/auto-sync settings turn off synchronization, or when no account is set for polling or pushing.
This revision respects the intention of r3011 that when K-9 Mail is
set for pushing only no message is displayed, as that condition is a
normal state.  However, it provides valuable feedback in other cases
that synchronization is off-line, as was done in r1433.

Although the case when the user has intentionally set no account for
polling or pushing can be considered "normal" and therefore unworthy
of a message, it turns out to be a significant burden to detect that
situation when the network is offline, since we normally do not even
try to figure out the account configurations in that case.  Therefore,
without making substantial, otherwise unwarranted, changes to
MailService.java, "Syncing off" would be displayed sometimes to such a
user, and sometimes not.  Since it is presumably a rare case, and
there is minimal harm to display the "Syncing off" message, the
message will be consistently displayed when no account is set for
polling or pushing.

Note to translators:
"Syncing off" is different than "Polling off".  The new phrase "Syncing
off" means that K-9 Mail is not performing any synchronization with
any mail server.  The prior non-English phrases for "Polling off" are
currently in-place as translations for "Syncing off", as it seems that
the meanings are close enough that it would be better to show the
obsolete translations that to fallback to the English "Syncing off".
However, better translations of "Syncing off" would be welcome.
2011-02-04 23:19:06 -05:00
Andrew Chen
33e5520a9d Mark messages as ANSWERED only on send. Save a reference to the message in the identity so that loading a draft of a reply also marks the referenced message correctly. 2011-02-03 06:32:29 +00:00
Daniel Applebaum
6c03c968ef Provide for users with good eyesight to completely take advantage of the
"smaller" (and smaller) fonts by allowing the Accounts and Folder List
items to have a height smaller than the normal Android minimum.  This
option is off by default to maintain existing behavior for
uninterested parties.  The preferences text is not especially
compelling so could certainly be changed if better phrasing is found.
2011-02-03 03:42:45 +00:00
Andrew Chen
5fa757bba1 Only include name with an address if it's non-empty. 2011-02-03 03:35:50 +00:00
Jesse Vincent
ff0f517cbb Configure MIME4J to not die when there are long header lines or a large message header 2011-02-01 20:48:20 +00: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
fbb62ff158 Replaced our local copy of jzlib with a clean jar built from jzlib 1.0.7
downloaded from jcraft: http://www.jcraft.com/jzlib/jzlib-1.0.7.tar.gz

Built using the following build.xml (since jzlib doesn't include one)

<project>
    <target name="clean">
        <delete dir="build"/>
    </target>
    <target name="compile">
        <mkdir dir="build/classes"/>
        <javac srcdir="com" destdir="build/classes"/>
    </target>
    <target name="jar">
        <mkdir dir="build/jar"/>
        <jar destfile="build/jar/jzlib.jar" basedir="build/classes"></jar>
    </target>
</project>
2011-01-31 18:26:01 +00:00
Jesse Vincent
4cc114c568 Replaced local version of jutf7 with a homebuilt jar from:
URL: https://jutf7.svn.sourceforge.net/svnroot/jutf7/trunk
Repository Root: https://jutf7.svn.sourceforge.net/svnroot/jutf7
Repository UUID: 1064e9db-3825-0410-a553-84549dc1c2c0
Revision: 20
Last Changed Author: jtbeetstra
Last Changed Rev: 20
Last Changed Date: 2010-04-22 11:31:16 -0400 (Thu, 22 Apr 2010)
2011-01-31 18:25:52 +00:00
Jesse Vincent
2ce5b9ed03 Replace Apache Commons IO with v2.01 downloaded from apache.org as a
prebuilt JAR
2011-01-31 18:25:26 +00:00
Jesse Vincent
7b2cd531ca Start building using a JAR of MIME4J 2011-01-31 17:19:58 +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
Andrew Chen
fe8ba6078e Propagate the ACTION_DOWN event to the ScrollView so we can stop scrolling after a fling. Fixes issue 2892. 2011-01-30 22:05:47 +00:00
Jesse Vincent
65dc3c7d1b Fix display of icon in About box on Android 2.1 and earlier 2011-01-30 15:11:16 +00:00
cketti
bec094326a Make decodeQ() actually use the "fixed up" string. Will fix Q-encoded subjects where space is encoded as "_".
Fixes issue 2926
2011-01-30 03:00:46 +00:00
HIRANO Takahito
07814db9f4 Fix range check for ISO-2022-JP stream.
Signed-off-by: HIRANO Takahito <hiranotaka@zng.info>
2011-01-29 17:56:58 +00:00
cketti
555e6431b2 Add credits for third-party libraries and emoji icons to about box 2011-01-29 02:49:39 +00:00
Kris Wong
88d0af16a5 Updated Exchange setup view. 2011-01-28 22:45:10 +00:00
Andrew Chen
13898f7edf Fix the way newlines are added in HTML mode. 2011-01-28 21:41:06 +00:00
Jesse Vincent
5e7982a31b first pass at a better about box 2011-01-28 18:30:35 +00:00
cketti
a213ca2fb7 Correctly parse email addresses (from contacts). Could be of the form "User name <user@example.com>".
Fixes issue 2920
2011-01-28 06:01:10 +00:00
Jesse Vincent
4a558c5ac5 Revert the active part of "Update issue 848"
This reverts commit 9fc94115adb58dcd8a64227a93d0e6e707d7752d.

It turns out that disabling the "View attachment" button (rather than
giving a useful error message telling the user what mime type the app
needs to support) was confusing to users.
2011-01-28 03:33:49 +00:00
Andrew Chen
840fa7bf40 Replace concatenation in StringBuilder with append. 2011-01-25 04:25:27 +00:00
Andrew Chen
ba1709770e Issue 854 - Fix reply after quote in HTML mode. 2011-01-25 03:56:19 +00:00
cketti
e5b172b7bb Fix warnings 2011-01-25 02:36:08 +00:00
cketti
737edf369b Use new contacts API on Android 2.0, 2.0.1, and 2.1 devices with additional code to match by phonetic names.
Fixes issue 2906
2011-01-25 02:34:02 +00:00
cketti
de9f04ea0d Avoid IllegalArgumentException - Only fetch display name in getOwnerName() 2011-01-25 02:29:31 +00:00
cketti
57be868668 Added some comments 2011-01-25 01:32:31 +00:00
Marcus Wolschon
ba24fdc742 update issue 2744
try all addresses of a host.
(Fix is required for proper operation in IPv4-only/IPv6-only networks
 for IPv4/IPv6 dual-stack mail-hosts)
2011-01-24 15:09:36 +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
cketti
6a2233cdd0 Removed unnecessary imports 2011-01-23 13:59:15 +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
Jesse Vincent
098851684f astyle 2011-01-23 00:56:01 +00:00
Jesse Vincent
c06643bd47 Add a preference to allow users to always show email addresses instead
of the "friendly" parts of email addresses.
2011-01-23 00:55:46 +00:00
Jesse Vincent
a234c39722 astyle 2011-01-19 21:33:23 +00:00
Jesse Vincent
8329a0287b Upgrade to mime4j. "0.7" branch as of
http://svn.apache.org/repos/asf/james/mime4j/trunk@1058339
2011-01-19 21:32:09 +00:00
cketti
f5bb836087 Fix code that was broken when fixing warnings. 2011-01-19 21:00:28 +00:00
Andrew Chen
b1d8e49d72 Be a little more graceful when scrolling horizontally in a (vertical) scroll view.
Not quite to the point of diagonal scrolling, but hopefully closer.
2011-01-19 17:05:56 +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
4e11c17ff5 Removed unnecessary type cast 2011-01-19 01:28:27 +00:00
cketti
7119c7165f Removed unnecessary type casts 2011-01-19 01:21:27 +00:00
cketti
14a20843e3 Get rid of two potential null pointer access warnings 2011-01-19 00:57:12 +00:00
cketti
365b106753 Fixed warnings about unchecked casts by extracting the code to methods and using the @SuppressWarnings annotation on them. 2011-01-19 00:36:15 +00:00
cketti
d48ec4892a Added missing annotation 2011-01-19 00:33:19 +00:00
cketti
a9cee7a6ad Rewrote code to get rid of return statement in finally block (which generated a warning). 2011-01-19 00:23:56 +00:00
cketti
72d2d24cec Fixed potential null pointer access 2011-01-19 00:13:58 +00:00
cketti
8f2623e33c Rewrote code to be easier to read and not raise a potential null pointer warning by Eclipse. 2011-01-19 00:10:36 +00:00
cketti
6a9a5f6b1f Added a null pointer check to make the static analysis component of Eclipse happy 2011-01-19 00:00:58 +00:00
cketti
8279092070 Fixed lots of warnings (unused imports/variables, missing annotations, etc.) 2011-01-18 23:54:49 +00:00
cketti
a40ec8fa98 Removed unused variables and imports. 2011-01-18 23:37:37 +00:00
Marcus Wolschon
60ea4c6ce7 Update issue 2479
possible fix for "The content of the adapter has changed but ListView did not receive a notification."
2011-01-18 15:34:41 +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
Jesse Vincent
d59600653c astyle 2011-01-18 00:04:11 +00:00
Jesse Vincent
bd66315375 Visual cleanup of messageview. Clean up of icon display codepaths 2011-01-17 17:25:00 +00:00
Marcus Wolschon
fc4b64c559 Update issue 848
"view" only enabled for attachments if there is an actual
application on the phone to view this kind of file.
2011-01-17 10:41:48 +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
5a5541b400 Don't notify for new mail in a designated spam folder 2011-01-16 21:33:54 +00:00
Jesse Vincent
734cbf856d Simplify the logic for "should I search this folder" using our new
helper
2011-01-16 21:33:50 +00:00
Jesse Vincent
a974f7188c Simplify folder-skip logic when cleaning out folders deleted on the
server. (Note that we no longer delete the archive folder locally, even
if it's killed upstream)
2011-01-16 21:33:46 +00:00
Jesse Vincent
c5846b4202 simplify our "should we count messages in this folder" logic for the
purposes of account stats generation
2011-01-16 21:33:43 +00:00
Jesse Vincent
76e1165fea we no longer need the special version of getDisplayClass 2011-01-16 21:33:39 +00:00
Jesse Vincent
574c544d64 new helper routine for checking to see if a folder is special. 2011-01-16 21:33:34 +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
711b4763e9 Tweak our message list subject default a bit bigger to set it off from the other text. 2011-01-14 03:54:00 +00:00
Jesse Vincent
aacb414004 astyle 2011-01-14 01:37:52 +00:00
Jesse Vincent
8bb7613471 Update URL regexes by importing from AOSP and then from IANA 2011-01-14 01:37:46 +00:00
Jesse Vincent
d1a1b12aae Support emoji in subjects.
Signed-off-by: HIRANO Takahito <hiranotaka@zng.info>
2011-01-14 00:53:19 +00:00
Jesse Vincent
e36ead77c4 ant doesn't like the unicode symbol 2011-01-13 16:28:57 +00:00
Jesse Vincent
da22ffdcea standardize the formats of our wakelock messages to be able to better audit them 2011-01-13 01:18:40 +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
Andrew Chen
ed4aec26f1 Removed bogus javadoc param. 2011-01-12 06:24:00 +00:00
Andrew Chen
c07c7052dc Add Notification setting to disable unread count in notification bar. 2011-01-12 01:23:17 +00:00
Andrew Chen
a17c21f0cd Add null check in header view to prevent NPE. 2011-01-11 22:25:06 +00:00
cketti
ba6a92b432 Removed unnecessary import. 2011-01-11 03:49:11 +00:00
cketti
a03f75dd5e Updated javadoc comment 2011-01-11 03:48:30 +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
Andrew Chen
b4635e53b5 When editing a draft, only show the BCC field if it has entries other than the auto-bcc for that account.
This makes draft editing behavior the same as new composition.
2011-01-11 02:49:00 +00:00
Andrew Chen
e19f742678 Consolidate exception catching in processSourceMessage into a single try/catch block.
Add error logging if we do have an exception.
2011-01-10 20:12:08 +00:00
Jesse Vincent
9d5704c0f5 Split the Header view out from the MessageView activity 2011-01-10 17:47:28 +00:00
Jesse Vincent
052695af83 Simplify Contacts API 2011-01-10 17:47:23 +00:00
Jesse Vincent
0ca6adfbf8 move DateFormatter from Activity to Helper 2011-01-10 17:47:16 +00:00
Andrew Chen
5fe33f2c62 remove dead isInUse code. 2011-01-07 21:41:27 +00:00
Jesse Vincent
b2c44579d2 lift "displayMessage" out of a callback 2011-01-06 16:56:55 +00:00
Jesse Vincent
39ef6584a8 continue to extract attachment code out to AttachmentView 2011-01-06 16:56:37 +00:00
Jesse Vincent
19c5324316 Extract AttachmentView and MediaScannerNotifier into their own classes 2011-01-06 16:56:20 +00:00
Jesse Vincent
ed60cdfa5a replace constant lookups of the MessagingController instance with a locally cached one 2011-01-06 16:56:02 +00:00
Jesse Vincent
299c057cd4 minor code cleanup 2011-01-06 16:55:48 +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
Andrew Chen
aa0eeac736 Show the correct quote style options at preference load time. 2011-01-06 07:05:57 +00:00
Andrew Chen
f9ddc7eb06 Remove extraneous colon. 2011-01-06 01:34:08 +00:00
Andrew Chen
74e6384236 Fix potential NPE. 2011-01-06 01:31:28 +00:00
cketti
f9f6160719 Correctly encode/escape strings when used in IMAP commands.
Fixes issue 2832
2011-01-06 00:39:09 +00:00
Andrew Chen
5fef7f3b07 Add support for Outlook-style quote headers as a preference under Account Settings -> Sending Mail.
Refactor forwarding header (header-style quote header) into individual string pieces that are assembled in code to accommodate future HTML version of headers.
Introduced four new strings for translation.
2011-01-05 23:58:14 +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
f8f916edde Make contacts searchable from phonetic names on Eclair and earlier.
Signed-off-by: HIRANO Takahito <hiranotaka@zng.info>
2011-01-04 14:33:02 +00:00
Jesse Vincent
2daf8eaec8 Allow emoji input.
Signed-off-by: HIRANO Takahito <hiranotaka@zng.info>
2011-01-04 13:25:59 +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
40344aea41 support iPad mail too 2011-01-03 18:12:35 +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
cketti
fe724c8c79 Changed SMTP code to handle reply codes without additional text.
Fixes issue 2801
2011-01-01 18:45:33 +00:00
Andrew Chen
731ea27a24 Minor formatting cleanup. 2010-12-31 08:56:05 +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
cketti
a1e059e871 Introduced setting to change the font size of the message preview in the message list.
Fixes issue 2788
2010-12-30 00:52:00 +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
Andrew Chen
b85f0b64c0 Fix javadoc; make constant all caps. 2010-12-29 07:17:43 +00:00
cketti
cb97c312fc Move ColorChip to the correct directory 2010-12-28 23:37:47 +00:00
Jesse Vincent
777f75b5c4 Stop showing "Not polling" in the status header. Most of the time, this
is because we're pushing.
2010-12-28 09:12:02 +00:00
Jesse Vincent
8bc984f440 APG-related messageview bugfixes 2010-12-28 09:11:35 +00:00
Jesse Vincent
0c426c9c4b Round our color chips, clean up color hcip rendering a bit 2010-12-28 09:11:10 +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
b166cf03e8 split apart attachment view creation a bit 2010-12-28 09:09:52 +00:00
Jesse Vincent
3c9eb2c004 Further refactoring of message display 2010-12-28 09:09:33 +00:00
Jesse Vincent
9fe56831bf finish removing setHeaders as a layer of indirection 2010-12-28 09:09:15 +00:00
Jesse Vincent
8116a0f39f lift some gpg code into the crypto initializer 2010-12-28 09:08:58 +00:00
Jesse Vincent
3ffa28fa02 we import so we don't need to qualify 2010-12-28 09:08:40 +00:00
Jesse Vincent
85a7a08e9a Rename our attachment view holder from Attachment to AttachmentViewHolder 2010-12-28 09:08:18 +00:00
Jesse Vincent
6a04afb758 extract "does it have html images" out of MessageView. really, it should
end up in LocalMessage somewhere
2010-12-28 09:07:59 +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
84f6e546d2 setLoadPictures sets mShowPictures. We don't need to set it again 2010-12-28 09:07:19 +00:00
Jesse Vincent
f292251b78 lift createUniqueFile to a Utility class 2010-12-28 09:06:57 +00:00
Jesse Vincent
570dbf7126 split apart onCreate into bite-sized pieces 2010-12-26 03:51:33 +00:00
Jesse Vincent
43e3e860f8 doc fix 2010-12-26 03:49:52 +00:00
Jesse Vincent
d352b8a4a5 whitespace 2010-12-26 03:49:23 +00:00
Jesse Vincent
f2b2fddd5a onRefile removes code duplication 2010-12-26 03:49:20 +00:00
Jesse Vincent
db02383d4a whitespace cleanups 2010-12-26 03:49:16 +00:00
Jesse Vincent
8488b55e09 remove some duplicated code 2010-12-26 03:49:13 +00:00
Jesse Vincent
8c6df94739 remove some temp variables 2010-12-26 03:49:09 +00:00
Jesse Vincent
877427f110 cut down a couple overly verbose conditionals 2010-12-26 03:49:06 +00:00
Jesse Vincent
daf5a9d704 lift emulateShiftHeld to our custom WebView subclass 2010-12-25 22:30:34 +00:00
Jesse Vincent
8e2e4e515f simplify MessageView's setHeaders 2010-12-25 22:30:31 +00:00
Jesse Vincent
8b52aac135 remove unused imports 2010-12-25 22:30:27 +00:00
Jesse Vincent
76fd8e9939 extract animation code from MessageView 2010-12-25 22:30:22 +00:00
Jesse Vincent
5f9eae1580 Extract MessageWebView specific code into a new class 2010-12-25 22:30:16 +00:00
Jesse Vincent
ea4e0aa61f remove a bunch of extraneous code and variables 2010-12-25 19:29:02 +00:00
Jesse Vincent
9f24ea2b03 minor code cleanup 2010-12-25 19:28:58 +00:00
Jesse Vincent
91ab617807 rename "hide buttons" to "scroll buttons" because that's what it does 2010-12-25 19:28:54 +00:00
Andrew Chen
dc5616c4b6 Add a space between recipients when doing toString(). 2010-12-25 01:36:48 +00:00
Andrew Chen
77c01c65dd Refactor network data blocking out of the main K9 class and into the MessageView class. 2010-12-25 01:26:47 +00:00
Jesse Vincent
f14c7ecd9b doc & comment updates from achen.code 2010-12-25 00:27:09 +00:00
Jesse Vincent
c361c0e63c Extract a method to set up our MessageView WebView 2010-12-25 00:27:05 +00:00
Jesse Vincent
1fae914efb tiny doc update from achen.code 2010-12-25 00:26:59 +00:00
Jesse Vincent
db7649c9af move folderlist initialization into an asynctask, so it's not so slow to populate 2010-12-24 22:48:29 +00:00
Jesse Vincent
b99eb47d15 extract folder preference setup to a method, so we can push it onto a thread 2010-12-24 22:48:26 +00:00
Jesse Vincent
4a97f4a1a0 astyle 2010-12-24 22:48:22 +00:00
Jesse Vincent
fa510f2dab Turns out that UUID generation is expensive. deferring it until first access improves startup performance. 2010-12-24 22:48:19 +00:00
Jesse Vincent
d64d9c460a Disable webview cache and javascript. (Mail + Javascript == scary) 2010-12-24 22:48:17 +00:00
Jesse Vincent
df96d0fbe0 avoid use of a temp variable 2010-12-24 22:48:14 +00:00
Jesse Vincent
30b7402569 We shouldn't be resetting visible limits every time K-9 is opened, only when the user changes
how many messages they want to be synced, otherwise the "fetch more messages" option is session-only, which is really, really wasteful of network. (and "session" is poorly defined, since android manages our lifecycle.)

Additionally, doing this at startup has huge overhead. If this functionality is ever restored, we should make it asynchronous
2010-12-24 22:48:11 +00:00
Jesse Vincent
9878b74379 astyle 2010-12-24 18:55:05 +00:00
Jesse Vincent
c49a856046 Enable Strict Mode when a new "developer mode" is enabled and we're running on 2.3 or newer 2010-12-24 18:55:01 +00:00
Jesse Vincent
0b3dc2840b Bump us up to android-9 so we can have strict mode for development 2010-12-24 18:54:56 +00:00
Andrew Chen
2806c267c9 Remove unreadable characters from message previews. 2010-12-23 23:16:54 +00:00
Andrew Chen
302339545b Try using IP address for EHLO if hostname is unavailable. Only use a default hostname if the IP address is unavailable. ref r2958, issue 2750. 2010-12-23 17:43:57 +00:00
Andrew Chen
6c52c8d927 Set a default hostname if we can't get the local hostname. Fixes issue 2750. 2010-12-23 17:15:20 +00:00
Andrew Chen
f5421f32b8 Fix bug where replaceAll result was being discarded.
Fix javadoc.
2010-12-22 22:08:15 +00:00
Fiouz
df44a1f89b Add @Override annotations (1.6) for safer compile-time checks 2010-12-20 21:34:01 +00:00
Fiouz
0abbeb443e Batch storing of unsynced messages to speed up DB update (chunk size set to 5).
Execution code path is modified since it's not longer handling one message at a time when inserting in DB - might require review.
2010-12-19 11:51:54 +00:00
Jesse Vincent
eda76640c0 When mail is sent successfully, cancel the "couldn't send mail"
notification
2010-12-19 01:30:11 +00:00
Jesse Vincent
b59eb6c69f lift lastFailure up so we can reference it in an outer scope 2010-12-19 01:30:07 +00:00
Jesse Vincent
dbe4bea290 Give our "send failed" notification a contant 2010-12-19 01:30:03 +00:00
Fiouz
ab5caba92c Factor out store locking code in an intermediate DB access layer. 2010-12-18 22:56:40 +00:00
Fiouz
c5f7dbf028 Execute LocalMessage.appendMessage() & LocalMessage.setFlag() in the same transaction for small message storing in order to speed up DB update.
This is a per message basis optimization. More improved speed could be attained by batching several messages in the same transaction.
2010-12-18 10:12:52 +00:00
Kris Wong
bb5052f848 Fix possible NPE. 2010-12-17 17:25:27 +00:00
Kris Wong
623217f6d0 Improved fallback authentication methods + ran source formatter. 2010-12-17 14:40:19 +00:00
Jesse Vincent
0778c8ea17 Provisional fix for Issue 2760 in k9mail: New NPE from market. showing up a lot on 3.400 2010-12-16 02:38:54 +00:00
Kris Wong
33f5a42562 Fix usage of 'advanced' exchange settings. 2010-12-15 17:00:54 +00:00
Fiouz
f8f2169643 Don't reference the enclosing type instance when it's not used (memory optimisation) 2010-12-14 19:27:11 +00:00
Fiouz
caabbd735a Don't reference the enclosing type instance when it's not used (memory optimisation) 2010-12-14 19:27:04 +00:00
Fiouz
0d23157e3b Don't reference the enclosing type instance when it's not used (memory optimisation) 2010-12-14 19:26:57 +00:00
Fiouz
05a8a31d4a Don't reference the enclosing type instance when it's not used (memory optimisation) 2010-12-14 19:26:51 +00:00
Fiouz
fb348449c3 Don't reference the enclosing type instance when it's not used (memory optimisation) 2010-12-14 19:26:44 +00:00
Fiouz
63a8197f5a Don't reference the enclosing type instance when it's not used (memory optimisation) 2010-12-14 19:26:37 +00:00
Fiouz
64b5655d7c Don't reference the enclosing type instance when it's not used (memory optimisation) 2010-12-14 19:26:31 +00:00
Fiouz
36858f53de Don't reference the enclosing type instance when it's not used (memory optimisation) 2010-12-14 19:26:25 +00:00
Fiouz
9d01876481 Don't reference the enclosing type instance when it's not used (memory optimisation) 2010-12-14 19:26:18 +00:00
Fiouz
dcbfd332ab Don't reference the enclosing type instance when it's not used (memory optimisation) 2010-12-14 19:26:09 +00:00
Fiouz
a667a72585 Don't reference the enclosing type instance when it's not used (memory optimisation) 2010-12-14 19:26:02 +00:00
Fiouz
4024ddd384 Don't reference the enclosing type instance when it's not used (memory optimisation) 2010-12-14 19:25:56 +00:00
Kris Wong
2b56464ad9 Fix form based re-authentication when logon cookies had expired. 2010-12-14 18:02:39 +00:00
Jesse Vincent
5e7257492d small cleanups to messageview code 2010-12-13 01:56:57 +00:00
Jesse Vincent
063bbb904f Extract SizeFormatter into helpers 2010-12-13 01:02:39 +00:00
Jesse Vincent
23b57b4502 remove a duplicated and divergent size formatter 2010-12-13 01:02:35 +00:00
Jesse Vincent
936b2779d6 fixup onNext was overloaded (due to the flinger) - at least unify the
protection level
2010-12-13 01:02:31 +00:00
Jesse Vincent
2451dde1bc simplify our "should we animate" checks in messageview (also, we now
honor the animation preference when using the volume keys to navigate)
2010-12-13 00:37:31 +00:00
Andrew Chen
b0e4d9cdff Try calculating content preview from HTML part if text part is unsuccessful on appendMessages. 2010-12-13 00:33:00 +00:00
Jesse Vincent
26712ed84a reshuffle color views into view/ 2010-12-13 00:18:00 +00:00
Jesse Vincent
76b6fa696b Move the ToggleScrollView into the view/ hierarchy 2010-12-13 00:17:54 +00:00
Jesse Vincent
aa2960eb04 move the AccessibleEmailContentActivity into activity/ 2010-12-13 00:17:49 +00:00
Jesse Vincent
f97d4289ca Start moving custom views into the view/ hierarchy 2010-12-13 00:17:44 +00:00
Andrew Chen
d48a869361 Add "x-gbk" as an alias of GBK. 2010-12-12 23:56:09 +00:00
Jesse Vincent
4bb5acb51c Revert "stop fading the chip if a message is read. we already change text"
It's contentious to change, apparently. So, revert until it's a setting
This reverts commit a6060fa66c8ae6001c402b0f3ac3d240b7348b8e.
2010-12-07 01:22:35 +00:00
Marcus Wolschon
f5420ac528 readable thread-name for debugging
javadoc
2010-12-06 09:25:23 +00:00
cketti
9f7b447181 POP3: Ignore messages without unique-id when parsing UIDL response
Fixes issue 2731
2010-12-01 18:14:12 +00:00
Jesse Vincent
f5eb6e03af astyle 2010-12-01 06:32:29 +00:00
Jesse Vincent
e44a74c652 Get rid of a whole lot of crazy code that forced repeated attachment
downloads with the intent of only having one attachment downloaded at a
time.
2010-12-01 06:04:28 +00:00
Jesse Vincent
35f19abc9f Improve the "Do what I mean" nature of "Empty trash" - it now syncs the
trash folder after deletions to clear out local records of deleted
messages and does a compact operation on the local store.
2010-12-01 06:04:22 +00:00
Jesse Vincent
75ec749ed4 Remove an unused "context" from a private function 2010-12-01 06:04:16 +00:00
Jesse Vincent
02acea3bbf replying to a message you sent shouldn't end up sending mail only to you 2010-12-01 06:04:12 +00:00
Jesse Vincent
1898ceee71 Remove two retundant variables 2010-12-01 03:08:36 +00:00
Jesse Vincent
f4a54b9ecb fix a numeric equality bug spotted by intellij 2010-12-01 03:08:09 +00:00
Jesse Vincent
78c900b5fe remove redundant ;s 2010-12-01 03:07:28 +00:00
Jesse Vincent
75aa644a23 Remove a bunch of stringification inside of string appends (per intellij) 2010-12-01 03:06:50 +00:00
Jesse Vincent
0677bd9e77 Get rid of some redundant casts (Per IntelliJ) 2010-12-01 03:06:12 +00:00
Jesse Vincent
fde438fbfb Get rid of some unnecessary stringification (Per IntelliJ) 2010-12-01 03:05:40 +00:00
Jesse Vincent
cead5c7060 flip some loops to using java internals instead (per intellij) 2010-12-01 03:04:57 +00:00
Jesse Vincent
5485d0faf1 switch over some for loops to enhanced for loop syntax per intellij 2010-12-01 03:04:07 +00:00
Jesse Vincent
58e6bd388b finalize some declarations per IntelliJ 2010-12-01 03:03:22 +00:00
Jesse Vincent
c79ea226a5 Remove "throws" declarations that didn't actually get thrown. Remove a
couple of try blocks that only caught throws we didn't throw. IntelliJ
optimization.
2010-12-01 03:02:13 +00:00
Jesse Vincent
81f12f0e05 clean up a couple null checks 2010-12-01 03:01:20 +00:00
Jesse Vincent
43d9c0a6d4 Eliminate some redundant assignments 2010-12-01 03:00:36 +00:00
Jesse Vincent
2ecdc22111 simplify static final methods to just be static. (IntelliJ inspection) 2010-12-01 02:59:50 +00:00
Jesse Vincent
1ce9021ecd Fix pinch-to-zoom. Patch by achen.code. Fixes isue 2720 2010-11-30 01:42:00 +00:00
Jesse Vincent
174a62536e Resolves Issue 2719: Message List Previews: Read message senders are shown in bold patch from achen.code 2010-11-30 01:04:24 +00:00
Jesse Vincent
f98a2db2ab stop fading the chip if a message is read. we already change text
weight
2010-11-29 03:24:57 +00:00
Jesse Vincent
dbc07d14ee Revert "http://code.google.com/p/k9mail/issues/detail?id=2682" until we
can make it configurable, per discussion with Marcus

This reverts commit 1436eeefa292f64c8c9aa6ec9fa2daaeafeb93fd.
2010-11-29 02:21:27 +00:00
Jesse Vincent
15bf83bbe4 preliminary implementation of 'quiet time' 2010-11-29 02:21:16 +00:00
Jesse Vincent
fb6dfb3bde removed a commented-out method to show notifications on changes to
system connectivity
2010-11-28 21:48:29 +00:00
Jesse Vincent
2b8f7c0bbc unify all our beeping, buzzing and flashing codepaths 2010-11-28 21:48:25 +00:00
Jesse Vincent
70922989d3 genericize configureNotification in preparation for code reuse 2010-11-28 21:48:21 +00:00
Jesse Vincent
64667d03dc extract vibration pattern metadata out ouf MessagingController into
notificationsetting
2010-11-28 20:29:14 +00:00
Jesse Vincent
b7f52a834f isVibrate -> shouldVibrate to match shouldRing 2010-11-28 20:29:09 +00:00
Jesse Vincent
28c126b8a5 extract notification code from actual "action" code 2010-11-28 20:29:05 +00:00
Jesse Vincent
99d5704b82 extract "sending messages" notification into methods 2010-11-28 20:29:02 +00:00
Jesse Vincent
9784d0e943 remove 100loc by replacing a pattern with a method. 2010-11-28 20:28:58 +00:00
Jesse Vincent
fa64f4c3a8 Minor refactoring for readability 2010-11-28 20:28:53 +00:00
Jesse Vincent
b7617a3497 extract "determine what to do with a new message" out of
downloadMessages Probably wants a better name
2010-11-28 20:28:50 +00:00
Jesse Vincent
3404edca28 extract the "synchronize one folder" method 2010-11-28 20:28:46 +00:00
Jesse Vincent
36bb10fb2c extract out "sync one account" 2010-11-28 20:28:42 +00:00
Jesse Vincent
4f376e8332 astyle 2010-11-28 20:28:37 +00:00
Jesse Vincent
a75098013a add a new quiet time preference 2010-11-28 20:28:32 +00:00
Jesse Vincent
d3c86a39dd initial import of a timepicker preference widget 2010-11-28 20:28:19 +00:00
Jesse Vincent
621f87fcbc Revert "refactor getHeaders and removeHeaders to use a common method and an"
Subtly flawed. Returned the wrong headers

This reverts commit 657b3961f86b1b694fb7587216ecefeb0b20f5d2.
2010-11-27 04:03:15 +00:00
Jesse Vincent
75108f4078 move toMe and ccMe into LocalMessage from MessageInfoHolder 2010-11-27 04:03:10 +00:00
Jesse Vincent
580f47998d Remove subject from messageinfoholder 2010-11-27 04:03:06 +00:00
Jesse Vincent
60a538e071 Remove "preview" form messageinfoholder 2010-11-27 04:03:02 +00:00
Jesse Vincent
f9981dcf7c lift hasAttachments to LocalMessage 2010-11-27 04:02:56 +00:00
Jesse Vincent
1149f2d916 refactor getHeaders and removeHeaders to use a common method and an
iterator to address a Market FC:

java.util.ConcurrentModificationException
at java.util.ArrayList$ArrayListIterator.next(ArrayList.java:573)
at com.fsck.k9.mail.internet.MimeHeader.getHeader(MimeHeader.java:87)
at
com.fsck.k9.mail.internet.MimeHeader.getFirstHeader(MimeHeader.java:51)
at
com.fsck.k9.mail.internet.MimeMessage.getFirstHeader(MimeMessage.java:437)
at
com.fsck.k9.mail.internet.MimeMessage.getContentType(MimeMessage.java:130)
at
com.fsck.k9.mail.internet.MimeMessage.getMimeType(MimeMessage.java:159)
at
com.fsck.k9.mail.internet.MimeUtility.findFirstPartByMimeType(MimeUtility.java:971)
at com.fsck.k9.crypto.Apg.isEncrypted(Apg.java:464)
at
com.fsck.k9.activity.MessageView.updateDecryptLayout(MessageView.java:2702)
at
com.fsck.k9.activity.MessageView$Listener$6.run(MessageView.java:2466)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:144)
at android.app.ActivityThread.main(ActivityThread.java:4937)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
2010-11-26 03:53:15 +00:00
Jesse Vincent
23254e8998 BatchButton area toggling should't happen from anything other than the
UiThread:

Fixes a common error from the market:

android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
at android.view.ViewRoot.checkThread(ViewRoot.java:2802)
at android.view.ViewRoot.invalidateChild(ViewRoot.java:607)
at android.view.ViewRoot.invalidateChildInParent(ViewRoot.java:633)
at android.view.ViewGroup.invalidateChild(ViewGroup.java:2505)
at android.view.View.invalidate(View.java:5139)
at android.view.View.setFlags(View.java:4502)
at android.view.View.setVisibility(View.java:3030)
at
com.fsck.k9.activity.MessageList.hideBatchButtons(MessageList.java:2883)
at
com.fsck.k9.activity.MessageList.toggleBatchButtons(MessageList.java:2906)
at com.fsck.k9.activity.MessageList.access$500(MessageList.java:77)
at
com.fsck.k9.activity.MessageList$MessageListAdapter.pruneDirtyMessages(MessageList.java:2302)
at com.fsck.k9.activity.MessageList$1.run(MessageList.java:811)
2010-11-26 03:53:10 +00:00
Marcus Wolschon
4f08820683 http://code.google.com/p/k9mail/issues/detail?id=2682
mark multiple mails as SPAM
2010-11-22 08:12:48 +00:00
Koji Arai
0206ebf809 Fixed issue 2680
Should not set empty string in auto-expand folder list.
2010-11-21 13:25:21 +00:00
Jesse Vincent
5d33bc044b when a message is seen _decrement_ the unread count, don't increment it 2010-11-21 05:31:42 +00:00
Jesse Vincent
14152a8585 Don't compare whether we're setting the delete flag with whether the
message is seen or not. (logic error)
2010-11-21 05:31:38 +00:00
Jesse Vincent
0e5b5de409 update our counts on destroy before actually destroying the message, so
we have something to call isSet on
2010-11-21 05:31:34 +00:00
Jesse Vincent
43cef54ad6 We don't cache positive DNS lokups. We shouldn't cache negative DNS lookups either 2010-11-21 02:10:59 +00:00
cketti
389502da55 Fixed account shortcuts
- Fixed NullPointerException
- Removed unnecessary stuff (originally copied from Accounts activity)
2010-11-18 09:09:57 +00:00
cketti
0560dc28d9 Don't use the application context to start the Accounts activity (because then we'd have to create a new task)
Fixes issue 2653
2010-11-18 09:08:40 +00:00
Fiouz
a67a2022d3 Added method name logging on transaction logging, when debug is enabled 2010-11-17 21:11:07 +00:00
Fiouz
dc16657480 Made LocalStore.destroy() transactional 2010-11-17 21:10:45 +00:00
Jesse Vincent
46300ac421 Move our "pick a folder" preferences out of the account setup wizard,
where you're unlikely to even have access to them the first time you
walk through into the "Folders" preferences.

At the same time, move toward using a list preference widget, rather
than a custom activity.
2010-11-17 03:43:02 +00:00
Jesse Vincent
b6ccba9c7d When getting a list of folders out of the database, ask for it in
asciibetical order, rather than random order
2010-11-17 03:42:14 +00:00
Jesse Vincent
7291486ca0 No longer delete the Outbox every time it's empty - it makes it somewhat
more difficult to work with. If we want to hide it when it's empty,
that's fine. but it's not necessary to delete it.
2010-11-17 03:41:37 +00:00
Jesse Vincent
80e4de6db4 fix a deleted message count logic error 2010-11-15 01:31:20 +00:00
Jesse Vincent
4f4fe87d5f Minor refactoring of flag setting code 2010-11-15 01:31:16 +00:00
Jesse Vincent
36714d3b4a astyle 2010-11-15 01:31:11 +00:00
Fiouz
f9d828a62c Improved some comments 2010-11-14 23:21:48 +00:00
cketti
58ca9fe740 Changed external intent (e.g. Intent.ACTION_SEND_TO) handling code in MessageCompose
- extracted handling of external intents to a new method
- only allow mailto URI for ACTION_VIEW and ACTION_SENDTO (as documented by AOSP)
- allow additional recipients via "to" parameter in mailto URI
- removed check for allowed MIME type when adding attachments since we're accepting all MIME types anyway
- show CC and BCC text fields when one of those recipient types was set by the intent
- use MIME type specified in intent for attachments (if present and doesn't contain a "*")
2010-11-14 02:27:42 +00:00
Jesse Vincent
675651286b Added the ability to completely wipe the localy cached messages of a syncced folder. 2010-11-14 00:49:25 +00:00
Jesse Vincent
32ea04a5b3 kill a temporary variable 2010-11-14 00:49:21 +00:00
Jesse Vincent
6a6c86d117 Kill a once-used temporary variable 2010-11-14 00:49:18 +00:00
Jesse Vincent
945d4d7c32 a slight cleanup for message deletioon policy logic. 2010-11-14 00:49:15 +00:00
Jesse Vincent
0eee80f08b renamed deleteMessagesOlderThan to clearMessagesOlderThan to better
reflect that it just nukes local copies rather than the synced copies
2010-11-14 00:49:08 +00:00
Jesse Vincent
7d40596aa1 split apart "delete messages older than" for later reuse 2010-11-14 00:49:04 +00:00
Jesse Vincent
14055691a3 Merge branch 'mail-on-sd'
* mail-on-sd: (40 commits)
  Added more comments to explain how the locking mecanism works for LocalStore
  Fixed wrong method being called during experimental provider initialization (since provider isn't enabled, that didn't harm)
  Add more comments about how the various StorageProviders work and how they're enabled
  find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs
  French localization for storage related settings
  Remove unused SD card strings (replaced with storage indirection)
  Merge mail-on-sd branch from trunk
  Reset mail service on storage mount (even if no account uses the storage, to be improved)
  find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs
  Migraion -> Migration
  move the Storage location preference into preferences rather than the wizard.
  Made LocalStore log less verbose Added @Override compile checks
  Added ACTION_SHUTDOWN broadcast receiver to properly initiate shutdown sequence (not yet implemented) and cancel any scheduled Intent
  Be more consistent about which SQLiteDatabase variable is used (from instance variable to argument variable) to make code more refactoring-friendly (class is already big, code extraction should be easier if not referencing the instance variable).
  Added transaction timing logging
  Factorised storage lock/transaction handling code for regular operations.
  Use DB transactions to batch modifications (makes code more robust / could improve performances)
  Merge mail-on-sd branch from trunk
  Update issue 888 Added DB close on unmount / DB open on mount
  Update issue 888 Back to account list when underlying storage not available/unmounting in MessageView / MessageList
  ...
2010-11-13 21:40:56 +00:00
Jesse Vincent
76e26607b8 Added a first pass implementation of being able to resend a message. 2010-11-13 03:09:32 +00:00
Jesse Vincent
3779237eb8 remove a special flag in FolderInfoHolder that we only use twice and
appear to initialize unreliably in favor of some simple checks.
2010-11-13 03:09:27 +00:00
Jesse Vincent
27d3e6312b Refactor FolderInfoHolder to remove copy-paste code 2010-11-13 03:09:23 +00:00
Jesse Vincent
a8de2d0000 astyle 2010-11-13 01:47:08 +00:00
Jesse Vincent
a551dc8dff Replace the old "record a message in K9 Errors and give up"
failed-message scheme with an actual android notification that opens the
outbox
2010-11-13 01:47:02 +00:00
Jesse Vincent
e964c7ba84 Tell the user about a failed delivery the first (any) time it fails 2010-11-13 01:46:59 +00:00
Jesse Vincent
4fb338d8a9 Disable "don't send messages in the outbox if they're flagged" - users
really don't like their mail just getting stuck
2010-11-13 01:46:55 +00:00
Jesse Vincent
ecf793ea26 remove an unused constant 2010-11-13 01:46:46 +00:00
Jesse Vincent
24b018a812 replace a trivial one-line method that was called twice with its body 2010-11-13 01:46:41 +00:00
Jesse Vincent
f874f0f9d3 replace a single-use single-line private method with its body in the one place it was used 2010-11-13 01:46:36 +00:00
Jesse Vincent
0f4366aa77 in the account list, when trying to check mail, also try to send mail 2010-11-13 01:46:31 +00:00
Jesse Vincent
af5f78928c Add a "fetch all messages" visible limit 2010-11-12 23:41:43 +00:00
Jesse Vincent
a130f56bf4 when changing an account's visible limits, try to reset folder visible
limits as soon as we save the setting
2010-11-12 23:41:38 +00:00
Jesse Vincent
9f695eb4ed extract the per-account "reset visible limits" method 2010-11-12 23:41:33 +00:00
Jesse Vincent
478bd876ee There's no reason the getSubject accessor should throw a
MessagingException on LocalMessage
2010-11-12 22:27:32 +00:00
Jesse Vincent
b2e5d7afc5 extract our our folder-count updating code from the flag setting code 2010-11-12 21:38:11 +00:00
Jesse Vincent
eb908b67a3 try to clean up our message count update logic in flagging 2010-11-12 21:38:06 +00:00
Jesse Vincent
2d8a8998b0 factor out a "destroy" method for local messages 2010-11-12 21:38:02 +00:00
Jesse Vincent
1292a10ac2 When a message has been deleted on the server and we want to sync remote
deletions, we don't care whether it was flagged as deleted ocally - we definitely
want to destroy it.
2010-11-12 21:37:58 +00:00
Jesse Vincent
33fd42e766 If we DELETE a message from the database, don't then try to UPDATE it 2010-11-12 21:37:54 +00:00
Jesse Vincent
52e2a437fb Imported a variant of http://code.google.com/p/android-color-picker/ into k-9
- Ported to the ColorPickerDialog API
- Translated the API and Internals from Indonesian to English
- Moved to use K-9 strings rather than custom strings.

In an ideal world, we should use ambilwarna as an android library
project, like it was intended.
2010-11-08 02:21:32 +00:00
Jesse Vincent
d45081abaa Animate the batch-operations toolbar (Imported from AOSP) 2010-11-07 19:40:42 +00:00
Jesse Vincent
6528b2d775 lift up font setting code to be with the rest of the initial messagelist item setting code 2010-11-07 00:30:17 +00:00
Jesse Vincent
69675bc935 Now that we can show bigger previews, actually generate a bigger preview 2010-11-05 04:23:09 +00:00
Jesse Vincent
a78776a9ee Only look at the first 8k of a message when calculating message previews 2010-11-05 04:23:04 +00:00
Jesse Vincent
bfc24a58a0 Improvements to message preview heuristics 2010-11-05 03:55:24 +00:00
Jesse Vincent
9d69875246 Add a new preference to let users select how many lines of message
preview show in message-preview mode.
2010-11-05 02:59:26 +00:00
Jesse Vincent
d0e85ce43a astyle 2010-11-05 02:59:21 +00:00
Jesse Vincent
602099cfd3 Be more careful about deleting messages from the MessageListAdapter -
don't do it from something that's not the UI thread
2010-11-05 01:16:35 +00:00
Marcus Wolschon
4aba667a4e fix for "http:/"-links in plaintext -emails. (add http:// is a link has no schema) 2010-11-04 13:35:39 +00:00
cketti
5b88a99de0 Got rid of some compiler warnings. 2010-11-04 03:11:34 +00:00
Jesse Vincent
fb55aa5bfb Fix an extra paren 2010-11-03 00:48:18 +00:00
Jesse Vincent
b9999878df We care about eclair MR1, not eclair 2010-11-03 00:44:07 +00:00
Jesse Vincent
9c7e3bcc26 Guard against null content from html parts on reply/forward, which was
causing a bunch of NPEs on the market.
2010-10-31 17:42:03 +00:00
cketti
7f396e29a0 Match beginning of words when searching for contacts in Android 1.5/1.6 (e.g. "Doe" will find "Doe, John" and "John Doe")
Fixes issue 1354
2010-10-30 20:53:56 +00:00
cketti
0add1f97c0 Mark contacts as contacted when a mail is sent to them.
Fixes issue 2522
2010-10-30 20:35:49 +00:00
Jesse Vincent
7db384fc08 Use a more backward compatible os version check, since the "current"
best practice is incompatible with 1.5
2010-10-29 22:35:27 +00:00
Jesse Vincent
e0d6a55d06 SINGLE_COLUMN layouts cause Android 1.0-2.1 to segfault. 2010-10-29 22:35:19 +00:00
Jesse Vincent
b749a198a7 get to: contacts working right. 2010-10-29 22:35:11 +00:00
Jesse Vincent
c5cf9e5c8c message_to_label and message_to_fmt were used from places that weren't
their original sources. rename them to lie less.
2010-10-29 22:34:59 +00:00
Fiouz
d28a85de5b Update issue 2270
Status: Fixed
Gracefully ignore RejectedExecutionException on service shutdown (there's little we can do about being shut down)
2010-10-29 19:55:04 +00:00
Fiouz
be6ab18091 Update issue 2537
Try to gracefully handle account DB corruption by deleting file on open exception
2010-10-28 19:16:55 +00:00
Fiouz
50c3751421 Display "Account settings" title instead of "General settings" when opening account settings (doesn't seem to be affected by user chosen language though) 2010-10-28 19:07:30 +00:00
Marcus Wolschon
b723769e65 translated "unable to connect". 2010-10-28 14:37:48 +00:00
Jesse Vincent
6704279042 redo our messagelist sigil code to not break sender colorization 2010-10-25 03:21:08 +00:00
Jesse Vincent
724169e982 astyle 2010-10-25 03:20:03 +00:00
Jesse Vincent
ddccd11ef7 Try to send pending messages whenever we refresh pushers. should help
with "stuck" unsent messages on push-only accounts
2010-10-25 03:19:43 +00:00
Jesse Vincent
f6f9d35430 unify two codepaths that sent unsent messages, one of them without a notification 2010-10-25 03:19:19 +00:00
Jesse Vincent
968fb8c508 add a variant of sendPendingMessages that will send pending messages in all accounts 2010-10-25 03:18:51 +00:00
Jesse Vincent
1d6caa5c0a Never show an undismissable "new email" notification for a null account (like used to happen during setup) 2010-10-24 02:01:13 +00:00
Jesse Vincent
c216f42eb3 Exchange authenticaton and setup overhaul from Kris Wong 2010-10-24 01:03:29 +00:00
Jesse Vincent
07adaaee4d Applied WebDavStore_cleanup.diff to remove dead code in the WebDav store from Kris Wong <wongk@seapine.com> 2010-10-24 01:02:46 +00:00
Jesse Vincent
62caa5ce76 Experimental change - ask android to try to make columns no wider than
the viewport. This change should NOT be backported to 3.2, but I'd like
folks to try it with real email.
2010-10-23 18:50:54 +00:00
Jesse Vincent
43cb54594b Push the webview's renderpriority from NORMAL to HIGH - it's cargo-cult
performance improvement, but it certainly doesn't hurt
2010-10-23 18:50:24 +00:00
Jesse Vincent
983d7ad48f The "viewport" hinting we used to try to better fit messages by default
made android zooming incredibly unreliable. Now it's only somewhat
unreliable.
2010-10-23 18:50:10 +00:00
Jesse Vincent
4ea6c1603b We've been seeing a lot of FCs on htmlifcation of large messages due to
running out of memory during our heavy HTMLification. Try to be a bit
lighter on the poor RAM if a plain text message is big.
2010-10-23 17:33:08 +00:00
Jesse Vincent
524dfb348a Updated MIME Type list with http://www.stdicon.com/mimetypes 2010-10-23 16:28:18 +00:00
Jesse Vincent
105df4c61a It turns out that not every android release has a good extension to
mimetype mapping. restore our previous hardcoded mime database as a
fallback
2010-10-23 16:28:07 +00:00
Jesse Vincent
fb059a8138 Fix for NPE when changing the identity
Fixes issue 2506. Patch from jca02266
2010-10-23 15:26:50 +00:00
Jesse Vincent
96f1d9eadf Fix phantom messages in unified inbox. 2010-10-23 15:19:56 +00:00
Jesse Vincent
bc2127c84a added a synchronous variant of searchLocalMessages 2010-10-23 15:19:47 +00:00
Jesse Vincent
64c102dd14 notification that the dataset changed needs to happen on the UI thread. 2010-10-21 20:49:48 +00:00
Jesse Vincent
48f2885cfc When returning from a messageview to a messagelist do our listview
updates on a thread rather than on the main ui thread. it results
in the list blinking with old data, but that's still a better user
experience than "frozen"
2010-10-21 20:49:36 +00:00
Jesse Vincent
e8756af4f1 astyle 2010-10-21 20:49:20 +00:00
Jesse Vincent
2a4792eb60 update a comment about an uncommon code path 2010-10-21 20:49:05 +00:00
Jesse Vincent
8d9c074a27 Add gmail-style "to me" and "cc me" indicators in messagelist 2010-10-21 20:48:45 +00:00
Jesse Vincent
d02ddda19b When doing a message search, break it into "first 10" and "more" -
because a long SQL query takes more time before starting to return
results, K-9 was increasingly slow on large folders.

Doing two searches may take marginally more time but starts getting
results back to the UI much faster.
2010-10-21 20:48:28 +00:00
Jesse Vincent
e05784d41d Running heavy operations on the UI thread makes K-9's UI slow and
freezy.  addOrUpdateMessages is very heavy. and very common.
2010-10-21 20:48:12 +00:00
Marcus Wolschon
0933fad9b3 Update issue 7031
http://code.google.com/p/android/issues/detail?id=7031
added removeDialog() for every dismissDialog()
2010-10-18 09:53:22 +00:00
Jesse Vincent
b2a08d969b Revert "For the common case of "getMessage" where we actually have the object in"
This doesn't work on initial sync, since the comparisons fail and you're
left with duplicates in the displayed mailbox
This reverts commit fa1c88bec348d0132acc60a320626bf0ca1170ec.
2010-10-16 08:27:58 +00:00
Jesse Vincent
496677dad4 Calculate preview for html-only messages
Fixes 2465
2010-10-16 08:27:47 +00:00
cketti
742db2ac62 Cosmetic code changes 2010-10-13 20:56:44 +00:00
cketti
4be781a749 Fix NullPointerException when saving account settings for non-IMAP accounts.
Fixes issue 2454
2010-10-13 20:49:34 +00:00
Jesse Vincent
28c9dfdcce Delay formatting of dates in messagelist until we actually need them
-- it turns out they're very expensive.
2010-10-13 10:53:08 +00:00
Jesse Vincent
4e53ee12b6 For the common case of "getMessage" where we actually have the object in
the list, use a less painful equality check than iteration.

This works because messageInfoHolders compare to each other using the
same key as message they contain.
2010-10-13 10:52:53 +00:00
Fiouz
9db44bf4a9 MessageProvider: making sure exposed cursor gets dereferenced on close (and closed on finalization) to prevent memory leak 2010-10-11 20:41:59 +00:00
Jesse Vincent
e8fd9683e6 Optimize the new return-to-listview code. (Avoid a bug where we do far
too much work on first open of a message list)
2010-10-11 19:47:41 +00:00
Jesse Vincent
d07aca3008 "Preferences" -> "Settings" for consistency 2010-10-11 14:54:23 +00:00
Jesse Vincent
c5d68fb49d Add preferences to enable pinch-to-zoom and single-column layout for
messages
2010-10-11 14:54:15 +00:00
Jesse Vincent
5fc78b4219 astyle 2010-10-11 00:08:54 +00:00
Jesse Vincent
a683186f6e move 3 IMAP preferences out of the "wizard" flow to an advanced page
where they belong
2010-10-11 00:08:47 +00:00
Jesse Vincent
28388b235e move "saveAllHeaders" to the account preferences screen. 2010-10-11 00:08:39 +00:00
Jesse Vincent
777c3e28b5 Disable theme in preferences to work around an android bug 2010-10-10 19:29:15 +00:00
Fiouz
296ab4f2be Update issue 1623
Message retrieval:
- Use the given projection for the cursor result instead of always using a predefined projection. Extraction logic is now in dedicated classes for easy extension.
- Added BaseColumns._ID & BaseColumns._COUNT columns.
- Deprecated "id" column since it's not a reliable identifier (it's an incremential value generated at query() time)
2010-10-09 09:19:24 +00:00
cketti
3503355b2e "Reply after quote" preference wasn't persisted. 2010-10-09 03:17:59 +00:00
cketti
385c34e190 Refactoring
- Moved ListPreference helper functions from FontSizeSettings to K9PreferenceActivity
- Used helper functions in Prefs
- Reordered preferences in Prefs to match the order in global_preferences.xml (display order)
2010-10-09 01:05:29 +00:00
cketti
96f18734f4 Minor rename 2010-10-09 00:48:46 +00:00
cketti
da7210d1db Refactoring: Some variable, method, and id renaming. 2010-10-09 00:38:52 +00:00
cketti
7028a4c167 Fixes issue 2144
- Removed the contact names cache (memory leak)
- Changed Contacts.searchByAddress() to Contacts.getNameForAddress(). Cursor is now immediately closed.
- Only try to resolve contact names when "Global settings" -> "Show contact name" is checked
- Never resolve contact names if number of recipients exceeds a threshold
2010-10-09 00:24:43 +00:00
cketti
4f429ec3bc Update issue 2144
Forgot to actually save the value when leaving global settings.
2010-10-09 00:13:46 +00:00
cketti
23b53bd660 Update issue 2144
Added option to show names from contacts to global preferences (value isn't used yet).
2010-10-08 23:50:33 +00:00
Jesse Vincent
72cb0bf7ec remove debugging statement 2010-10-08 06:56:50 +00:00
Jesse Vincent
8c1eda3149 An attempt at cleaning up after the 3.00x and earlier bug that caused
K-9 to leave old headers hanging around in the database
2010-10-08 06:33:04 +00:00
Jesse Vincent
ccc9a99d94 make batch buttons behave correctly if the last selected item is deleted
while in a messageview
2010-10-08 06:18:45 +00:00
Jesse Vincent
b0de9913e0 more correct list updates after restore 2010-10-08 06:18:30 +00:00
Jesse Vincent
7881039cbf astyle 2010-10-08 05:34:46 +00:00
Jesse Vincent
945bccd633 First pass at a sane "restore list state" behavior when going back to a
messagelist from a message view
2010-10-08 05:34:33 +00:00
Jesse Vincent
78f797dda8 A previous refactoring broke notification for messages from the user by
replacing  a localized string with substitutions with a concatenation
in one of two places the string was used.
2010-10-08 05:09:38 +00:00
Fiouz
6feb483f36 Update issue 1623
Restored accidently dropped content resolver notification code (dropped during r2397 refactoring)
First pass at documenting exposed fields
2010-10-06 20:14:33 +00:00
Fiouz
f858c72482 Added @Override compile check 2010-10-06 17:51:35 +00:00
cketti
9b5436d23b Removed (redundant) debug logging from the IMAP parser code. 2010-10-06 01:50:02 +00:00
Fiouz
548e6e7c77 Update issue 1623
Don't export the formatted date through the content provider: now exported as the raw Epoch value - date formatting is a UI concern. That makes MessageInfoHolder lighter.
2010-10-05 22:33:20 +00:00
Fiouz
58c80ad096 Update issue 1623
Added semaphore to prevent third party content resolver from exhausting K-9 resources: it won't allow more than 1 cursor to be active at the same time. Concurrent threads (other content resolver invocations) will be suspended until the previous cursor gets released.
2010-10-05 20:23:07 +00:00
Jesse Vincent
6061c42ea9 find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs 2010-10-05 06:04:28 +00:00
Jesse Vincent
58bb54a588 when quoting an html body part for forwarding, downrez it to plain text.
In the glorious future, we should be forwarding as an attachment. but
this is better than the previous behaviour
2010-10-05 06:04:16 +00:00
Jesse Vincent
ae53a0c5ff broke addAttachmentView into its own sub 2010-10-05 06:03:51 +00:00
Jesse Vincent
524350a960 Replace our (incomplete) custom MIME type list with a call to webkit. 2010-10-05 06:03:24 +00:00
Fiouz
4d24101e13 MessageProvider:
- Prevented from handling queries while K-9 isn't ready
- Added more log output
2010-10-05 05:09:17 +00:00
cketti
00ffc4f7fe Reverted "shortcut" to global settings in menu for search results (message list) as this led to display problems with Android 2.2.
Fixes issue 2347
2010-10-04 00:01:59 +00:00
Fiouz
a3f4429963 Switch to UNIX EOL style 2010-10-03 11:08:42 +00:00
Fiouz
f1d413ce77 Optimization: extracted populate() outside MessageInfoHolder in order to properly cache DateFormat (avoid useless DateFormat costly lookup at each population) 2010-10-03 10:56:16 +00:00
Fiouz
9347409e14 Changed case of CheckboxListPreference class to match the Android framework naming pattern 2010-10-03 09:26:30 +00:00
Fiouz
8bb6eb146b Optimizations:
- Don't instantiate an empty Address array just to throw it away (less gabarge collection)
- Use a StringBuilder rather than a StringBuffer (faster as it isn't synchronized)
2010-10-03 08:28:56 +00:00
Fiouz
ef1d958092 Optimization: don't invoke Cursor.getXXX(int) more than necessary 2010-10-02 18:45:51 +00:00
Fiouz
75984939d1 Don't embed helper instance inside a data transfer object (ideally, the populate() method should be moved outside that DTO to an external service/helper) as this might lead future development to introduce unwanted dependency graphs (= memory leaks) 2010-10-02 09:07:14 +00:00
Fiouz
bb64a0ab01 Update issue 2379
Status: Fixed
Extracted Intent.ACTION_SENDTO handling in a separate block to extract data from URI (as opposed to ACTION_SEND which uses Intent extras to pass data)
2010-10-02 08:14:12 +00:00
Fiouz
f6064ff19f Use a thread pool to optimize resource usage instead of always firing up new threads (less garbage collection).
Note: this is not a complete revert of r2153 since the pool is now automatically expanded as needed (different implementation).
2010-10-02 07:45:11 +00:00
Fiouz
71dbdf3417 Update issue 1623
Removed dependency from K9 to MessageProvider (and added ability for components to register themselve for being notified when K9 instance is ready)
Moved Intent broadcast code from MessageProvider to K9
Made query() easily extensible using strategy pattern, the discriminant still being the Uri path
2010-10-01 19:41:39 +00:00
Fiouz
01f961c058 Update issue 1623
Fixed severe design flaw where the message provider would accumulate messages, causing an OutOfMemoryError even when the message provider isn't explicitely invoked.
query() is now synchronized with message retrieval
2010-09-26 16:01:41 +00:00
Koji Arai
2a39cd5206 Fixes issue 2282
Added an option whether the registered name color is change or not
Avoid "Connection error" when MessageView is opened. The contacts.getName() might return null.
2010-09-26 14:39:52 +00:00
Jesse Vincent
a2fe3bda34 When a new mail alert is alerting about a specific mailbox rather than
inbox, default to having it open that mailbox.  Patch from thardie
2010-09-22 15:43:43 +00:00
Jesse Vincent
b6124fb397 deleteHeaders deleted message headers by id when it should have been
deleting by message_id.  I believe this was our last serious leak in
our flash storage

deleting message headers was....just wrong. we've fixed other similar
bugs inherited from android 1.0 before.
2010-09-22 02:46:20 +00:00
Fiouz
4cb2d52c9c Refactored message sorting code by extracting the sort code from the sorted object (this was a bad design, worsened by the MessageProvider patch). Ideally, new Comparator classes should get promoted to top-level classes and not be enclosed in MessageList.
Subject stripper backported from issue258 branch (Utility.java)
The result is a cleaner MessageInfoHolder class.
2010-09-21 22:12:45 +00:00
Marcus Wolschon
9ef306413b MessagingController not propagating provided listener 2010-09-20 11:47:02 +00:00
Fiouz
0990609727 Don't forget to remove some Preference entires when deleting Account 2010-09-19 21:10:56 +00:00
Fiouz
e28e6d8817 Added ability to disable LED notification for new messages (new account setting)
Extracted notification related settings in separate class (see Issue 2268)

Update issue 371
Status: Fixed
Added ability to disable LED notification for new messages
2010-09-19 20:54:43 +00:00
Fiouz
e16a79d08c Javadoc comment 2010-09-12 06:11:08 +00:00
Fiouz
c8a5de7abd Intent.ACTION_SENDTO.equals(action) was tested twice in the same if/else if statement causing the last one to never match, removed the first one in order to properly enable intent-based activity population
Fixes issue 2110
"Intent.ACTION_SENDTO.equals(action)" removed from first condition
See r1712
2010-09-12 05:26:13 +00:00
Fiouz
bbd664ad3c Optimization: don't use bytes and related byte/char conversion when we're actually working on string only 2010-09-11 11:20:50 +00:00
cketti
8cf2655dd8 Reverted r2332 and r2333 because the cause of the problem reported in issue 2078 seems to be different than initially thought. 2010-09-09 23:52:06 +00:00
Fiouz
5aa56e1569 Code cleaning: remove unused imports/variables 2010-09-04 06:57:25 +00:00
Jesse Vincent
3291c585e8 Improve Volume navigation settings, fix a bug when a list view is in
touch mode.

Patch by fiouzy.
2010-09-03 21:41:32 +00:00
Fiouz
de31886f44 Fixes issue 2230
Owner: fiouzy
Synchronize access to designated list to prevent concurrency issue
2010-09-03 20:32:12 +00:00
cketti
a85ea2ee53 - Reworked the previous patch with suggestions by jessev to be as runtime/memory efficient as possible without being useless.
- Output debug message when invalid responses are encountered.
2010-09-03 15:32:25 +00:00
cketti
b9b15295cd Added yet another work-around for an IMAP server implementation with a creative interpretation of the specification. Sanity check results returned for a SEARCH command.
Fixes issue 2078
2010-09-03 13:58:09 +00:00
cketti
9d9e669d65 Code cleanup 2010-09-03 02:15:57 +00:00
cketti
b44bed2596 Fix NullPointerException
Fixes issue 2261
2010-09-03 01:16:41 +00:00
cketti
0c27a1ab0e Avoid division by zero.
Fixes issue 2259
2010-09-03 00:56:19 +00:00
cketti
525d9a2ef9 Don't choke on malformed UIDL responses (POP3).
Fixes issue 2252
2010-09-02 23:59:20 +00:00
Jesse Vincent
6573f27cec do our messagelist updates from sync on the ui thread rather than the
sync thread. copy the incoming message list to deal with concurrent
access issues.  Patch by cketti++
2010-09-02 03:45:16 +00:00
Fiouz
08f10f1fe5 Issue 1711 (don't display subject when phone locked)
Modified code so that subject is still visible after unlock when notification bar is expanded
2010-09-01 22:37:11 +00:00
Fiouz
f43db5235c Fixes issue 1711
Owner: fiouzy
Don't display message subject in notification bar when keyguard is active (system locked)
2010-09-01 22:26:36 +00:00
Fiouz
f21d86d8ce Fixes issue 1945. Toast debug location when enabling debug logging. 2010-09-01 21:27:11 +00:00
Fiouz
9b285ae3fc Fixes issue 939
Heavily inspired from Gmail implementation. Currently implemented only for MessageView delete operation.
2010-09-01 20:59:09 +00:00
Koji Arai
842a5ee123 Update issue 2144
Use setSpan() instead of Html.fromHtml()
Should clear cached name of contacts at MessageView#onClickSender().
2010-09-01 01:35:20 +00:00
Jesse Vincent
a83fd2d548 Kill an insanely chatty log message 2010-08-31 05:01:26 +00:00
Jesse Vincent
a1496bd839 Revert the clever runonuithread hack from the previous commit, as it
leads to concurrent modification exceptions. "oops" :/
2010-08-31 04:29:56 +00:00
Jesse Vincent
7030967fa7 astyle 2010-08-31 03:58:33 +00:00
Jesse Vincent
7bd8fc3599 When we sync messages and are displaying a messagelist, do the listview
updates on the UI thread rather than the sync thread. This is a huge
performance boost (based on simple empirical testing) for initial syncs
as we now do more work as we add messages to message lists
2010-08-31 03:57:02 +00:00
Jesse Vincent
db1b86a296 Better visibility toggling as k-9 switches between messages in
MessageView
2010-08-31 03:55:30 +00:00
cketti
7f72da93e0 Added missing bit of achen.code's patch for issue 2211 (reply below quote) 2010-08-30 21:27:07 +00:00
Koji Arai
b1074329e4 On the MessageList and the MessageView, prefer to use the display name registered in the Contacts rather than raw addresses.
Update issue 2144
2010-08-30 14:37:34 +00:00
Koji Arai
e5c4f35737 Correct loading the alternated font size preferences. 2010-08-30 14:14:43 +00:00
Jesse Vincent
4bf233fba5 next and previous were reversed from K-9's standard interpretation of
them in the previous patch to add volume button navigation
2010-08-30 03:05:41 +00:00
Jesse Vincent
12eb866370 Remove a temporary variable 2010-08-30 02:16:38 +00:00
Jesse Vincent
65f0d22355 Add Volume button navigation in MessageView, MessageList and all
K9ListActivity subclasses.

The MessageView code is a patch from paulkilroy@gmail.com.

Fixes Issue 2112
2010-08-30 02:16:20 +00:00
Jesse Vincent
0f1a1baa89 Add a preference to use volume up / volume down to navigate items.
From a patch by paul.kilroy@gmail.com. Partial resolution of Issue 2112
2010-08-30 02:15:59 +00:00
Jesse Vincent
be8ac83198 A first pass at letting users choose not to top-post their message
replies.  Code By achen.code@gmail.com

Fixes Issue 2262
2010-08-30 00:00:34 +00:00
Jesse Vincent
6e2c5be84c simplify a boolean in isMoveCapable 2010-08-29 23:40:14 +00:00
Jesse Vincent
1f399f5904 Simplify a boolean conditional 2010-08-29 23:40:00 +00:00
Jesse Vincent
7d2804549e Remove redundant "return" statements from the end of void methods (with
help from intellij)
2010-08-29 23:39:45 +00:00
Jesse Vincent
4f0bce1569 Simplify many, many boolean conditions with help from IntelliJ 2010-08-29 23:39:26 +00:00
cketti
3d27cf220a Removed some code/string duplication. 2010-08-29 18:46:51 +00:00
Jesse Vincent
89dcc3646b Database version bump to clear bogus cached attachments 2010-08-29 16:58:04 +00:00
Jesse Vincent
6031862bad Before we delete messages earlier than the earliest acceptable date, make sure we also delete their attachments. 2010-08-29 16:57:57 +00:00
Jesse Vincent
fe62812ff2 Delete the attachments from disk before we delete them from the database, so we know what to delete. 2010-08-29 16:57:49 +00:00
Jesse Vincent
994ed6653c simplify some of our flagging logic and remove duplication using ternary operators 2010-08-29 16:57:40 +00:00
Jesse Vincent
6d38c1c71a Comments to better explain what's really going on on delete of messages 2010-08-29 16:57:31 +00:00
Jesse Vincent
a5b7aa97dd typo fix 2010-08-29 16:57:24 +00:00
Jesse Vincent
e0447e32cc astyle 2010-08-29 16:57:13 +00:00
Jesse Vincent
7300aca2b8 Remove a call to deleteHeaders since headers are deleted implicitly by
an SQLite trigger.

Call our new variant of deleteAttachments() to avoid an extra lookup
2010-08-29 16:57:02 +00:00
Jesse Vincent
31613e15c7 extract the method for "delete a message" from the "Set flags" method 2010-08-29 16:56:54 +00:00
Jesse Vincent
54a4c84afa Split out deleteAttachment to avoid an extra SQL call if we can. 2010-08-29 16:56:45 +00:00
cketti
38c31db8f6 Don't open a connection to the server if the protocol doesn't support flags and the flag to be changed isn't the deleted flag. This avoids unnecessary connections to POP3 servers.
Fixes issue 2046
2010-08-28 21:15:23 +00:00
Koji Arai
015666b657 Fixed issue 2174
When selecting one of the five vibrate patterns or the number of repetitions, we should demonstrate to the user what the vibrate pattern feels like. (Thanks to achen.code)

use the ListPreference instead of the EditTextPreference to set vibrate times.
2010-08-28 14:00:34 +00:00
cketti
41ebeb3498 Don't show K9mail-errors as move/copy destination folder.
Fixes issue 2219
2010-08-27 01:02:29 +00:00
Thialfihar
a93da0ed80 decoupled PgpData from CryptoProvider, moved the crypto provider into Account 2010-08-22 09:51:17 +00:00
cketti
df0ae4e4bf Update Issue 2168
Respect "Return to list after delete" after pressing on "Archive", "Move", or "Spam" button.

TODO: Change strings to reflect this change (e.g. "Return to list after move/delete")
2010-08-19 03:14:27 +00:00
cketti
90ee194d0f Fixes issue 387
Applied patch by achen.code (thanks!) to word wrap the quoted text on replies.
2010-08-19 02:49:13 +00:00
Marcus Wolschon
00d30f1b8a NullPointerException and TODO-Marker on a strange code-line 2010-08-18 14:27:39 +00:00
Marcus Wolschon
726b472330 set context before using it 2010-08-18 14:13:37 +00:00
Jesse Vincent
0b62640eac Provisional initial commit of MessagingProvider code by
stephane.lajeunesse and koxx33

We're going to try it out in the 3.1 dev series. if it ends up looking
good, it'll be in 3.2
2010-08-18 02:49:13 +00:00
Jesse Vincent
ff5024eaec astyle 2010-08-18 02:48:55 +00:00
Jesse Vincent
86dc82f916 Merge branch 'ideal-screenreader'
* ideal-screenreader:
  The IDEAL Group have joined the K-9 dogwalkers and submitted their code to be part of K-9!
  Initial import of the Ideal K-9 branch which adds support for screenreaders.
2010-08-18 02:01:10 +00:00
Jesse Vincent
8832933a60 It turns out that if you're only fetching the bodystructure, the mime4j
parser can't parse the message.
2010-08-17 04:21:22 +00:00
cketti
02aad5945a Added null pointer check.
See issue 2154
2010-08-16 19:34:48 +00:00
cketti
ba95150a31 Use IP address for SMTP EHLO if hostname contains invalid characters, e.g. underscore.
Fixes issue 2143
2010-08-15 19:26:44 +00:00
Koji Arai
7964c34dbd Fixes issue 2145
Cannot show the emoji icon on Android 1.6 at least. Replaced all "< img" to "<img".
2010-08-15 14:52:59 +00:00
cketti
da90792fa7 Don't call MimeUtility.unfoldAndDecode() on the message body when scanning for external image references. Also cleaned up the code a bit. 2010-08-15 04:05:39 +00:00
Jesse Vincent
73c3872dd0 Improve our display of inline images in HTML mail to not also offer
themselves up for download.

To do so, we need to start storing the original content-id and
content-disposition for attachments - this includes a database upgrade.

Based on a patch from @achen.code
2010-08-15 02:37:06 +00:00
Thialfihar
95fd605b0e default account setting cryptoApp to APG 2010-08-14 19:30:37 +00:00
cketti
0e4c1dfacb Added helper class to access contacts. Uses the old contacts API for SDK/API 3+4 devices and the new API for SDK/API 5+ devices.
All places that accessed the contacts have been updated to use this helper class.
2010-08-14 13:59:33 +00:00
cketti
0eb342ef5a Code cleanup (Removed unused imports, added @Override annotations) 2010-08-13 14:06:13 +00:00
Marcus Wolschon
97001b6edb filter on folder-selection 2010-08-13 06:37:00 +00:00
Thialfihar
b839866e17 removed some unused APG constants, added an APG Intent API version to be sent along with all Intents 2010-08-12 17:39:50 +00:00
Fiouz
1e67fc4cde Update issue 1290
Update issue 1916
Added support for country/region specific locales
2010-08-12 11:03:19 +00:00
Jesse Vincent
a0238904b6 Update our emoji implementation to support docomo, softbank and kddi
(with the exception of 3 kddi glyphs that overlap with softbank).

As of this commit, emoji sent by iPhone users are visible in K-9
2010-08-12 02:22:35 +00:00
Jesse Vincent
d123aa2a39 Add a hook for hinting charset conversions to Java, since Android's java
doesn't know about all conversions.
2010-08-12 02:22:25 +00:00
Jesse Vincent
54633a4e16 Improvements to "more from this sender" - hopefully this should search
only on actual addresses, not their local parts.
2010-08-12 02:22:08 +00:00
Jesse Vincent
ece68bae5d Off-by-one error in the recent IMAP fetch work :/ 2010-08-12 02:21:56 +00:00
Jesse Vincent
de16b21124 Add debug logging when K-9 doesn't enable push because the user has
configured push to be off.
2010-08-11 03:36:49 +00:00
Jesse Vincent
0229d8a1fe Implement windowing for IMAP UID FETCH
Our previous implementation of UID FETCH didn't ever take into account
maximum command line lengths. When fetching, say 800 messages from a
GMail IMAP server, we could easily overflow the max line length leading
to a fetch that didn't get all the messages we wanted to and was
truncated before the description of which fields we want. That caused
K-9 to fetch complete messages, exhaust memory and ultimately fail,
even when we were just trying to get message lengths.

An equivalent fix needs to be made to seach by UID.
2010-08-11 03:36:40 +00:00
Jesse Vincent
9ebf16e3d9 Finish removing the ThreadPool / ExecutorService Left over from when the
code was actually in the view class
2010-08-10 04:29:18 +00:00
Jesse Vincent
490ab6b8c0 Try harder to make message loading feel responsive and scroll correctly.
We're still not there.
2010-08-09 03:16:40 +00:00
Jesse Vincent
a724df79d4 To date, "loadMessageForView" competed for threads in a thread pool with
all of our mail syncing code. This led to very choppy UI experience.

This change doesn't entirely fix message load lag, but the _worst case_
I see is now better than the best case I saw last week.
2010-08-08 23:49:27 +00:00
cketti
2e6a67c2a7 Better text filter for ChooseFolder (folder is displayed if search term is found anywhere in the folder name, not just at the beginning)
Heavily based on a patch provided by Marcus.Wolschon

Fixes issue 2098
2010-08-08 20:27:39 +00:00
Jesse Vincent
1f725a2d5c increment the new message count if the message is in a notifiable folder
and the account wants notifications. (even if we don't
notify for a message from ourselves, we DO increase the notification
count.)
2010-08-08 19:43:01 +00:00
Jesse Vincent
ce9a84e8fd Quick updates from a code review pass by cketti 2010-08-08 19:35:18 +00:00
Jesse Vincent
d2e3061f20 Lift our initial unread counter up higher so that it happens before
called code starts resetting the unread count again.
2010-08-08 19:14:52 +00:00
Jesse Vincent
06a3d5985b Avoid allocating two temp variables on sync 2010-08-08 19:14:47 +00:00
Jesse Vincent
f5a399f6c6 extract out "should we notify" from "notify";
rather than calculating the number of pre-existing new messages for this
sync twice, do it once, a bit earlier.
2010-08-08 18:50:31 +00:00
cketti
43fb202d43 Fixes issue 1522
Added option to automatically show images in message view (always, if sender is in contacts, never).
Patch by paulkilroy (thanks!)

Includes bugfix for the "Show pictures" on orientation change code introduced earlier.
2010-08-07 22:38:08 +00:00
cketti
9d45470b40 Fixes issue 1076
Remember "Show pictures" button state when changing orientation.
2010-08-07 21:37:57 +00:00
cketti
5c588992a0 Fixes Issue 2076
Remove german version of the "Re:" prefix when replying to messages. So instead of "Re: AW: subject" we get "Re: subject".
2010-08-07 19:25:47 +00:00
Fiouz
dfb8f9e0f2 Memory management optimisation: help garbage collection by avoiding repeated instantiations of immutable arrays (empty arrays of String, Message, Flag, Address) 2010-08-07 15:10:07 +00:00
Thialfihar
54e0ad5ce0 added some comments to explain some cryptography-related classes and to-dos 2010-08-05 10:55:59 +00:00
Thialfihar
11e28698e1 hide the decrypt signature layout in MessageView if no signature exists, fixes the wrong display of signatures from another message 2010-08-05 10:45:58 +00:00
Fiouz
380452355c MessageListAdapter:
- Use of a single View.OnClickListener for all messages.
- Extracted method to bind message item views (from MessageInfoHolder to MessageViewHolder).
2010-08-03 07:46:31 +00:00
Fiouz
ad9c315cf4 No longer need to extend Handler since r1126: we're using Activity.runOnUiThread() 2010-08-03 06:09:39 +00:00
Fiouz
2a476dc92c Additional @Override compile check 2010-08-03 05:46:35 +00:00
Jesse Vincent
f15101420e Revert "I like this idea, but it's not ready for 3.000"
This reverts commit f812a3485445c7db4024f84865aaa5d8e6b7b3a0.

(Now that 3.0 is branched, this can be on trunk again for further work)
2010-08-02 22:34:21 +00:00
Jesse Vincent
58c5afc77b I like this idea, but it's not ready for 3.000
Revert "It turns out that a big part of our perceptible message switching time"

This reverts commit 06f9bb5b7f3064e646b43148d188cec06cd14d11.
2010-08-02 22:32:57 +00:00
Fiouz
44cef83e0b Use of constants for immutable empty arrays (prevent useless memory allocation) 2010-08-02 11:55:31 +00:00
Jesse Vincent
d4695636f3 It turns out that a big part of our perceptible message switching time
was loading the "loading..." file into the WebView. Since it doesn't
take that long to load the real content, replacing the "Loading..." file
 with "blank the view" seems to actually feel a heck of a lot faster.
2010-08-02 03:03:58 +00:00
Jesse Vincent
f2729fc58b Don't show "To: " if the only recipients were ccs and bccs. 2010-08-02 03:03:53 +00:00
Jesse Vincent
cd6b64d88f Experimental changes to tell WebView that the HTML versions of messages
we generate from ascii are "mobile-optimized"
2010-08-02 01:27:50 +00:00
Jesse Vincent
d78e7a0d69 Switch from the incomplete (but compatible with java 1.3) mime4j charset
alias resolver to the core java nio version with a better charset
database;

rather than falling back to not showing the user a failing message, fall
back to showing the user the message as ascii -- it makes it possible
to get _something_ out of an unknown-charset message, rather than just a
"ha ha. no." error.
2010-08-02 01:27:46 +00:00
Jesse Vincent
7fc921c0b7 astyle 2010-08-02 01:27:40 +00:00
Jesse Vincent
a4381696f9 Support Emoji for DoCoMo.
Emoji icons are derived from http://start.typepad.jp/typecast/
2010-08-02 01:24:40 +00:00
Fiouz
3bbb6ae050 Don't display Archive/Spam batch operations when corresponding folders are unset 2010-07-30 09:58:26 +00:00
Jesse Vincent
d8a73b195d Factor out the decision about whether a part is "viewable" for purposes
of fetching ; remove broken "inline" check from the same.
2010-07-30 00:58:33 +00:00
cketti
0c67f1f4cf Only ask for POP3 capabilities before authorization if TLS should be used. Always ask after authorization. 2010-07-30 00:58:22 +00:00
cketti
91e55f6fa1 Don't log POP3 passwords by default. 2010-07-30 00:53:46 +00:00
Jesse Vincent
d8a757faaf Try to avoid a bunch of reallocations as we grow the temporary output stream by defining its size if we can get it 2010-07-29 22:17:35 +00:00
Jesse Vincent
134c0b23dd Backport a bit of memory efficiency I'm not sure I believe from AOSP 2010-07-29 22:17:32 +00:00
Jesse Vincent
0bb115ca42 Actually catch an OOM in getTextFromPart
Backport an update to getTextFromPart from AOSP as of 290348 - dealing with OOM as we import large messages
2010-07-29 22:17:29 +00:00
Jesse Vincent
c6aa505ffe improve the method docs on getTextFromPart
Backport an update to getTextFromPart from AOSP as of 290348 - dealing with OOM as we import large messages
2010-07-29 22:17:26 +00:00
cketti
4c1060ecae Only show "save or discard" dialog before leaving the message compose activity if the message needs saving. 2010-07-28 23:17:46 +00:00
Thialfihar
3d5fb524ef set account setting crypto app to "APG" by default 2010-07-28 21:28:51 +00:00
Thialfihar
5e30c3dab1 removed two extra lines from the merge in r2055 2010-07-28 12:10:08 +00:00
Jesse Vincent
2ca76e3db0 Fix for Issue 1956
A race condition made the outgoing certificate being compared to the old
incoming mHost,
throwing an exception with an untrusted certificate dialogue to accept
or decline.
2010-07-27 18:59:41 +00:00
Jesse Vincent
7a4d12b53b Merge from apg-integration 2010-07-27 12:10:09 +00:00
Jesse Vincent
bae8a9736d Clean up some inverted logic 2010-07-27 01:28:03 +00:00
Jesse Vincent
b1fb92034a clean up some weird inverted logic (as recommended by intellij) 2010-07-27 01:27:54 +00:00
Jesse Vincent
c541a07ed2 Don't fire off a notification about new mail before we finish
initializing an account.
2010-07-27 01:27:45 +00:00
Jesse Vincent
766a115155 Remove URLs from message previews. Suggested by Kevin Falcone 2010-07-24 02:09:12 +00:00
Jesse Vincent
19a06d39a1 With all the other performance work we've been doing, getting a message
into the messagelist is now much, much faster. Intentionally loading the
whole mailbox before we let the user interact with the list is
increasingly painful. A 250 message mailbox takes 2+ seconds to "unlock"
on a modern phone.

Consequently, this commit switches us _back_ to progressive loading of
mailboxes from the synchronous version.

Based on user feedback, we may or may not keep this for the production
release.
2010-07-22 04:17:13 +00:00
Jesse Vincent
80e134c03c astyle 2010-07-22 03:40:30 +00:00
Jesse Vincent
eb21807384 Moving sendMessage and saveMessage into AsyncTasks to make the send/save
buttons much less janky
2010-07-22 03:40:22 +00:00
Jesse Vincent
8182b8a8ee Split out sendmessage and savemessage - the sendorsavemessage method
didn't actually have them sharing code.
2010-07-22 03:40:14 +00:00
Jesse Vincent
338919a9a0 Merge remote branch 'remotes/issue814'
* remotes/issue814:
  Changed the appearance of the ChooseAccount activity to better match the look of the account list.
  svn:eol-style set to LF (UNIX style)
  Update issue 814 Status: Started Cc: +fiouzy Reuse of res/layout/accounts_item.xml to match account list Automatically expand/scroll to Intent-presented account
  - Patch provided by fiouzy (ability to choose identity from other accounts) - Modifications in MessageCompose by cketti (use MessageReference to replace mFolder and mSourceMessageUid)
  Created branch for issue 814 (Feature to select account to send from in compose screen)
2010-07-22 03:15:28 +00:00
Jesse Vincent
75b8487024 First bits of infrastructure for not showing HTML-mail inline images as
downloadable attachments
2010-07-19 06:13:41 +00:00
Jesse Vincent
65e318a80e mark thumbnails as .tmp files that should be explicitly gced on start. 2010-07-19 05:32:45 +00:00
Jesse Vincent
7de3aeb740 Actually, clearing the tempdir from attachmentprovider stomps on our
binary download usage of the temp directory. Reverted!
2010-07-19 05:32:37 +00:00
Jesse Vincent
f9a24cb123 astyle 2010-07-19 01:57:49 +00:00
Jesse Vincent
a75bf8668e K-9 wasn't properly clearing the thumbnail/tmpfile cache. We now
properly clear it up on start, which causes K-9 to leak less flash
memory AND
fixes the "Wrong thumbnail" bug.
2010-07-19 01:55:23 +00:00
Jesse Vincent
f7032c4161 Android is growing up a bit. artificially limiting the user to
attachments of only 5MB is counter-productive, bump the artificial limit
to 128M
2010-07-19 01:55:09 +00:00
Jesse Vincent
6ef923be91 After we download attachments, get rid of the "old" attachment views 2010-07-19 01:54:55 +00:00
Jesse Vincent
2ee5b49cf2 When marking a message as read as we're opening it from the message
list, don't "bother" sorting the messagelist again before opening the
message, it adds a _bit_ of slowness when we don't need it and
we'll sort again when we get back to the message list.
2010-07-19 01:54:38 +00:00
Jesse Vincent
0fcae025b2 per a bunch of complaints, it looks like my new notification counting
code was off-by-one
2010-07-19 01:54:23 +00:00
Jesse Vincent
819692e025 refactor one of the versions of 'getAttachmentUri' in terms of one of
the others. less code == fewer chances to screw up
2010-07-19 01:54:09 +00:00
Jesse Vincent
6d20c65778 remove the old "isdownloading" notification for the current message. 2010-07-19 01:53:49 +00:00
Jesse Vincent
ad7839e46e remove debugging statement 2010-07-19 01:53:30 +00:00
Jesse Vincent
a63beda64b Finish backing out the "sort by received date" patch until we get the
recieved-date support sorted out
2010-07-19 01:53:14 +00:00
Jesse Vincent
111e6f5109 First pass at a "download the rest of this message" button 2010-07-19 01:52:59 +00:00
Jesse Vincent
d0c24e23c7 simplify account loading code by caching Preferences.getPreferences() 2010-07-19 01:52:43 +00:00
Jesse Vincent
7464a1527a Convert for loops to "enhanced" syntax per SDK performance guidelines
(Automatic with Eclipse)
2010-07-19 01:52:18 +00:00
Jesse Vincent
8f1d535630 make it possible to get to global settings from the folder list 2010-07-16 01:24:01 +00:00
Jesse Vincent
b21120405e Use a simple HashSet for our listener set since we don't need the
overhead of the CoWASet
2010-07-16 00:38:32 +00:00
Thialfihar
19ca87a2d5 removed the initiation of "select text" via long press again
Update issue 662
We tried out the long press for a bit and deemed it too sensitive for general usage. It can cause problems with gestures and such, so I removed it again. I hope using the option menu is not too much overhead.
If you want to include it in your custom build or anything, then r 1976 and r1977 should be enough.
2010-07-15 21:35:57 +00:00
Jesse Vincent
f492ee9d0b back out the rest of my localDate changes for now due to user
complaints.
2010-07-15 03:47:45 +00:00
Jesse Vincent
b8e82085f9 At the end of header sync reset the counts. 2010-07-15 03:42:20 +00:00
Jesse Vincent
a58d91f7c7 astyle 2010-07-15 03:42:17 +00:00
Jesse Vincent
d3cc1fdfdc Rather than doing a full count of all the unread messages in each and
every folder for each message downloaded in a session, factor the
"unread messages" count out into the calling code.  It's slightly less
clean, but a pretty huge performance gain.

Fixes issue 1443
2010-07-15 03:42:13 +00:00
Jesse Vincent
1bea931ed0 since we're checking seen status within the notify method, (first thing,
even), we don't need to do it in the caller code.
2010-07-15 03:42:09 +00:00
Jesse Vincent
ff62ae5c23 Don't construct a listenerset clone if we don't need to.
danapple++ suggested the optimization
2010-07-15 03:42:05 +00:00
Jesse Vincent
08581f6538 isRing -> shouldRing so that the code reads sanely 2010-07-15 03:42:01 +00:00
Thialfihar
cc71273c4b remember which message was selected in MessageList in case the list changes while the dialog is up
Fixes issue 906
2010-07-14 18:39:57 +00:00
Thialfihar
91599ae963 ignore gestures during text selection
Fixes issue 662
2010-07-14 18:20:10 +00:00
Thialfihar
510e9acc83 added text selection via "long press" in MessageView, also giving a notification for when text selection starts
Update issue 662
Added the long press initiation of text selection. I also noticed we'll have to make sure text selection is not recognized as a gesture (or at least ignored as gesture).
2010-07-14 18:12:40 +00:00
Jesse Vincent
ed86fc8371 First pass at better end-user visibility into what K-9 is doing when we
appear to "sit" while syncing headers.
2010-07-13 23:59:14 +00:00
Jesse Vincent
49c0601390 cketti points out that I was cloning improperly.
(Also, reading the docs for add, I don't need to check existence first)
2010-07-13 21:54:11 +00:00
Thialfihar
014b6c19c3 svn:eol-style=LF for src and XML resources
Fixes issue 1982
2010-07-13 21:49:28 +00:00
Jesse Vincent
e17707330f reduce lots and lots of code duplication when calling out to listeners. 2010-07-13 21:17:10 +00:00
Jesse Vincent
986237d31f factor common code out of downloadLargeMessages and
downloadSmallMessages (catching a missing condition in one)
2010-07-13 21:17:04 +00:00
Jesse Vincent
70a1eef943 astyle 2010-07-13 21:16:56 +00:00
Jesse Vincent
a85c83f696 Revert "When deciding whether a message is older than a certain date, we should"
This reverts commit 98cab91631692b55ba72231126f612d6b4d4d662.

As Dan rightly suspected, it made pop3 sad :/
2010-07-13 21:16:49 +00:00
Jesse Vincent
8ab165ef31 Allow per-protocol configuration of which wire protocols are
debug-logged
2010-07-13 21:16:42 +00:00
Thialfihar
eda64bf1e7 display the language choices in their native names, added a larger set of native language names, which will be reduced to the supported languages at runtime
Fixes issue 1290
This may be a bit much, but I hope it can make it a little bit easier to add a new language later on and have consistent ordering.
2010-07-13 14:24:21 +00:00
cketti
665efc1448 Work-around to be able to read messages with "charset=0". QUALCOMM Windows Eudora seems to send headers like this.
Fixes issue 1952
2010-07-12 19:45:59 +00:00
Koji Arai
eb7289f97b Reverted a part of r1872.
Should save draft when the home button is pressed.
2010-07-12 14:57:42 +00:00
cketti
49e5ad4963 More cosmetic changes (again no change in functionality) 2010-07-12 02:17:48 +00:00
cketti
173b36d04e Removed unnecessary null pointer check. 2010-07-12 01:39:29 +00:00
cketti
f40a01b0d2 "Optimized" computeBatchDirection() to exit the loop once newState is set to true because it can never be changed to false again. 2010-07-12 01:09:47 +00:00
cketti
6fc14b9e07 Cosmetic changes to the code (no change in functionality) 2010-07-12 01:06:33 +00:00
cketti
e3cb9f4603 Synchronize iterator accesses to mHandler.messages to avoid ConcurrentModificationException in MessageList. Original analysis and patch was provided by fiouzy.
Fixes issue 1598
2010-07-11 22:01:11 +00:00
Jesse Vincent
1485502d47 Add a comment about the reason for a recent commit 2010-07-11 19:40:48 +00:00
Jesse Vincent
5a43acff2a Rather than accidentally reusing a public API function name with a
different signature, give the private command to pull a count
from the remote imap store its own name
2010-07-11 15:41:20 +00:00
Jesse Vincent
227ee95532 Disable the delete button after it's tapped (to try to prevent
accidental clicks)
2010-07-11 15:39:52 +00:00
Jesse Vincent
5d514c2ace extract out "setup message buttons on message display. 2010-07-11 15:39:41 +00:00
Jesse Vincent
20e47991c3 astyle 2010-07-11 15:39:26 +00:00
Jesse Vincent
73da009409 Hide the message header while flipping messages, rather than displaying
the "wrong" thing during load.
2010-07-11 15:31:31 +00:00
Jesse Vincent
00199de3bb Extract "disable buttons" on messageview and disable buttons before
shifting to the next message
2010-07-11 15:31:11 +00:00
Jesse Vincent
0a848d6526 Make the "header" section addressable in messageView (for later hiding) 2010-07-11 15:30:53 +00:00
Jesse Vincent
b3e6844e44 make the 'should we show animations' boolena actually 'showAnimations'
instead of isAnimations.
2010-07-11 15:30:40 +00:00
cketti
0c7d4825cc Avoid NullPointerException when trying to move a message before it is fully loaded (in message view).
Fixes issue 1957
2010-07-11 14:57:00 +00:00
Koji Arai
28d3967d0f Fixes issue 305
Support Content-Id header to show inline images.
2010-07-11 13:44:16 +00:00
Jesse Vincent
c359b2c6bf Comment out redundant logging of IMAP commands
Each IMAP command was logged 3 times in normal operation. It seriously
clouds the logs and makes it much harder to read and debug ongoing
connections
2010-07-11 12:31:47 +00:00
Jesse Vincent
7a543b45b1 Remove duplicate code between two message counting routines in ImapStore 2010-07-11 12:31:34 +00:00
Jesse Vincent
9321a045d9 When counting remote unseen/flagged messages, don't window to only the
most recent 300 messages - Since we display this # to the user, the
"last 300" heuristic ends up confusing and _wrong_ on a regular basis.
2010-07-11 12:31:22 +00:00
Jesse Vincent
ae339f1ac8 Add a per-account setting to choose how much of each message to download automatically. 2010-07-11 11:59:14 +00:00
cketti
e59987fdcb Display an error message (instead of "null") if a message couldn't be decoded because of a missing charset.
See issue 1480 for a test case.
2010-07-11 01:28:08 +00:00
Jesse Vincent
44f161fc7f extract "fetch unsyncced messages" from downloadMessages 2010-07-10 17:10:24 +00:00
Jesse Vincent
c2d9d0e15d extract "sync local message flags" from downloadMessages 2010-07-10 16:42:54 +00:00
Jesse Vincent
35b7fce087 factor out downloadSmallMessages from downloadMessages 2010-07-10 16:42:39 +00:00
Jesse Vincent
9dc3f09068 factor "downloadLargeMessages" out of "downloadMessages" 2010-07-10 16:42:12 +00:00
Jesse Vincent
ab8cdb3522 minor astyling 2010-07-10 16:41:48 +00:00
Jesse Vincent
0f17fc4a83 Factor a bit of code out of a 400 line method. Still needs a lot more
outfactoring
2010-07-10 16:41:34 +00:00
Jesse Vincent
4024cca2aa Add a comment about the custom IMAP command Yahoo! needs to work right. 2010-07-10 16:41:22 +00:00
Jesse Vincent
5aea9e7d9b Remove duplicate code from error message generation 2010-07-10 16:41:07 +00:00
Jesse Vincent
56217e8ad6 Debug message clarity fixes 2010-07-10 16:40:55 +00:00
Jesse Vincent
61b25c8760 only store an internalDate if we actually get it from the server; If we
don't have an internaldate, use the sentdate for sorting comparisons.
2010-07-10 16:40:34 +00:00
Jesse Vincent
52ff331771 When deciding whether a message is older than a certain date, we should
be prefering the date we can ~trust "Internal" to the date asserted by
the sender.
2010-07-10 16:40:13 +00:00
Jesse Vincent
ee63564138 "ReceivedDate" was an unused concept. Its value was never set. 2010-07-10 16:40:00 +00:00
Thialfihar
f2fe826fb3 make MessageList remember the last selected item 2010-07-09 11:12:32 +00:00
Thialfihar
67b23fc797 added a setting for language, overriding the system locale settings
Update issue 1290
2010-07-09 00:27:47 +00:00
Jesse Vincent
dbb4d6e21c Now that we have internal_date on all messages, we should be using it
for sorting. This will prevent spam with ...less true dates from pushing
messages to the top of your list. Additionally, when downloading
messages from the server, they'll actually appear in the order they were
received - the existing behaviour really screwed up users who were
trying to triage mail as it came in.
2010-07-08 16:33:19 +00:00
Jesse Vincent
fd234c2701 If we hit a race condition and download a message after it's already
been marked as suppressed, then don't actually save it locally
2010-07-08 15:49:26 +00:00
Thialfihar
190b597a45 add Archive keyboard shortcut to MessageList, refs issue 3 2010-07-08 15:27:22 +00:00
cketti
365d82407a Make "Settings" work in search folders.
Fixes issue 1844
2010-07-08 13:30:30 +00:00
cketti
8bc42639c4 Fix market-reported NullPointerException
Fixes issue 1660
2010-07-08 01:09:43 +00:00
cketti
1eb37c2031 Added menu option to select & copy text in the message view.
The standard ScrollView causes problems when selecting text (and the message is long enough so scrolling is possible). The newly introduced ToggleScrollView can be set to disable scrolling via touch gestures thus making copying multi-line text sections possible.

Fixes issue 662
2010-07-07 22:14:45 +00:00
Thialfihar
76df04e949 make shortcuts honour the account setting for the startup folder even if changed after shortcut creation, based on cketti's patch, refs issue 1025 2010-07-07 18:31:16 +00:00
Thialfihar
00a8f948eb added launcher shortcuts to accounts, refs issue 1025 2010-07-07 16:17:13 +00:00
Thialfihar
5d4073072f use "http://" as baseUrl in WebView instead of "email://", refs issue 267 2010-07-07 10:54:50 +00:00
Jesse Vincent
a826f33eb3 find src/com/fsck/ -name \*.java|xargs astyle --style=ansi
--mode=java --indent-switches --indent=spaces=4 --convert-tabs
--unpad=paren
2010-07-06 10:29:26 +00:00
Thialfihar
96b93f7327 minor coding style fixes 2010-07-05 18:06:30 +00:00
Thialfihar
8752347b5f merged archive-move-spam-buttons into trunk 2010-07-05 13:41:52 +00:00
cketti
42b0845522 Remember last selected folder for copy and move operations and scroll this folder into view on subsequent folder selections (for move and copy operations).
Fixes issue 1538
2010-07-04 23:29:57 +00:00
Koji Arai
a5a1ae7d28 Fixes Issue 41
Should query whether saving the draft message or discarding when back button was pressed.

Suppress to save the draft message automatically when attaching any file.
2010-07-04 17:46:55 +00:00
Thialfihar
24079b673d some old code removed 2010-07-04 14:52:32 +00:00
Thialfihar
03b28c8b68 Added account settings for "archive" and "spam" folders. See issue 3. 2010-07-04 13:48:06 +00:00
Daniel Applebaum
cdbcb188ec Fixes Issue 1664
Correct thread safety on some member variables when doing null checks.

Explicitly check for mMessageCount == -1 and stop=true in idling loop.

However, the original error message "Message count = -1 for folder"
will still arise in some circumstances and is a valid error to
report.
2010-07-03 15:22:54 +00:00
Daniel Applebaum
318099082f Fixes Issue 794
Implements new setting "Sync remote deletions" which is checked by
default.  When unchecked, K-9 Mail will no longer remove messages from
local storage just because the message was removed from the server.
This functionality works for all account types.  Messages will still
be removed from the local store in order to stay within the limit
imposed by the "Number of messages to display" setting.
2010-07-03 13:10:38 +00:00
cketti
45339457f8 Added preference to go to Integrated Inbox on application startup.
Fixes issue 1797
2010-07-03 00:26:35 +00:00
Fiouz
e8cb293e03 Fixes Issue 1887
Save/restore In-Reply-To/References headers on configuration change
2010-07-02 21:17:06 +00:00
Koji Arai
dab0c9a97f Fixes Issue 1914
Show To, Cc and From headers on the part of additional headers without fetching all headers.
2010-07-02 14:57:55 +00:00
Koji Arai
3ee3fad3d6 Fixes Issue 1915
Added the vibrate pattern preference.
2010-07-02 14:47:01 +00:00
Daniel Applebaum
9d2276aa0a Fixes Issue 1790
Refresh dialog "message" each time the dialog is raised.
2010-06-30 00:41:27 +00:00
Daniel Applebaum
3c146c5a7f Fixes Issue 1832
If the message isn't worth showing immediately, it is not worth
saving!

(Don't save a message unless we get at least a non-null subject and
non-null sender during first pass sync.)
2010-06-30 00:16:59 +00:00
Daniel Applebaum
fc55c54db0 Fixes Issue 1875
Change initial value for maximum message age to -1 (unlimited) instead
of erroneous 10.
2010-06-28 02:51:47 +00:00
cketti
7adc168471 Added a null pointer check to protect from NullPointerExceptions.
See issue 1749
2010-06-21 18:17:10 +00:00
Jesse Vincent
e485aa83c6 Fix for the abiltiy to hit "Back" out of global preferences after
switching away from K-9 and back again.

Fixes issue 1791

Patch by fiouzy@gmail.com
2010-06-21 14:39:22 +00:00
cketti
4a6b99b647 Fixed some warnings 2010-06-20 14:19:01 +00:00
cketti
d5f53a99e6 Removed comment 2010-06-20 14:11:16 +00:00
cketti
648e3bd829 Added option to specify the message quote prefix character/string (default ">"). Applied patch provided by fiouzy (Thanks!) with some small modifications.
Fixes issue 1830
2010-06-20 14:07:03 +00:00
cketti
7f625b5ef4 Added option to specify Reply-to address for an identity. Patch provided by fiouzy (Thanks!).
Fixes issue 1762
2010-06-20 12:48:22 +00:00
cketti
e529bed259 Added option to return to the message list after deleting a message in the message view activity. Patch provided by fiouzy (Thanks!)
Fixes issue 1634
2010-06-20 12:15:29 +00:00
cketti
a5c5aaa054 Better handling of cases where a special folder is set to INBOX (e.g. Sent folder = INBOX). Make sure we count unread messages and don't exclude the Inbox from notifications in this case.
Fixes issue 1817
2010-06-17 12:42:22 +00:00
cketti
6b5e9949d7 Show "From", "To", "Cc" headers in "raw" form when displaying all message headers.
Fixes issue 1805
2010-06-16 19:58:09 +00:00
cketti
4f7ab92985 Move to next/previous message in message view if a message was moved.
Fixes issue 1621.
2010-06-14 13:46:08 +00:00
Daniel Applebaum
8cb7f8f317 Fixes Issue 1763
Patch from jca02266 to use locale independent date formatter.
2010-06-11 12:56:01 +00:00
Jesse Vincent
dcd83f243b For post-2.8 - start at replacing text buttons with image buttons.
better images are desperately needed.
2010-06-10 03:37:23 +00:00
cketti
2aac012282 Folder.fetchPart() is called when it shouldn't be. Disabled the exception for now. See issue 1733 2010-06-09 19:44:35 +00:00
Jesse Vincent
504f1b7e17 Fixed 1597
Switching "Touch-friendly view" option from message list view no longer causes NullPointerException / Force close
2010-06-09 02:45:28 +00:00
Daniel Applebaum
c3739bb43b Fixes Issue 1755
r1789 has incorrect Issue (1411) mentioned.
2010-06-09 00:16:55 +00:00
Daniel Applebaum
6476281379 Fixes Issue 1411
Only automatically finish the FolderList Activity when actively
managing the back button.
2010-06-08 23:26:48 +00:00
Daniel Applebaum
80ed18c469 Fixes Issue 422
Committing this change to properly credit 'mpredosin' with the patch
committed at r1783 "Convert to hierarchical traveral from deep
traversal."
2010-06-08 11:33:47 +00:00
Jesse Vincent
87a567ea40 Bullet proofing to make IMAP fetches not break when folders have insane
default visible limits.
2010-06-08 02:37:18 +00:00
Daniel Applebaum
07f9abe162 Fixes Issue 422
Convert to hierarchical traveral from deep traversal.
2010-06-08 01:01:20 +00:00
Daniel Applebaum
bcb986451e Fixes Issue 1728
Use the default account when composing from search results.
2010-06-08 00:45:07 +00:00
Daniel Applebaum
dd86cdfec6 Fixes Issue 1732
Initialize mDisplayCount to a valid value.
2010-06-07 15:55:14 +00:00
Daniel Applebaum
e1d3f38b11 Fixes Issue 1732
Handle accounts with negative (invalid) saved display count values.
2010-06-07 15:51:02 +00:00
Jesse Vincent
421ecac997 Strip PGP headers from message preview 2010-06-06 22:28:29 +00:00
Jesse Vincent
c287c2e7df Patch from fiouzy to fix back-button in folderlist when you don't have
"Manage Back Button" enabled.
2010-06-06 21:48:44 +00:00
Jesse Vincent
366ce15196 Very first pass at contextual search. This _should_ end up as a submenu
with searches for "Same recipient", "In this conversations", "On this
date", etc.
2010-06-06 21:33:44 +00:00
Jesse Vincent
4bfebe42f1 Allow users to choose whether they want plaintext messages to be
fixed-width when uprezzed to HTML.
2010-06-06 21:33:33 +00:00
Jesse Vincent
0624f119df Gr. typo to my "word character" regex 2010-06-06 21:33:15 +00:00
Jesse Vincent
222808b51d Bump up preview length from 160 to 250 to make better use of larger
displays
2010-06-06 21:33:05 +00:00
Jesse Vincent
18cf923072 Only strip : lines containing word characters. This should improve the
preview when someone sends mail starting with a time. (12:01)
2010-06-06 21:32:57 +00:00
cketti
84d5e7216d Fix a crash when using the back button in a search results list with "Manage Back button" preference enabled.
Fixes issue 1716
2010-06-06 14:47:24 +00:00
cketti
576078e778 Prefix IPv6-addresses with "IPV6:" in EHLO command.
Fixes issue 1708
2010-06-03 01:00:24 +00:00
cketti
3812c75f66 Applied patch by fiouzy to read In-Reply-To and References header from saved draft.
Fixes issue 1686
2010-06-02 16:29:59 +00:00
Daniel Applebaum
6d6a9d0ffd Fixes Issue 1707
Eliminate extraneous spaces

Also, abort IMAP IDLE connection attempt if mConnection is null before
IDLEing.  Otherwise, we cannot set the idle timeout.
2010-06-02 14:25:04 +00:00
cketti
64c7df60ab Don't log sensitive information in SMTP commands when "Log sensitive
information" is unchecked. Applied patch by fiouzy with some small modifications.

Fixes issue 1387
2010-06-02 13:14:30 +00:00
Daniel Applebaum
a308ce8a2d Eliminate expensive and unused expungedUid map. 2010-05-31 15:21:51 +00:00
Daniel Applebaum
b35f807820 Fixes Issue 227
Provide for controlling the maximum age of syncrhonized messages.
Efficient with IMAP, much less efficient with other Stores.
2010-05-30 21:20:47 +00:00
Daniel Applebaum
dedfd026be Fixes Issue 254
Provide for only showing folders that are subscribed on the server
(IMAP only)

Also:
Change default for Notification behavior to the old way.  Make going
to the search for unread messages off by default.

Fix up some hiding of labels, etc. on the incoming server settings.

Check for message suppression in search results.
2010-05-30 16:56:50 +00:00
Jesse Vincent
1a66072910 find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs --unpad=paren 2010-05-30 04:17:00 +00:00
Jesse Vincent
6b5bcd2c4d Make the back button behaviour configurable. The default should remain
identical to the most recent behaviour. As an option, the user can force
back to always go "up" a level like Jesse likes
2010-05-30 04:16:44 +00:00
Jesse Vincent
49c4a4f97c refactor search code to allow us to search on specific fields. 2010-05-29 21:56:17 +00:00
Jesse Vincent
cce6a95c2c start using the android API for "/sdcard" 2010-05-29 21:56:09 +00:00
Daniel Applebaum
291f6d18a2 Fixes Issue 1643
Fixes Issue 1664

Issue 1643: Some servers respond with an untagged EXISTS to every
NOOP.  This change parses through all untagged responses in a loop
until no more are being generated, avoiding calling internalOpen each
time.

Issue 1664: I have never personally seen this error, and the log looks
like a thread safety problem.  mMessageCount is being set in one
thread (the IDLE thread) but not properly visible in another thread
(the check mail thread).  mMessageCount and other ImapFolder private
variables are now volatile in hopes of correcting this problem.
2010-05-26 03:24:33 +00:00
Daniel Applebaum
3f0aada43b Eliminate duplicate calls to notifyAccount while synchronizing a
folder.
2010-05-22 22:00:06 +00:00
Daniel Applebaum
a8339dfe9d Provide for tracing length of WakeLock activity.
Improve thread safety using volatiles.
2010-05-22 21:58:35 +00:00
Daniel Applebaum
5e3e204a4c Fixes Issue 1643
Enhance K-9 Mail to be more tolerant of non-compliant IMAP servers.
Do not require a space following the + in command continuation
requests.  The rest of the token parser will swalow the space if it is
actually there but we don't really need it.
2010-05-22 20:52:01 +00:00
Daniel Applebaum
8eeebc593a Handle thread interruptions better and fix some race conditions. 2010-05-22 17:35:05 +00:00
Daniel Applebaum
24b178773f Make sure prefix is fetched before any call to getCombinedPrefix. 2010-05-22 17:34:16 +00:00
Daniel Applebaum
493cdc4f5d Correct push restart logic 2010-05-22 15:08:27 +00:00
Daniel Applebaum
6c814fb5e7 Fixes Issue 1653
All set the display class, whether or not in push mode.
2010-05-22 14:28:04 +00:00
Daniel Applebaum
7ca2086c73 Fixes Issue 1652
Fixes Issue 1644

Grab correct color from preferences storage for LED.

Also, remove LED and chip colors on account deletion.
2010-05-22 14:07:02 +00:00
cketti
5627117ddf Use 997 as maximum line length for References header. See http://code.google.com/p/k9mail/source/detail?r=1714 for details. 2010-05-21 16:37:45 +00:00
cketti
c5486469c2 - Add menu item to show additional headers in the message view
- Add option to save all headers locally (incoming server settings)

Applied patch provided by timmlinder with small modifications.

Fixes issue 43
2010-05-21 15:34:29 +00:00
cketti
c29722a56c Make sure the References header doesn't exceed 998 characters and the value won't get Q-encoded. Thanks to fiouzy for providing the patch.
Fixes issue 1559
2010-05-21 12:20:32 +00:00
Daniel Applebaum
6afb8c8506 Make sure to compare capabilities using upper case. 2010-05-20 11:55:42 +00:00
Daniel Applebaum
f318fc159b Fixes Issue 1641
Populate text and subject when handling ACTION_SENDTO
2010-05-20 11:08:40 +00:00
Daniel Applebaum
59f22d8e7e Save capabilities in upper case so we handle them case-insensitively,
too.  Make sure all CAPABILITY-detection constants are written in
upper case.
2010-05-20 04:19:15 +00:00
Daniel Applebaum
d873ecbe7a From cketti's reminder: check untagged response with equalsIgnoreCase.
Also, reset mCombinedPrefix when the delimeter is discovered.
2010-05-20 04:13:49 +00:00
Daniel Applebaum
af55c6f48b We don't need to log the content of the map each time we add to it. 2010-05-20 03:38:16 +00:00
Daniel Applebaum
44da2e1fe6 After discussion with cketti, reinstate using LIST to find the path
delimeter, but only if the server does not support NAMESPACE.  Since
we've encountered non-compliant servers that freak out at the LIST
command, enclose in a try/catch structure so that failures do not
totally prevent IMAP communication.
2010-05-20 02:33:44 +00:00
cketti
6e3183f54f Moved classes Regex and DomainNameChecker from android (package) namespace to K-9 namespace. This way we're protected from modifications to these classes in future Android versions. 2010-05-19 19:16:36 +00:00
cketti
b5a6a28f19 Fixed some more warnings:
- Removed unused imports
- Removed unnecessary @SuppressWarnings("deprecation") annotations
- Added @SuppressWarnings("deprecation") to API 1-3 code that's now (API 5) deprecated
- Added missing @Override annotation
2010-05-19 18:44:22 +00:00
cketti
26bd72573e Removed unused imports. 2010-05-19 18:32:30 +00:00
cketti
58b8479612 Code refactoring:
- Created "controller" and "mail.filter" package
- Moved a lot of classes to new/other packages
- Removed unused classes: NoSuchProviderException, MessageDateComparator
2010-05-19 18:17:06 +00:00
cketti
22ce159fe6 Merge imap-parser branch.
Fixes issue 1547.
2010-05-19 13:31:48 +00:00
Daniel Applebaum
0e3f9a9db4 Synchronize access to encapsulated WakeLock 2010-05-17 02:33:19 +00:00
Daniel Applebaum
f8994f6491 Turn off tracing by default.
Lower log level.
2010-05-17 01:04:42 +00:00
Daniel Applebaum
9cf42ef913 Provide for tracking all WakeLock usage.
Simplify WakeLocks use by pushing.

Correct fault in IMAP IDLE WakeLock usage.  The ThreadLocal in
MessagingControllerPushReceiver meant that the WakeLock acquired when
the DONE was sent was not being released when entering back into IDLE
state.

Consolidate the account notification so that all Activities use the
methods in MessagingController.
2010-05-17 00:30:32 +00:00
Daniel Applebaum
71c43b9634 Fixes Issue 1482
Utilize cketti's AutoSyncHelper in order to provide a way to make K-9
Mail obey the global Auto-sync setting.  K-9 Mail doesn't obey the
Auto-sync setting by default because K-9 Mail isn't listed as one of
the listed applications.
2010-05-15 21:26:15 +00:00
Jesse Vincent
a59ade4fdd When no messages are selected yet, "Select all" is the only valid batch
option. Instead of forcing the user through a submenu, show "Select all"
instead of the submenu
2010-05-15 21:03:44 +00:00
Jesse Vincent
ea6bb0000e Let users pick LED Notification colors different from their account chip colors 2010-05-15 20:35:59 +00:00
Jesse Vincent
384803076d When instantiating an account, set the default color to something
random, rather than blank, so that new accounts don't endup without
colors.
2010-05-15 20:35:47 +00:00
Jesse Vincent
f799be05c9 Account.java had developed dos line-endings. :/ 2010-05-15 20:35:39 +00:00
Jesse Vincent
ecebdf18cd find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs --unpad=paren 2010-05-15 19:46:16 +00:00
Daniel Applebaum
b51bce6ebf Fixes Issue 1551
Fixes Issue 1577

Issue 1551: 
Some IMAP servers send untagged EXPUNGEs to IDLEing
clients without ever haven't sent an untagged FETCH.  The untagged
EXPUNGEs are harder to deal with because they don't have a UID.  So,
if the user has elected to have the IDLE connection start with a poll,
we can maintain a map of message sequence numbers to UIDs that we can
use to figure out which message to delete.  To mitigate the risk of
the map falling out of date, we do a UID SEARCH UID before removing
the local copy of the message, just to make sure the message is really
gone from the server.  If we detect an error, do another poll to
resync the map.

Issue 1577:
Restore the removal of notifications for an account when the account's
unread message count goes to 0.
2010-05-15 19:35:07 +00:00
Daniel Applebaum
1502660826 Fixes Issue 1561
The user can elect to have opening a Notification open a
account-specific search for unread messages.
2010-05-12 05:35:08 +00:00
Daniel Applebaum
8b92bc3836 Fixes Issue 1474
Fixes Issue 1562

Issue 1474:
Provide new facility to totally wipe all data for an account but leave
settings intact.  This is useful because sometimes storage is so full
that SQLite cannot perform the usual VACUUM or message deletion.

Add confirmation dialogs to destructive Clear and Recreate operations.

Remove destructive Clear from FolderList so as not to have to
duplicate the confirmation dialogs.

Issue 1562:
Suppress notifications when new messages arrive in Trash, Sent or
Drafts special folders.
2010-05-12 04:17:52 +00:00
Jesse Vincent
e77729cb2d First pass at getting a blinky LED that's the account's color 2010-05-12 03:06:11 +00:00
Jesse Vincent
093d65513a Clickable folder icons in account lists to get to folder lists, even if
there's an auto-open folder
2010-05-12 02:52:10 +00:00
Jesse Vincent
ba021597c4 astyle 2010-05-12 02:51:59 +00:00
Jesse Vincent
1bf1643987 Move Account and Folder settings into a submenu. give access to global
preferences from there, too. - many users never leave their inboxes
making it hard to get up to Settigns
2010-05-12 01:18:12 +00:00
cketti
2121ebc012 Correctly encode attachment filenames with non-ASCII characters. Thanks to jca02266 who provided the base patch.
Fixes issue 1555
2010-05-11 15:05:50 +00:00
Daniel Applebaum
d5b128e8cf Specify that our notifications use the Notification audio stream. 2010-05-11 04:13:23 +00:00
cketti
6a40fd1f46 Helper classes to get the state of the Android auto-sync setting. Implementation differs for SDK 1.5, SDK 1.6 and SDK 2.0+. See issue 1482 for more details. 2010-05-10 20:15:41 +00:00
cketti
37b42f58a6 Fix error handling code in DB upgrade. 2010-05-10 00:14:26 +00:00
Daniel Applebaum
6562d43f56 Cleanup logic for controlling visibility of email field for each
account.
2010-05-09 15:50:58 +00:00
Daniel Applebaum
6aeac22dad Fixes Issue 300
Fixes Issue 772
Fixes Issue 852

Issue 300: Handle incoming IMAP tokens in a case-insensitive manner

Issue 772: Add Yahoo workaround

Issue 852: Add configurable IMAP IDLE refresh frequency in Incoming
server settings

Also:
Add configuration option for whether push system executes a poll on
each connect.

Move the configuration for the maximum number of push folders to the
Incoming server Settings.
2010-05-09 15:27:41 +00:00
cketti
29e024b24e Fixed small indentation issue. 2010-05-06 13:27:42 +00:00
Daniel Applebaum
e55d3019c3 Really fix this (I hope) based on more feedback from cketti. 2010-05-06 13:24:13 +00:00
Daniel Applebaum
590b222507 Code cleanup as suggested by cketti. 2010-05-06 11:29:26 +00:00
cketti
683f31e32e Code cleanup: Fixed some warnings 2010-05-03 13:46:55 +00:00
Jesse Vincent
c31b224de3 enable dan's new "resync accounts on reconnect" code for push 2010-05-03 00:20:27 +00:00
cketti
582c3f82b8 New preference setting to add buttons to attach images or videos which is needed to work around a bug in Gallery 3D. Buttons are enabled by default if a buggy Gallery 3D version is found.
Thanks to dman13 for providing the work-around and analysing the bug.

Fixes issue 1186
2010-05-02 18:24:33 +00:00
Daniel Applebaum
989e89f5b0 Fixes Issue 1048
Zero out unread and flagged counts on all folders in an account being
cleared.
2010-05-02 05:37:48 +00:00
Daniel Applebaum
6e9145f037 Adjunct to the new variable font sizes, allow the Account list and
Folder list items to vary in size based on the font sizes.
2010-05-02 04:54:09 +00:00
cketti
331a6ca99b - Always use light theme for the message view since we don't change the colors of the WebView (i.e. it always uses black text on a white background).
- Always display the date in the message view
2010-05-02 00:10:55 +00:00
Daniel Applebaum
68e7b7fa21 Fixes Issue 323
Fixes Issue 1105
Fixes Issue 1395
Fixes Issue 1421
Fixes Issue 1426

When the remote store is incapable of returning an unread message count (POP)
or a flagged message count (POP, WebDAV), count the number of local
messages with the desired atributes.
2010-05-01 23:20:54 +00:00
cketti
f706861599 Show "(No subject)" in the message view for mails without subject. 2010-05-01 23:15:59 +00:00
cketti
fd26ec475a Show "(No subject)" in the message list for mails without subject. 2010-05-01 23:12:27 +00:00
Daniel Applebaum
211d30582a Cleanup obsolete imports 2010-05-01 21:53:50 +00:00
Daniel Applebaum
d6fca0f1e9 Get rid of log used while debugging. 2010-05-01 20:11:42 +00:00
Daniel Applebaum
ee1b4b70e2 Fixes Issue 1412
Keep search results in sync with newly arrived or deleted messages.
Intentionally does not remove messages from search results due to
flag (flagged/starred or read/unread) state changes, because that
would be awkward while manipulating messages in search results.
2010-05-01 20:06:52 +00:00
cketti
c6fee3efb9 Quoted strings can contain '"' in escaped form. readStringUntil() fails to unescape and will will return prematurely when the string contains an escaped '"' character.
Fixes issue 512.
2010-04-30 13:51:19 +00:00
Jesse Vincent
8af7f4a7b6 find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs --unpad=paren 2010-04-29 04:59:14 +00:00
Daniel Applebaum
4c6df71fe1 Reduce logging level, and make Logs only happen when K9.DEBUG is true. 2010-04-27 05:00:08 +00:00
Daniel Applebaum
0459be3bb8 Fixes Issue 868
When connected to a server that does not automatically send an
untagged UIDNEXT with the responses to SELECT, explicitly SEARCH for
the currently highest UID in the folder on the server and then add 1
to it to get the UIDNEXT.
2010-04-27 04:06:26 +00:00
Daniel Applebaum
3f771474c1 Fixes Issue 1477
Keep mSelectedCount in sync with the number of selected messages.
2010-04-27 03:26:54 +00:00
Daniel Applebaum
78a101547c Provide for doing a full poll/sync of a folder whenever the IMAP IDLE
connection is established.  Turned off for now, but just get rid of
the false && on line 2641 in order to enable it.
2010-04-27 03:02:17 +00:00
Jesse Vincent
55d70c3bf7 rather than fetching 10 messages on push reconnect, fetch a full
compelment of displayable messages. This should help eliminate "Gaps"
when reconnecting push connections after going offline.
2010-04-26 16:20:43 +00:00
Jesse Vincent
ac36016b86 Only show the "Cc" lines in message view if there's a Cc. 2010-04-26 15:23:57 +00:00
Jesse Vincent
417db22879 Consistent random colors for accounts without color chips 2010-04-26 14:25:37 +00:00
Jesse Vincent
7b75788398 drop the intensity of the account color chips a bit 2010-04-26 14:25:18 +00:00
Daniel Applebaum
c01adf3246 If we're doing a folder-involved search and an account has no folders
that match the folder criteria, don't search in the account.
2010-04-25 17:52:59 +00:00
Daniel Applebaum
d7f18c7e35 Finally get the interaction right between integrated folder,
searchable folders, and the various search strategies.

Integration takes precedence over searchability.  The Integrated Inbox
doesn't care about folder searchability.  Nor does an unread or flag
search on specific folders.

Searches on specific accounts always go for displayable folders.  That
might need to change so that searches on specific accounts can be on
DISPLAYABLE or ALL, but never NEVER.  But in the current approach,
account-specific searches are done from the Accounts Activity, which
has an unread counter based on displayable non-special folders, so the
present implementation is the most logical for now.
2010-04-25 16:43:11 +00:00
Daniel Applebaum
267f02fc48 Add a color chip to the left side of the message headers so that it is
possible to tell in which account the message is located.  Especially
useful when traversing search results in the MessageView.
2010-04-25 16:33:32 +00:00
Daniel Applebaum
6686c3a910 Fixes Issue 1473 2010-04-25 14:47:10 +00:00
Jesse Vincent
167e856b15 default accounts to random colors rather than black 2010-04-25 09:07:34 +00:00
Jesse Vincent
c649073fa7 Finish removing the old Android 1.0 chips 2010-04-25 08:59:59 +00:00
Jesse Vincent
d6bc0765d8 Allow users to set the account 'Chip' color per account. 2010-04-25 08:47:24 +00:00
Jesse Vincent
6bf429fd0d Initial import of the android "demo" color picker dialog 2010-04-25 08:46:37 +00:00
Daniel Applebaum
6cfcfb953f Aggressively get rid of obsolete Flag X_NO_SEEN_INFO. It was
interfering with "unread" searches on POP3 accounts.

Flags really should be normalized in the database to eliminate the use
of LIKE while searching by Flags.
2010-04-25 06:17:15 +00:00
Daniel Applebaum
c7d679f773 Folder List should use Folder List-specific font sizes. 2010-04-24 19:15:43 +00:00
Daniel Applebaum
f185240f67 Make stars and envelopes on folder active. 2010-04-24 19:10:57 +00:00
Daniel Applebaum
4bec5ea2a3 Remove MessageReference from local list of MessageReferences when
message is deleted.
2010-04-24 18:02:45 +00:00
Daniel Applebaum
a2f4391501 Fixes Issue 1341
Pass around simple Serializable MessageReference objects containing
account UUID, folder name and message UID so that MessageView can
traverse lists of messages which span folders and accounts.
2010-04-24 14:59:27 +00:00
Daniel Applebaum
e7e59ef858 Fixes Issue 1450
Fixes Issue 1456

Don't add canned searches to account list if no real accounts exist.

Fix NPE.

Prep work for searching named folders.
2010-04-24 04:35:39 +00:00
Daniel Applebaum
8e0ee1a6e1 Star and envelope are now active for regular accounts. 2010-04-22 04:58:50 +00:00
Daniel Applebaum
41c5dc5986 Fixes Issue 1448
Fixes ClassCastException.

Also:
Envelope and star in Accounts Activity are now both "hot".  Tapping
the main part of the search opens the full search; tapping the
envelope opens the search only for unread messages; tapping the star
opens the search but only for starred messages.

The envelope and star are a bit small to reliably tap.  Both options
should be available via long-press, also.

Methodology will be extended to real accounts, as well.
2010-04-22 02:20:35 +00:00
cketti
8ebbc611e9 Fix NullPointerException when using the touch friendly message list. 2010-04-21 00:58:09 +00:00
cketti
f8695f9a61 Added preference screen to pick font sizes for all important information in account list, folder list, message list and message view.
Fixes issue 7
2010-04-20 16:37:03 +00:00
Daniel Applebaum
9310f3f6c6 Fixes Issue 1441
Shutdown threadPool when Service is destroyed.
2010-04-20 03:22:43 +00:00
Daniel Applebaum
e22f3d2c1b Provide user control over the account size measurement and search
result counting that are displayed in the Accouts Activity.  These can
both be slow, so some users may opt-out.
2010-04-19 02:55:02 +00:00
cketti
1d361d751e Added meta-Tag with charset=utf-8 to about box html source to fix UTF-8 issues. Thanks to gerberstef for the patch.
Fixes issue 1434
2010-04-18 16:57:49 +00:00
cketti
a7f9cf0037 Removed unused code implementing the UrlInterceptHandler interface 2010-04-17 21:28:59 +00:00
cketti
57acdb7033 Create 'folders' table with 'flagged_count' field when installing K-9 Mail. Previously it was only added when updating the application. 2010-04-17 21:27:06 +00:00
Daniel Applebaum
405d5f2e59 Only show flag-oriented pre-canned searches when message stars are
enabled.  This is an interim workaround for Issue 1411.
2010-04-17 04:41:25 +00:00
Daniel Applebaum
f27aa4c5c0 Only show flagged message counters when star preference is selected 2010-04-17 04:33:25 +00:00
Daniel Applebaum
5bd24fe425 Fixes Issue 1410
Fixes Issue 1431

Present flagged message count inside a star, matching the visual
presentation on individual messages.

Provide display of unread and flagged message counts for canned
searches.

Perhaps the message counts for searches and account size display
should be defeatable for improved speed.
2010-04-17 03:32:17 +00:00
Daniel Applebaum
7cf0ec7327 Needed for prior commits 2010-04-16 18:34:36 +00:00
Daniel Applebaum
5e30d5a784 Fixes Issue 1429
Remove dead code.
2010-04-16 14:46:44 +00:00
Daniel Applebaum
1079e03495 Fixes Issue 1430
Displaying the progress in the list was way too slow.
2010-04-16 14:44:01 +00:00