Commit Graph

312 Commits

Author SHA1 Message Date
cketti 987b8b17b1 Merge pull request #21 from k9mail/reconstruct_original_message_in_memory
Reconstruct original message in memory
2014-12-11 22:00:57 +01:00
cketti d32d6eed0e Move "magic" from Part.setBody() implementations to MimeMessageHelper.setBody()
Now adding message bodies during parsing won't set/modify headers.
2014-12-08 16:32:23 +01:00
Andrew Chen 105948d78c Oops, checking wrong platform capability. 2014-12-04 19:14:22 -08:00
Andrew Chen 1fa6e117e1 Add Lollipop lock screen notifications.
Add vector versions for some notification icons (yay Illustrator)
Add comments reminding people to add their settings to GlobalSettings.
<plurals> support for notification_new_messages_title
Not sure why #ffffffff is resulting in black with targetSdk 17.
2014-12-04 18:54:22 -08:00
cketti 0f70d5db40 Merge pull request #12 from k9mail/art/warn-if-not-serializable
Art/warn if not serializable
2014-11-11 19:52:31 +01:00
Art O Cathain ba26cfce90 remove controversial methods 2014-10-12 08:54:44 +01:00
Art O Cathain 40102d560d Set interface makes more sense for flags 2014-10-05 12:40:35 +01:00
Art O Cathain fe7c0ebfac simplify following code review 2014-10-05 11:57:11 +01:00
Art O Cathain 159017e91d removed unneeded variables and clarified names 2014-10-05 11:50:04 +01:00
Art O Cathain 02c0b5f2a3 Use collections instead of arrays to enable stronger typing and reduce cruft 2014-10-05 10:37:36 +01:00
Art O Cathain 203dcfe2c3 use interfaces, not implementions 2014-10-04 12:00:48 +01:00
Art O Cathain 46d083bcad fix warnings 2014-09-28 11:19:33 +01:00
Christian Frommeyer 91ef5fa816 Extracted LocalFolder and LocalMessage definition from LocalStore 2014-09-11 20:26:40 +02:00
Christian Frommeyer 038fceabf0 Move LocalStore to new subpackage to prepare decomposition of nested
classes.
2014-09-11 20:26:39 +02:00
cketti 5f0f4e9c21 Merge pull request #485 from haselwarter
Conflicts:
	src/com/fsck/k9/preferences/Settings.java
2014-09-04 23:55:30 +02:00
cketti cb67a21a93 Remove commented-out code 2014-09-04 21:58:18 +02:00
cketti 759fa77c9a Merge pull request #474 from k9mail/tls-client-cert-auth
Client Certificate Authentication
2014-08-30 01:06:28 +02:00
Joe Steele bc60c860b8 Remove com.fsck.k9.helper.NotificationBuilder
Only useful on pre-Honeycomb devices.
2014-08-19 17:17:52 -04:00
Joe Steele 8166f03e87 Remove obsolete "Show unread count" preference
Only applies to pre-Honeycomb devices
2014-08-19 17:17:42 -04:00
Joe Steele f7fb0cca41 Compare Enum types with ==, !=
Per comments in PR #473

https://github.com/k9mail/k-9/pull/474#commitcomment-7416979

https://github.com/k9mail/k-9/pull/474#commitcomment-7416999
2014-08-18 18:12:39 -04:00
Philipp Haselwarter 7aa4c1308e Configure mail notifications by folder class
In response to Issue 1794,
- add a configuration option in the account preferences to show
  notifications only for 1st/2nd/etc class folders
- add an option in the folder preferences to set the notification class
  as 1st, 2nd or inherited from the folder's push class

The default behaviour remains unchanged.
2014-08-06 11:04:07 +02:00
Joe Steele b490773546 Include send failures in the K9mail-errors folder 2014-03-11 19:22:36 -04:00
Joe Steele dc920b8641 Use the mApplication field in lieu of K9.app 2014-03-11 19:08:49 -04:00
Joe Steele e475e51731 Rework handling of certificate errors while pushing
Eliminate import of MessagingController in ImapStore.
2014-03-11 19:08:09 -04:00
Joe Steele df3eef0052 Fix the K9mail-errors folder
Error messages were not being put in the folder because of a problem with
how loopCatch was being handled.

