Commit graph

963 commits

Author SHA1 Message Date
Vincent Breitmoser
406334086c use stylable attributes for openpgp_ colors 2016-08-27 21:19:02 +02:00
Vincent Breitmoser
f6e19680b0 add test for message/rfc822 attachment 2016-08-19 22:21:43 +02:00
Vincent Breitmoser
77a3892b0f fix unit tests for 7bit/quoted-printable encoding 2016-08-19 22:21:43 +02:00
Vincent Breitmoser
674cd3bf5a remove 7 bit reencoding routines 2016-08-19 22:21:42 +02:00
Vincent Breitmoser
03a09c9b90 use application/octet-stream for message attachments 2016-08-16 12:23:43 +02:00
Vincent Breitmoser
08ef3d5ce5 clean up TextBody, make it slightly more failfast
Previously, TextBody supported only 8bit or quoted printable encodings,
defaulting to quoted printable if the encoding was not equal to "8bit".
This behavior is now changed to throw a runtime exception when an
unsupported encoding has been selected. The `setEncoding` method also
throws if an unsupported encoding is selected.
2016-08-16 12:21:09 +02:00
cketti
b0e5912891 Merge pull request #1414 from k9mail/build_speed_improvements
Build speed improvements
2016-08-16 01:38:13 +02:00
cketti
0bc5b49bb5 Fix MessageBuilderTest 2016-08-16 00:40:23 +02:00
cketti
77f9e82b41 Merge pull request #1559 from k9mail/deferred-file-body-fix
Fix DeferredFileBody
2016-08-16 00:07:41 +02:00
cketti
52e593e597 Merge pull request #1558 from k9mail/hide-keyboard-on-view
Hide keyboard when message is displayed
2016-08-16 00:03:54 +02:00
cketti
411ec0ec34 Use 'newInstance' as name for static factory methods 2016-08-15 11:48:36 +02:00
cketti
84cef1d8b1 Get rid of trivial static factory methods 2016-08-15 11:42:47 +02:00
cketti
c234578271 Don't inject BoundaryGenerator into MimeMultipart 2016-08-15 11:14:38 +02:00
cketti
7719153cc0 Extract code to generate Message-Id header value
This moves Message closer to being a dumb data class and avoids having to
pass around a UuidGenerator reference.
2016-08-15 10:22:17 +02:00
Vincent Breitmoser
f5656c331d add tests for DeferredFileBody 2016-08-11 15:54:25 +02:00
Vincent Breitmoser
c7a86e8000 fix writeMemoryToFile in DeferredFileBody 2016-08-11 15:45:21 +02:00
Vincent Breitmoser
f097c44580 messageview: hide keyboard when message is displayed, not only after interaction pending intent 2016-08-10 14:58:31 +02:00
Vincent Breitmoser
4d9283f124 construct MessageBuilder classes in factory methods 2016-08-10 14:49:12 +02:00
Vincent Breitmoser
1e97f1ce16 inject UuidGenerator into MimeMessage via constructor instead of parameter 2016-08-10 14:30:53 +02:00
Vincent Breitmoser
bb8e5a68df rename UUIDGenerator to UuidGenerator 2016-08-10 14:30:53 +02:00
Vincent Breitmoser
1c28e1c601 add MessageBuilder test for message with attachment 2016-08-10 14:30:53 +02:00
Vincent Breitmoser
cd011349fe make send date and timezone hiding build parameters in MessageBuilder 2016-08-10 14:30:53 +02:00
Vincent Breitmoser
874b981ba6 get message boundaries from injected BoundaryGenerator in MessageBuilder 2016-08-10 14:30:53 +02:00
Vincent Breitmoser
f4b0521bbb get uuid from injected generator in message builder 2016-08-10 14:30:53 +02:00
Vincent Breitmoser
438576b547 minimize visibility in MessagingController (and some small code style fixes) 2016-08-10 10:41:39 +02:00
Vincent Breitmoser
8647b4c8dd minor fixes for clarity of foreground priority commands 2016-08-10 10:41:39 +02:00
Vincent Breitmoser
0dfcdbdfc4 hide the Runnable interface as an implementation detail of MessagingController 2016-08-10 10:41:39 +02:00
Vincent Breitmoser
6596c85a9f clean up fields a bit in MessagingController 2016-08-10 10:41:39 +02:00
Vincent Breitmoser
03baf1afc2 make memorizingMessagingListener final, and respect that it can't actually be null 2016-08-10 10:41:32 +02:00
Vincent Breitmoser
a0a341e479 move MemorizingListener into its own class 2016-08-10 10:41:32 +02:00
Vincent Breitmoser
8d24e036b7 fix a bunch of warnings in MessagingController (no semantic changes) 2016-08-10 10:41:32 +02:00
cketti
904c80dd22 Merge pull request #1555 from k9mail/alternate-recip-fix
Small fix for alternate recipient adapter
2016-08-10 05:33:15 +02:00
cketti
b40d64eee4 Merge pull request #1545 from k9mail/safecontentresolver_update
Update SafeContentResolver to 0.9.0
2016-08-10 05:14:18 +02:00
Vincent Breitmoser
a2674efff1 compose: small fixes for alternate recipient adapter
this slightly alters behavior when a non-contact address is picked, to
make sure a crypto status is shown in the alternate dropdown.
2016-08-09 13:36:19 +02:00
cketti
ecb0044cc4 Merge pull request #1527 from k9mail/message-reference-ops
pass MessageReference instead of LocalMessage to MessagingController operations
2016-08-05 05:56:07 +02:00
cketti
915f44ab14 Merge pull request #1537 from k9mail/compose-attachments-from-viewinfo
Load attachments from AttachmentViewInfo in AttachmentPresenter
2016-08-05 04:33:03 +02:00
cketti
07a99137d1 Update SafeContentResolver to 0.9.0 2016-08-05 02:22:42 +02:00
Vincent Breitmoser
ed84f2958c remove a couple of unused icons
I kept the sources around, so they can more easily be restored should we
need some of those again.
2016-08-03 17:11:22 +02:00
Vincent Breitmoser
4449e5c0d7 use vector drawables for all openpgp icons 2016-08-03 16:46:53 +02:00
Vincent Breitmoser
0f3ce1bf1c pass MessageReference instead of LocalMessage to MessagingController operations
The most significant change here is that LocalMessage data is loaded in
MessagingController, instead of every calling site individually.
2016-08-02 18:47:04 +02:00
cketti
403323c94f Merge pull request #1529 from k9mail/fix-crash-on-no-headers
Don't crash if headers aren't available
2016-08-02 18:23:47 +02:00
cketti
a47e5bf3d2 Merge pull request #1536 from k9mail/compose-complete-on-send
Try performing recipient completion on send
2016-08-02 18:07:24 +02:00
cketti
9fd2cf3bf1 Merge pull request #1535 from k9mail/compose-non-ascii-error
Show parse error for non-ASCII characters in address
2016-08-02 18:05:12 +02:00
cketti
54b3bac672 Merge pull request #1528 from k9mail/fix-mlh-loadMessageRemoteFinished
Fix logic in MessageLoaderHelper
2016-08-02 17:22:15 +02:00
cketti
2626cb1115 Merge pull request #1523 from k9mail/server_name_suggestion
Suggest server name based on server type
2016-08-02 15:40:01 +02:00
Vincent Breitmoser
d276bbda3e load draft attachments from AttachmentViewInfo 2016-08-01 16:53:12 +02:00
Vincent Breitmoser
450356b577 add flag whether data is available to AttachmentViewInfo 2016-08-01 16:03:22 +02:00
Vincent Breitmoser
b3f2974962 compose: try performing recipient completion on send (fixes #1495)
This commit performs completion on recipient fields when the send button
is clicked (uncompleted text is usually present if the cursor is on the
recipient field at that time).

If any completion was performed, sending is quietly aborted. This avoids
sending mail to the wrong recipient if the uncompleted text doesn't
resolve to what the user thought.
2016-08-01 15:33:05 +02:00
Vincent Breitmoser
43cd25cfa3 compose: show parse error for non-ascii characters in address 2016-08-01 15:04:27 +02:00
Vincent Breitmoser
8399c9f161 don't crash if headers aren't available 2016-07-29 20:57:26 +02:00
Vincent Breitmoser
0b0a8a46ef fix logic in MessageLoaderHelper 2016-07-29 20:56:14 +02:00
Vincent Breitmoser
a40a33e1da delete abandoned CryptoHelper class 2016-07-28 14:53:58 +02:00
Vincent Breitmoser
f87a9cad49 don't throw MessagingExceptions for getting headers from parts 2016-07-28 14:53:58 +02:00
Vincent Breitmoser
2b5064ea55 always load headers immediately for LocalMessage 2016-07-28 14:53:57 +02:00
Vincent Breitmoser
3f0fb9fd3e change tests to use more actual Part/Body classes instead of mocks 2016-07-28 14:53:57 +02:00
cketti
1cb32b0ce5 Suggest server name based on server type 2016-07-25 05:45:07 +02:00
Vincent Breitmoser
fa998981f7 add handling for LocalMessage parts to AttachmentInfoExtractor 2016-07-25 01:39:06 +02:00
Vincent Breitmoser
e03df3d991 improve error handling when opening missing parts (don't crash at least) 2016-07-25 01:39:06 +02:00
cketti
d80a1d415a Merge pull request #1510
Loader helper fixes
2016-07-25 01:01:34 +02:00
Vincent Breitmoser
af5856d28f avoid leaking data to MessagingController via MessageLoaderHelper after detach
null handling is already present: no ui methods should ever be called
after onDestroy or onDetachChangingConfigurations, and pending result
callbacks are handled by a null-check for the callback field.
2016-07-25 00:59:07 +02:00
Vincent Breitmoser
0993d91473 only care for our own MessageReference in MessageLoaderHelper 2016-07-25 00:59:07 +02:00
Vincent Breitmoser
471754241d Merge pull request #1514 from k9mail/dont-trust-downloaded-flag
don't trust X_DOWNLOADED_FULL flag, consider messages with missing data incomplete (WIP)
2016-07-24 23:43:02 +02:00
Vincent Breitmoser
489cf354fd don't pass LocalMessage from onMessageViewInfoLoadFinished/Failed 2016-07-24 23:40:12 +02:00
Vincent Breitmoser
174f99b94c don't trust X_DOWNLOADED_FULL flag, consider messages with missing on-disk data incomplete 2016-07-24 23:40:12 +02:00
cketti
9c46f68b7f Merge pull request #1515 from k9mail/hidden-attachments
Ditch "hidden attachments"
2016-07-24 22:54:32 +02:00
Vincent Breitmoser
b7bcaf8deb rename firstClassAttachment to inlineAttachment (with reversed logic) 2016-07-24 22:08:16 +02:00
cketti
d8f5de0013 Merge pull request #1522 from k9mail/confirm-mark-all-as-read
Ask for confirmation on "mark all as read"
2016-07-24 21:59:17 +02:00
Vincent Breitmoser
a3ce1adf6e only first class attachments should be actually displayed 2016-07-24 21:05:52 +02:00
Vincent Breitmoser
c1d57aa324 parts without name are still first class attachments 2016-07-24 21:05:13 +02:00
Vincent Breitmoser
bd925567e4 messageview: remove support for "hidden" attachments 2016-07-24 21:05:13 +02:00
Vincent Breitmoser
035aba1c1e fix button to display hidden attachments 2016-07-24 21:05:13 +02:00
Vincent Breitmoser
7826febedb Merge pull request #1511 from k9mail/sanitize-in-extract
Sanitize HTML in MessageViewExtractor instead of MessageWebView
2016-07-24 20:51:47 +02:00
Vincent Breitmoser
526448d18b incorporate tests feedback 2016-07-24 20:51:37 +02:00
Vincent Breitmoser
773600c717 sanitize html in MessageViewInfoExtractor
also, inject HtmlSanitizer to keep MessageViewInfoExtractor testable and
pass Context through Globals
2016-07-24 20:51:37 +02:00
Vincent Breitmoser
65f2539e0b move MessageViewInfoExtractorTest to unit tests
(Yes, I made sure these still run successfully!)
2016-07-24 20:50:35 +02:00
cketti
8df6a56a6f Merge pull request #1521 from k9mail/attachment-count-encrypted
Set attachment count to zero for encrypted messages
2016-07-24 20:37:16 +02:00
cketti
8b1c13d697 Merge pull request #1520 from k9mail/recipient-view-longclick
compose: enable long click on recipient select view
2016-07-24 20:05:49 +02:00
cketti
807f0418d8 Merge pull request #1519 from k9mail/recipient-inject-loaderman
Inject LoaderManager to RecipientSelectView via presenter
2016-07-24 20:05:20 +02:00
cketti
2abcbf9ca2 Merge pull request #1512 from k9mail/use-mime4j-bodydescriptor
Use MIME4J's BodyDescriptor instead of reading Content-Type header ourselves
2016-07-24 18:45:52 +02:00
Vincent Breitmoser
c65f54d396 ask for confirmation on "mark all as read" (closes #1509) 2016-07-22 18:25:31 +02:00
Vincent Breitmoser
5c638dd205 use MessageDecryptVerifier methods in EncryptionDetector 2016-07-22 15:17:43 +02:00
Vincent Breitmoser
22b72a5824 don't count attachments in encrypted messages 2016-07-22 15:17:43 +02:00
Vincent Breitmoser
d1620f3fc7 compose: enable long click on recipient select view
this leads to some problems if more than one token is actually parsed.
however, for the common use case of parsing a single address, it seems
to work just fine, so this hopefully does more good than harm.

see also https://github.com/splitwise/TokenAutoComplete/issues/95
2016-07-22 15:12:58 +02:00
Vincent Breitmoser
034b1eda41 compose: inject loader manager to RecipientSelectView via presenter (fixes #1251)
Conflicts:
	k9mail/src/main/java/com/fsck/k9/view/RecipientSelectView.java
2016-07-22 15:03:59 +02:00
Vincent Breitmoser
600537f5fb use mimeType and boundary values from BodyDescriptor rather than header values 2016-07-19 17:14:46 +02:00
Vincent Breitmoser
19cd7b997e add some @WorkerThread annotations 2016-07-18 15:38:21 +02:00
Vincent Breitmoser
9f58de5909 compose: use MessageViewInfo.rootPart for content extraction 2016-07-18 15:38:21 +02:00
Vincent Breitmoser
99f65f338e compose: hand cached decryption result back to OpenKeychain 2016-07-18 15:38:21 +02:00
Vincent Breitmoser
0a43b36ac5 compose: use attachment info from loaded AttachmentViewInfo 2016-07-18 15:38:21 +02:00
Vincent Breitmoser
62361da104 compose: pass MessageViewInfo around instead of just the Message 2016-07-18 13:53:01 +02:00
cketti
a58ca4624b Merge pull request #1488 from k9mail/GH-1483_remove_settings_import_via_intent
Disable settings import via VIEW Intent
2016-07-18 00:18:42 +02:00
cketti
2622b08767 Merge pull request #1484 from k9mail/decrypted-file-provider
decrypted file provider
2016-07-18 00:01:59 +02:00
cketti
d096261c56 Make use of Globals to simplify code 2016-07-17 23:02:10 +02:00
cketti
f6fe28d3a8 Add Globals class so we can avoid passing Context through layers of code
If your class requires a Context instance make it a constructor argument. Then
create a static factory method that calls Globals.getContext(). The result can
then be passed to the constructor.
This allows testing individual classes using test doubles by directly invoking
the constructor and not having to deal with Globals. For integrated tests
spanning multiple classes you might have to use Globals.setContext().
2016-07-17 23:02:10 +02:00
Vincent Breitmoser
8b719a3274 prefer real objects for Part in tests over mocks 2016-07-17 23:02:10 +02:00
Vincent Breitmoser
44c6fccc0e synchronize cleanupReceiver access 2016-07-17 23:02:10 +02:00
Vincent Breitmoser
c4cb83d370 rename some classes from service to mailstore 2016-07-17 23:02:10 +02:00
Vincent Breitmoser
351737512b fix deferred file body test 2016-07-17 23:02:10 +02:00
Vincent Breitmoser
69b0b3a763 split FileProvider logic, incorporate some other feedback 2016-07-17 23:02:09 +02:00
Vincent Breitmoser
f33c083539 don't allow file deletion in DecryptedFileProvider 2016-07-17 23:00:58 +02:00
Vincent Breitmoser
3b0c1979f1 move file cleanup into AsyncTask in onTrimMemory 2016-07-17 23:00:58 +02:00
Vincent Breitmoser
2993078bf2 keep raw data for decrypted bodies around, decode in DecryptedFileProvider if necessary 2016-07-17 23:00:57 +02:00
Vincent Breitmoser
ed628ae67b make FileProviderDeferredFileOutputStream fail faster 2016-07-11 16:14:41 +02:00
cketti
e858ca9e2c Remove intent filter for settings file MIME type
Importing by URI isn't properly supported. We want to fix this eventually, but
for now we just remove the functionality.

Fixes #1483
2016-07-07 00:03:04 +02:00
cketti
06e4ca1945 Version 5.110 2016-07-06 22:23:53 +02:00
cketti
95c546d992 Merge pull request #1485 from k9mail/notifications_only_from_contacts
Setting: only show notifications for messages from contacts
2016-07-06 21:55:32 +02:00
Vincent Breitmoser
0e3d18e7f7 we don't use displayName from database either (for now), fix tests to reflect that 2016-07-06 21:48:39 +02:00
Vincent Breitmoser
7cb6fa102f stream performance optimizations 2016-07-06 21:48:38 +02:00
Vincent Breitmoser
032b1fb833 add some debug logging to cleanup receiver 2016-07-06 21:48:38 +02:00
Vincent Breitmoser
bb9f857d86 add Attachment* tests, and some annotations 2016-07-06 21:48:38 +02:00
Vincent Breitmoser
be3543c78d also clean up decrypted temp files on low memory 2016-07-06 21:48:38 +02:00
Vincent Breitmoser
1eca794346 add DecryptedFileProviderCleanupReceiver to clean up temp files on screen off 2016-07-06 21:48:38 +02:00
Vincent Breitmoser
e102a1d474 introduce FileProviderInterface, specialize K9FileProvider for decrypted 2016-07-06 21:48:38 +02:00
Vincent Breitmoser
36a3a8bb20 rename DecryptedStreamParser and DecryptedTempFileBody 2016-07-06 21:48:38 +02:00
cketti
1d471a8633 Rename method for consistency 2016-07-06 21:25:20 +02:00
Vincent Breitmoser
cd4be0e466 fix translation issues 2016-07-05 12:05:18 +02:00
cketti
202595c605 Make 'notify for contact only' setting available for import/export 2016-07-05 01:40:51 +02:00
cketti
ee8dd311df Pass Contacts via constructor into MessagingController 2016-07-05 01:34:40 +02:00
cketti
1d2509e98f Change wording in settings screen 2016-07-05 01:27:28 +02:00
Christian Grubert
e2e3da262c new option: just show notification for contacts 2016-07-05 01:25:08 +02:00
Vincent Breitmoser
4d3bc41c0a unfold+decode header value in getContentType() and getDisposition() 2016-07-01 18:40:48 +02:00
Vincent Breitmoser
1c8a6f05d0 make Attachment class immutable 2016-07-01 18:40:48 +02:00
Vincent Breitmoser
099d03f46a compose: extract AttachmentPresenter 2016-07-01 18:40:48 +02:00
Vincent Breitmoser
b4bd645eaa fix copy paste string error 2016-06-30 11:21:29 +02:00
Vincent Breitmoser
84c0e4c730 improve variable naming and some magic constants 2016-06-30 11:11:15 +02:00
Vincent Breitmoser
1bae68169f messageview: move more control flow for display of crypto data into MessageCryptoPresenter 2016-06-30 11:11:15 +02:00
Vincent Breitmoser
fccb4a4b24 messageview: simplify handling of external pictures, ditch ShowPicturesController 2016-06-30 11:11:15 +02:00
Vincent Breitmoser
b5b603001b messageview: move setShowDownloadButton into setMessage 2016-06-30 11:08:44 +02:00
Vincent Breitmoser
f6f4805076 messageview: move MessageCryptoMvpView into a var instead of implementing directly 2016-06-30 11:08:44 +02:00
Vincent Breitmoser
837aa70486 messageview: match signature user id with sender address 2016-06-30 11:08:44 +02:00
Vincent Breitmoser
2e9184f8e2 compose: use MessageLoaderHelper for quoted message loading (fixes MessageCompose) 2016-06-30 11:08:44 +02:00
Vincent Breitmoser
b72dba67df messageview: move all loading logic into MessageLoaderHelper (breaks MessageCompose) 2016-06-30 11:08:44 +02:00
Vincent Breitmoser
0df44a1457 messageview: strip pgp markers for partially downloaded clearsigned messages before view 2016-06-30 11:08:44 +02:00
Vincent Breitmoser
58daf68503 messageview: handle crypto error states 2016-06-30 11:08:44 +02:00
Vincent Breitmoser
c12ce95941 messageview: add "View Key" button to crypto info dialog 2016-06-30 11:08:44 +02:00
Vincent Breitmoser
675b167320 messageview: retain MessageCryptoHelper over configuration changes 2016-06-30 11:08:44 +02:00
Vincent Breitmoser
573bfc4b59 messageview: make MessageCryptoHelper detachable 2016-06-30 11:08:44 +02:00
Vincent Breitmoser
68e31a985f messageview: cancel operation when fragment is destroyed 2016-06-30 11:08:44 +02:00
Vincent Breitmoser
9b1e51c559 messageview: draw progress bar while crypto is processing 2016-06-30 11:08:44 +02:00
Vincent Breitmoser
293e23d04a messageview: display support for encapsulated signed parts 2016-06-30 11:01:05 +02:00
Vincent Breitmoser
c640e4a680 messageview: display unsigned text in additional textview 2016-06-30 11:01:05 +02:00
Vincent Breitmoser
61232cb631 messageview: display unsigned attachments in LockedAttachmentView 2016-06-30 11:00:00 +02:00
Vincent Breitmoser
d98f579b34 messageview: move some logic into MessageCryptoPresenter, refresh after key import (solves #732) 2016-06-30 10:59:19 +02:00
Vincent Breitmoser
4da1a01130 messageview: add crypto info dialog 2016-06-30 10:59:19 +02:00
Vincent Breitmoser
d92155e2b5 messageview: show crypto status icon in header 2016-06-30 10:59:19 +02:00
Vincent Breitmoser
8f568867a6 messageview: remove all openpgp info in message view 2016-06-30 10:59:19 +02:00
Vincent Breitmoser
6371cde568 messageview: nicer handling of pendingintent in MessageList and MessageCryptoHelper 2016-06-30 10:49:05 +02:00
Vincent Breitmoser
b0b269a736 messageview: add canceled CryptoError state
Conflicts:
	k9mail/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoHelper.java
	k9mail/src/main/java/com/fsck/k9/ui/messageview/MessageTopView.java
2016-06-30 10:49:05 +02:00
Vincent Breitmoser
b57ef10e90 messageview: add support for encapsulated signed parts (fixes #576) 2016-06-30 10:49:04 +02:00
Vincent Breitmoser
6ceec725cb messageview: use memory-backed body for decrpyted parts which are small and not attachments 2016-06-30 10:49:04 +02:00