It looks like this problem goes back to commit 5aea9e7.

Additional device info has been added to the error messages.

Also, now the feature is only enabled in debug mode.
2014-03-03 17:31:23 -05:00
Joe Steele c8150a12fa Show account name in certificate error notifications
getName() shows the user's name from the first identity for the account.

What we really want is getDescription(), which is the account name that
shows in the account list.
2014-03-03 17:31:20 -05:00
Joe Steele 39590d49bd Notify user of certificate errors while pushing
Previously, if a server's certificate failed authentication while
connecting for push (if, for example, the certificate had expired), then
the attempt to connect would fail, and another attempt would be tried
later.  After a certain number of failed attempts, no further attempts
would be made.  Meanwhile, the user is oblivious to the failures, and it
could be quite some time before the user realizes that they are not
getting email.  Even when they do realize it, they would not know the
cause.

With this commit, users receive a notification when such failures occur
while connecting for push.  (These notifications are already generated
with failures while polling.)  Tapping the notification will take the user
to the relevant server settings where they can choose to accept the
certificate.
2014-03-03 17:18:49 -05:00
András Veres-Szentkirályi ab3044c9fa use Set instead of implementation type 2014-02-15 23:59:24 +01:00
András Veres-Szentkirályi 8ac942d828 replaced unnecessary explicit iterator use with for-each loop 2014-02-15 23:59:19 +01:00
András Veres-Szentkirályi b942bf2889 typofix in comment (desti{o,}nation) 2014-02-15 23:58:31 +01:00
Joe Steele a4440b4042 Fix inadequate certificate validation
Proper host name validation was not being performed for certificates
kept in the local keystore.  If an attacker could convince a user to
accept and store an attacker's certificate, then that certificate
could be used for MITM attacks, giving the attacker access to all
connections to all servers in all accounts in K-9.

This commit changes how the certificates are stored.  Previously, an
entire certificate chain was stored for a server (and any of those
certificates in the chain were available for validating signatures on
certificates received when connecting).  Now just the single
certificate for the server is stored.

This commit changes how locally stored certificates are retrieved.
They can only be retrieved using the host:port that the user
configured for the server.

This also fixes issue 1326.  Users can now use different certificates
for different servers on the same host (listening to different ports).

The above changes mean that users might have to re-accept certificates
that they had previously accepted and are still using (but only if the
certificate's Subject doesn't match the host that they are connecting
to).

This commit modifies AccountSetupBasics so that it now calls
AccountSetupCheckSettings twice -- once for checking the incoming
settings and once for the outgoing settings.  Otherwise, an exception
could occur while checking incoming settings, the user could say
continue (or the user could accept a certificate key), and the
outgoing settings would not be checked.  This also helps with
determining if a certificate exception was for the incoming or
outgoing server, which is needed if the user decides to add the
certificate to the keystore.
2013-11-23 13:26:57 -05:00
Danny Baumann 890e0e22e3 Some assorted warning fixes. 2013-09-25 15:20:43 +02:00
cketti b95c079a28 Clean up code 2013-09-13 00:11:06 +02:00
Vipul Solanki e633814061 Fix issue_5931_shows_null_in_notification_while_sending_mail 2013-09-11 19:31:45 +05:30
Jesse Vincent bbad298bf6 Convert OpenMode from an Enum to static ints for perf improvement.
(Based on profiling of long folder list opens)

This should be backported to 4.4
2013-07-30 21:32:35 -04:00
cketti e6d6744f55 Rename string to better convey the meaning
notification_action_read -> notification_action_mark_as_read
2013-07-23 20:12:48 +02:00
Jesse Vincent 917da8cd90 Fix for market-reported NPE:
java.lang.NullPointerException
at com.fsck.k9.controller.MessagingController.actOnMessages(MessagingController.java:5602)
at com.fsck.k9.controller.MessagingController.deleteThreads(MessagingController.java:3986)
at com.fsck.k9.fragment.MessageListFragment.onDelete(MessageListFragment.java:1311)
at com.fsck.k9.fragment.MessageListFragment.onDelete(MessageListFragment.java:1306)
at com.fsck.k9.fragment.MessageListFragment.onContextItemSelected(MessageListFragment.java:1506)
at android.support.v4.app.Fragment.performContextItemSelected(Fragment.java:1583)
at android.support.v4.app.FragmentManagerImpl.dispatchContextItemSelected(FragmentManager.java:1992)
at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:370)
at com.actionbarsherlock.app.SherlockFragmentActivity.onMenuItemSelected(SherlockFragmentActivity.java:211)
at com.android.internal.policy.impl.PhoneWindow$DialogMenuCallback.onMenuItemSelected(PhoneWindow.java:4038)
at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:735)
at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:149)
at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:874)
at com.android.internal.view.menu.MenuDialogHelper.onClick(MenuDialogHelper.java:193)
at com.android.internal.app.AlertController$AlertParams$3.onItemClick(AlertController.java:934)
at android.widget.AdapterView.performItemClick(AdapterView.java:301)
at android.widget.AbsListView.performItemClick(AbsListView.java:1287)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:3078)
at android.widget.AbsListView$1.run(AbsListView.java:4161)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4921)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
2013-07-21 15:54:46 -04:00
Jesse Vincent bcc2263e07 Marking a message as read in the database is currently very expensive, especially if you have threading enabled.
Defer that until _after_ telling listeners that they're cool to show the message
2013-07-11 18:44:44 -04:00
Jesse Vincent 1bed455e4f Replace synchronous setting of a flag with async setting of the flag. This helps speed up message display time (anecdotally) 2013-07-11 18:44:44 -04:00
cketti 5d07b6691b Don't load unread/flagged count when creating LocalFolder instances
This avoids a potentially expensive LEFT JOIN when querying the database.
2013-07-07 03:31:14 +02:00
cketti 2789e9fa38 Don't use extended notifications when privacy mode is enabled 2013-06-17 16:26:49 +02:00
cketti e15409bafa Don't show ALL unread messages for "notification opens unread messages" 2013-04-18 22:06:33 +02:00
cketti 33a2b05701 Get rid of accidentally created "-NONE-" folder 2013-03-31 01:13:09 +01:00
cketti 94b5758eea Use cache when marking message as read on view 2013-03-18 17:53:18 +01:00
cketti a364d6262d Fix cache cleanup 2013-03-18 17:44:33 +01:00
Danny Baumann 538b81b6ec Make notification task back stack consistent to activity flow.
Fixes #4956.
2013-03-15 13:25:25 +01:00
Danny Baumann 195686cbd6 Fix NPE when clicking on a notification with >= 2 messages on SDK < 16.
Seemingly the intents in the task back stack got confused when the
pending intent was updated in those versions (the Accounts intent was
delivered to MessageList). Avoid that by not updating the current
intent, but dropping the old one.

Fixes issue #4955.
2013-03-15 12:48:04 +01:00
Danny Baumann 3ff522c9c4 Include a full activity back stack when building notification intents. 2013-03-13 11:03:51 +01:00
cketti 625c5f1874 Fix "Empty trash" functionality for POP3 accounts
Previously messages in the local Trash folder were marked as deleted,
then deleted from the server. During the next sync the placeholders for
deleted messages are removed from the database.
Obviously this doesn't work for POP3 accounts because the Trash folder
can't be synchronized with the server. So, for POP3, we now immediately
clear out all messages in that folder.
2013-03-10 21:45:36 +01:00
cketti 207e2a1e56 Notification icon update
Android 2.2: use old icon
Android 2.3: new icon, (try to) follow icon guidelines for 2.3
Android 3.0+: new icon, follow guidelines for 3.0+

See http://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar.html
2013-02-26 20:34:52 +01:00