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

1460 Commits

Author SHA1 Message Date
András Veres-Szentkirályi
cbbd0bc405 use more idiomatic String.isEmpty() instead of comparing length to 0 2014-02-15 23:59:24 +01:00
András Veres-Szentkirályi
21fe3f6cd2 use built-in TextUtils.join instead of StringBuilder 2014-02-15 23:59:23 +01:00
cketti
53eac39a90 Extract code to scale the slider value for the message content font setting 2014-02-13 06:04:19 +01:00
cketti
90f63ba057 Remove old setting for message content font size
- export new setting
- add upgrade code to convert old setting to new format
2014-02-13 04:22:45 +01:00
cketti
d419fab789 Add support for KitKat's Storage Access Framework
This allows users on KitKat to add multiple attachments at once.
2014-02-10 20:58:50 +01:00
Koji Arai
cbddf960b1 Should disable COMPOSE menu item
When message viewing and tap the next icon, menu icons (previous, next, delete and replys) disappears for an instant.
But a compose icon remains, then tap it accidentally.
2014-02-10 19:59:26 +01:00
cketti
cf228583bc Merge pull request #448
Change message body font size with slider
2014-02-01 00:52:32 +01:00
cketti
6e7fa0df03 Save/restore slider state 2014-02-01 00:49:39 +01:00
cketti
f224483df4 Fix display error in account settings
* correctly initialize summary of 'Server search limit'.
* don't persist value in shared preferences
2014-01-31 22:10:28 +01:00
Sergii Pylypenko
67abde055a Change message body font size with slider, using new setTextZoom() WebView API, from 40% to 250% 2014-01-31 23:09:25 +02:00
cketti
b299713807 Support extras for ACTION_VIEW + mailto: URI
Support the extras documented for ACTION_SEND to be used with
ACTION_VIEW to support another app that doesn't care, namely Twitter.
2014-01-30 02:49:04 +01:00
cketti
1a16dbf295 Restore instance state in correct order
Fixes issue 5968
2014-01-23 01:35:21 +01:00
cketti
4955e34886 Merge pull request #437 from zjw/misc_clean_up 2014-01-05 04:30:28 +01:00
cketti
06ec852090 Rename plurals to make Transifex happy 2014-01-04 01:44:31 +01:00
Joe Steele
0de72c31b4 Use a locale-specific date in the header of a quoted message
Also, include the sent-date in the header when using
the "prefix" quote style.  "Be like mutt" (and gmail,
and thunderbird)

Also, the quoteOriginalHtmlMessage method was using the mSourceMessage
field in various places when it should be using its originalMessage
parameter.

Related issues:  2249, 3456
2013-12-29 18:46:51 -05:00
Joe Steele
cedcd7e47c Eliminate the need to pass a context to LocalKeyStore.getInstance
Instead, have K9.onCreate initialize the location of the key
store file (similar to what is done with
BinaryTempFileBody.setTempDirectory).

Also, LocalKeyStore.getInstance has been changed so that it
no longer needs to be synchronized.
2013-12-03 19:24:37 -05:00
cketti
765b390eb5 Remove LocalKeyStore's dependency on K9.app 2013-12-03 13:28:48 +01:00
cketti
2a9ac867b9 Remove LocalKeyStore's dependency on Account to reduce coupling 2013-12-03 12:56:31 +01:00
Joe Steele
8eef43c282 Implement pruning of old certificates from LocalKeyStore
Certificates are deleted whenever server settings are changed
or an account is deleted.
2013-12-02 14:49:47 -05:00
Joe Steele
40404c3700 Move some classes out of com.fsck.k9.mail.store
The classes are just as much related to com.fsck.k9.mail.transport
as com.fsck.k9.mail.store, so having them in
com.fsck.k9.mail.store doesn't seem appropriate.

Move LocalKeyStore to com.fsck.k9.security

Move TrustManagerFactory and TrustedSocketFactory to com.fsck.k9.net.ssl
2013-12-02 14:07:57 -05:00
Joe Steele
76605f7d86 Extract code into new LocalKeyStore class
Also, implement the ability to configure an alternate key store
file location. This permits the running of unit tests without
clobbering the live key store file.

Also, add a test to confirm that the key store file is being written
out and reread correctly.
2013-12-02 14:04:40 -05:00
cketti
48d11fd386 Properly save and restore instance state in AccountSetupBasics 2013-11-29 05:33:48 +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
b500047e42 Fix contact picture color generation.
Make sure to return different colors for senders with different name,
but the same mail address (e.g. mails sent by certain issue tracking
systems).
2013-11-11 13:31:58 +01:00
cketti
b398c4d7f4 Fix file selection for import
Using FLAG_ACTIVITY_NO_HISTORY will cause the file selection
to fail when KitKat's "Open from" activity opens a third-party activity.
2013-11-07 07:33:33 +01:00
Jesse Vincent
e20e513039 Sadly, KitKat's file manager fails to recognize our mimetype and won't let users import settings 2013-11-05 20:19:27 -05:00
Joe Steele
0323af09e5 Don't add blank lines to composed messages if there is no quoted text 2013-10-11 11:39:50 -04:00
Joe Steele
ef01cabccc Remove \n from R.string.message_compose_reply_header_fmt
This string resource is used in two places -- both with and without the
linefeed at the end.  Instead of having a linefeed in the string and
having the code remove it if not needed, the linefeed is now omitted from
the string and the code adds it if needed.

Also, the line ending is changed from \n to \r\n.

Also, the string in the DE and FR locales had linefeeds at the start that
were removed so they match all the other locales.

(The string in the zh-rTW locale was left alone, since it had no
linefeeds.  It looks like that file has numerous instances where \n was
replaced with actual newlines, which is probably not correct.)
2013-10-11 11:39:48 -04:00
Joe Steele
5a46575dc2 Generally replace \n with \r\n when part of a message
This builds upon the efforts started 2 commits back where \r\n is used for
all message text and \n is only used when the text is inside an
EolConvertingEditText widget.
2013-10-11 11:39:46 -04:00
Joe Steele
114be7a15d More robust checking to prevent fatal IndexOutOfBoundsException
Even with the fix in the parent commit,  the X-K9mail-Identity header can
become invalid if, for example, a user creates a draft in K-9 Mail, then
edits the draft outside of K-9 Mail, then opens the draft again in K-9
Mail.

This commit assures that an invalid X-K9mail-Identity header will not
result in an IndexOutOfBoundsException.
2013-10-11 11:39:45 -04:00
Joe Steele
bfb0316583 Fix fatal IndexOutOfBoundsException
The problem:

Configure the account (just an example -- problems can occur in other
configurations as well):
Message Format: HTML
Reply quoting style: Prefix
Quote message when replying: yes
Reply after quoted text: yes

Reply to a message that has a large quantity (20+) of \r\n scattered in
the body of its HTML version (not an unusual scenario).

Add a reply.  Save the message as a draft.  Go back & open the draft
again.  A fatal IndexOutOfBoundsException occurs.

The cause:

When the draft was saved, the X-K9mail-Identity header was computed and
added to the message, then the text of the message was processed with
MimeUtility.fixDraftTextBody, replacing all occurrences of \r\n with \n in
the quoted message before being saved in LocalStore, thus invalidating the
X-K9mail-Identity header.

The fix:

Remove MimeUtility.fixDraftTextBody and implement
MessageCompose$EolConvertingEditText instead.  Any message text placed in
an EolConvertingEditText widget is assured to have \n line endings.  Any
message text extracted from an EolConvertingEditText widget is assured to
have \r\n line endings.  The X-K9mail-Identity header will always be
computed correctly.

Issues thought to be related:  4782, 5010, 5634, 5725

As noted in some of the referenced issues, errors didn't always result in
a fatal exception, but instead with mixed up text.

Ref:  commit f9a35aeaee
2013-10-11 11:39:15 -04:00
Joe Steele
005241d97b Issue 4594: draft not saved with shared info
When another app shared info with K-9 Mail, the draft was not
always being saved when the "Save as draft" menu option was selected.
2013-10-11 11:24:58 -04:00
cketti
1aca9eb22c ContactPictureLoader code cleanup 2013-10-03 21:21:54 +02:00
cketti
bea6ba6881 Fix JavaDoc to match the changes in ContactPictureLoader 2013-10-01 01:53:21 +02:00
Koji Arai
e4313067b6 Don't performSend() on onSave(). 2013-10-01 07:53:08 +09:00
Danny Baumann
8777441d92 Use address object as contact picture instead of email address only.
Fixes assignment problems for emails sent by some issue tracking
systems, which send out mails with a fixed mail address on behalf of
different people.
2013-09-27 08:53:14 +02:00
Danny Baumann
890e0e22e3 Some assorted warning fixes. 2013-09-25 15:20:43 +02:00
Danny Baumann
d6d22a82bc Fix build with latest SDK tools. 2013-09-25 14:54:27 +02:00
Danny Baumann
aa798fad85 Fix caching of fallback contact icons.
The cache key must be consistent with how calcUnknownContactLetter()
works, otherwise one gets the same fallback icon for different senders.
2013-09-25 14:52:59 +02:00
cketti
2b7f5e7b70 Merge branch 'pick_attachment_fix'
Update LocalStore code to handle the newly introduced temporary files
for attachments

Conflicts:
	res/values/strings.xml
	src/com/fsck/k9/activity/MessageCompose.java
2013-09-25 05:22:00 +02:00
cketti
677d6c923d Don't stop the activity before attachments have been fetched
Display a progress dialog when the user tries to send the message or
save a draft and the attachments haven't been fetched completely.
2013-09-25 03:46:11 +02:00
cketti
62aa1b87d0 Fetch attachments while MessageCompose activity is running
Android allows other apps to access protected content of an app without requesting the
necessary permission when the app returns an Intent with FLAG_GRANT_READ_URI_PERMISSION.
This regularly happens as a result of ACTION_GET_CONTENT, i.e. what we use to pick content
to be attached to a message. Accessing that content only works while the receiving activity
is running. Afterwards accessing the content throws a SecurityException because of the
missing permission.
This commit changes K-9 Mail's behavior to copy the content to a temporary file in K-9's
cache directory while the activity is still running.

Fixes issue 4847, 5821

This also fixes bugs related to the fact that K-9 Mail didn't save a copy of attached content
in the message database.

Fixes issue 1187, 3330, 4930
2013-09-25 03:12:34 +02:00
Joe Steele
45e3d8459e Recursively convert attachments of type message/rfc822 to 7bit if necessary.
The preceding commit resulted in attachments of type message/rfc822 being
sent with 8bit encoding even when the SMTP server did not support
8BITMIME.  This commit assures that messages will be converted to 7bit
when necessary.

A new interface CompositeBody was created that extends Body, and classes
Message and Multipart were changed from implementing Body to
CompositeBody.  Additional classes BinaryTempFileMessageBody and
LocalAttachmentMessageBody were created (by extending BinaryTempFileBody
and LocalAttachmentBody, respectively), and they too implement
CompositeBody.

A CompositeBody is a Body containing a composite-type that can contain
subparts that may require recursive processing when converting from 8bit
to 7bit.  The Part to which a CompositeBody belongs is only permitted to
use 8bit or 7bit encoding for the CompositeBody.

Previously, a Message was created so that it was 7bit clean by default
(even though that meant base64 encoding all attachments, including
messages).  Then, if the SMTP server supported 8BITMIME,
Message.setEncoding("8bit") was called so that bodies of type TextBody
would been transmitted using 8bit encoding rather than quoted-printable.

Now, messages are created with 8bit encoding by default.  Then, if the
SMTP server does not support 8BITMIME, Message.setUsing7bitTransport is
called to recursively convert the message and its subparts to 7bit.  The
method setUsing7bitTransport was added to the interfaces Part and
CompositeBody.

setEncoding no longer iterates over parts in Multipart.  That task belongs
to setUsing7bitTransport, which may in turn call setEncoding on the parts.

MimeUtility.getEncodingforType was created as a helper function for
choosing a default encoding that should be used for a given MIME type when
an attachment is added to a message (either while composing or when
retrieving from LocalStore).

setEncoding was implemented in MimeBodyPart to assure that the encoding
set in the Part's headers was the same as set for the Part's Body.  (The
method already existed in MimeMessage, which has similarities with
MimeBodyPart.)

MimeMessage.parse(InputStream in, boolean recurse) was implemented so that
the parser could be told to recursively process nested messages read from
the InputStream, thus giving access to all subparts at any level that may
need to be converted from 8bit to 7bit.
2013-09-03 19:53:13 -04:00
Joe Steele
77407eb5b7 Don't base64 encode attachments of type message/rfc822.
The problem:  Receive a message with an attachment of type message/rfc822
and forward it.  When the message is sent, K-9 Mail uses base64 encoding
for the attachment.  (Alternatively, you could compose a new message and
add such an attachment from a file using a filing-picking app, but that is
not 100% effective because the app may not choose the correct
message/rfc822 MIME type for the attachment.)

Such encoding is prohibited per RFC 2046 (5.2.1) and RFC 2045 (6.4).  Only
8bit or 7bit encoding is permitted for attachments of type message/rfc822.

Thunderbird refuses to decode such attachments.  All that is shown is the
base64 encoded body.

This commit implements LocalAttachmentBody.setEncoding.  If an attachment
to a newly composed message is itself a message, then setEncoding("8bit")
is called, otherwise setEncoding("base64")  is called for the attachment.
Similar behavior occurs when an attachment is retrieved from LocalStore.

The setEncoding method was added to the Body interface, since all
implementations of Body now declare the method.

The problem here differs from that in the preceding commit:  Here, the
encoding problem occurs on sending, not on receipt.  Here, the entire
message (headers and body) is base64 encoded, not just the body.  Here,
the headers correctly identify the encoding used;  it's just that the RFC
does not permit such encoding of attached messages.  The problem here
could in fact occur in combination with the preceding problem.
2013-09-03 19:52:11 -04:00
cketti
fb6cff238c Merge branch 'pr/364'
Make actions shown in message view menu configurable
2013-08-29 21:14:04 +02:00
cketti
2043df74da Restructure code to set visibility of copy, move, archive, spam menu items
In my opinion this structure makes the code much easier to read.
2013-08-29 18:20:03 +02:00
cketti
ee9246b4f9 Fix code style/formatting 2013-08-29 17:34:46 +02:00
Joe Steele
ac42bce799 Clean-up related to certificate chains
Per comments in pull request #365
2013-08-27 18:48:07 -04:00
Jesse Vincent
20c4a97c2c Merge pull request #365 from zjw/Issue_5886_misleading_ssl_errors
Fix erroneous SSL certificate warnings
2013-08-27 11:57:48 -07:00
Jesse Vincent
b5b91302f2 Load unread and flagged message counts lazily in the folder list
The new method is a little bit janky, but a little bit of jank is better than 2n
heavy SQL count queries per folder before we even show the folder list.

On my 200 folder account, display of the folder list activity drops from 10+s to
< 1s
2013-08-26 23:09:47 -04:00
Joe Steele
604aa87ccf Fix erroneous SSL certificate warnings
If you attempted to use SSL to connect to a server that speaks
STARTTLS, you should get an SSL protocol error.  Instead, you
were likely to get an "Unrecognized Certificate" error that shows
you an unrelated certificate chain and asks you to accept it or
reject it.  Neither action would work because the actual problem
had nothing to do with certificates.  The unrelated certificate
chain that popped up had been statically stored when validating
a prior connection to a different server.

With this patch, certificate chains are no longer stored statically
when validating server connections.

Issue 5886 is an example of a user experiencing this problem.
2013-08-25 15:43:36 -04:00
Leon Handreke
8464a432e2 Use named indices to get values from "visible refile actions" preference 2013-08-25 11:35:14 +01:00
Leon Handreke
22639a7361 Make actions shown in message view menu configurable
Fixes #5850.
2013-08-24 19:26:06 +01:00
Jesse Vincent
0a79df2155 Revert "Remove the message list stars preference now that stars are in the chip"
This reverts commit 48785f52bf.

Conflicts:
	src/com/fsck/k9/K9.java
	src/com/fsck/k9/activity/Accounts.java
	src/com/fsck/k9/activity/FolderList.java
	src/com/fsck/k9/activity/MessageList.java
	src/com/fsck/k9/activity/setup/Prefs.java
2013-08-22 20:56:55 -04:00
Jesse Vincent
ee234b65f8 Return to old style chips for accounts, folders and messages.
My circle design stopped being even a little bit useful when we stopped showing
the "complex" versions of the shapes
2013-08-22 20:56:55 -04:00
cketti
9a385146c4 Replace tabs with spaces 2013-08-21 13:23:52 +02:00
cketti
bd3bd861c5 Optimize code to extract the character to display in the fallback contact picture 2013-08-21 13:08:05 +02:00
cketti
ce56475a4f Avoid race condition that can lead to a NullPointerException 2013-08-21 12:33:27 +02:00
cketti
20fcd6f63d Add setting to toggle colored background of fallback contact pictures 2013-08-16 18:43:00 +02:00
cketti
3064d8ab31 Code style and documentation cleanup 2013-08-16 01:49:26 +02:00
Jesse Vincent
2ba84bceaa Merge pull request #353 from sfuhrm/gmail-style-user-pics
Gmail style user pics, 2nd try

* sfuhrm/gmail-style-user-pics:
  Changed the fallback char from 'K' to '?'. The riddler was here ;).
  Using Android proposed colors as contact color palette now: http://developer.android.com/design/style/color.html
  Fixed NPE found by blackbox87 ... thanks pal!
  Added more finer characters as proposed by cketti
  Caching also the calculated anonymous bitmap as proposed by maniac103. This removes a lot of code for special handling unknown contacts.
  Bugfix for negative modulo result indexing the palette array
  Changed hash based color calc to a hash indexed palette as discussed in the pull request.
  GMail-app-style generated colorful one-letter contact pictures for pictureless contacts

Conflicts:
	src/com/fsck/k9/activity/misc/ContactPictureLoader.java
	src/com/fsck/k9/fragment/MessageListFragment.java
2013-07-30 22:00:19 -04:00
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
Stephan Fuhrmann
c30af244cf Changed the fallback char from 'K' to '?'. The riddler was here ;). 2013-07-30 21:27:52 +02:00
Stephan Fuhrmann
ea5905861a Using Android proposed colors as contact color palette now: http://developer.android.com/design/style/color.html 2013-07-30 21:27:52 +02:00
Stephan Fuhrmann
6af02c4c13 Added more finer characters as proposed by cketti 2013-07-30 21:27:52 +02:00
Stephan Fuhrmann
df5766ba3a Caching also the calculated anonymous bitmap as proposed by maniac103. This removes a lot of code for special handling unknown contacts. 2013-07-30 21:27:52 +02:00
Stephan Fuhrmann
d45c8b053b Bugfix for negative modulo result indexing the palette array 2013-07-30 21:27:52 +02:00
Stephan Fuhrmann
64212072c0 Changed hash based color calc to a hash indexed palette as discussed in the pull request. 2013-07-30 21:27:52 +02:00
Stephan Fuhrmann
16f6d85ea2 GMail-app-style generated colorful one-letter contact pictures for pictureless contacts 2013-07-21 14:34:45 -04:00
Stephan Fuhrmann
3feaeb6903 GMail-app-style generated colorful one-letter contact pictures for pictureless contacts 2013-07-21 16:58:38 +02:00
Jesse Vincent
4bd6f36eb9 Don't invalidate the options menu from the message list as we open a
message. We also invalidate it (twice) as we show the message. It turns
out to have measurable performance impact on 2.3 thanks to ABS
2013-07-17 19:52:18 -04:00
cketti
9a5fca2d16 Stop using the old Android Market URL 2013-07-16 16:24:51 +02:00
cketti
186f6d6ba2 Don't save signature to identity header if identity doesn't use a signature 2013-07-08 06:44:44 +02:00
cketti
1c6072a1cc Fix "Folders" menu item and hotkey handling in MessageList 2013-07-02 20:03:45 +02:00
Jesse Vincent
b4c8afbe22 better guarding for the folders menu item in the face of search folders with multiple accounts 2013-07-02 13:14:43 -04:00
Jesse Vincent
b7cf3e421a Play store NPE:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.fsck.k9/com.fsck.k9.activity.UpgradeDatabases}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2117)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2155)
at android.app.ActivityThread.access$700(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1248)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5062)
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:795)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1409)
at android.app.Activity.startActivityForResult(Activity.java:3389)
at android.app.Activity.startActivityForResult(Activity.java:3350)
at android.app.Activity.startActivity(Activity.java:3562)
at android.app.Activity.startActivity(Activity.java:3528)
at com.fsck.k9.activity.UpgradeDatabases.launchOriginalActivity(UpgradeDatabases.java:183)
at com.fsck.k9.activity.UpgradeDatabases.onCreate(UpgradeDatabases.java:109)
at android.app.Activity.performCreate(Activity.java:5058)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2081)
... 11 more
2013-07-01 23:32:04 -04:00
Jesse Vincent
0a029561d1 Back, by popular demand, an empty trash button in the accounts context menu 2013-06-30 18:54:27 -04:00
Jesse Vincent
4baaafcd88 Add a "Folders" menu item back to the message list to ease nav discoverability 2013-06-30 18:54:13 -04:00
Jesse Vincent
2ef5c11e9b market-reported NPE
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.fsck.k9/com.fsck.k9.activity.MessageList}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1970)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995)
at android.app.ActivityThread.access$600(ActivityThread.java:128)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4517)
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:993)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.fsck.k9.activity.MessageList.decodeExtras(MessageList.java:368)
at com.fsck.k9.activity.MessageList.onCreate(MessageList.java:216)
at android.app.Activity.performCreate(Activity.java:4470)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1053)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1934)
k
2013-06-30 18:52:17 -04:00
cketti
85e7d4fa12 Don't crash when MessageList is started with no intent extras 2013-06-29 03:22:44 +02:00
cketti
34812fa5b8 Correctly initialize mSingleAccountMode
This fixes a NullPointerException when trying to open account settings
from the Unified Inbox (when there's only one account).
2013-05-27 16:59:07 +02:00
cketti
f16082eab3 Always include currently opened message in the message list
This should fix various bugs where moving to the next/previous message
didn't work.
2013-05-23 17:15:09 +02:00
Jesse Vincent
2e74d28da9 Merge branch 'Issue_4503_auto-fit_messages_option' of https://github.com/zjw/k-9 into zjw-Issue_4503_auto-fit_messages_option
* 'Issue_4503_auto-fit_messages_option' of https://github.com/zjw/k-9:
  Revert "Don't show a disabled preference if there is nothing a user can do to enable it."
  Fix indentation
  Correct preference version number.
  Issue 4503: Auto-fit messages option
  Don't show a disabled preference if there is nothing a user can do to enable it.
2013-05-07 21:49:12 -04:00
Joe Steele
97a2f1b261 Revert "Don't show a disabled preference if there is nothing a user can do to enable it."
This reverts commit 0ecc49815f because
an equivalent commit was subsequently made to master:
5f49195a0a
2013-04-28 13:37:29 -04:00
cketti
c7024af9a1 Merge branch 'message-list-sender-sorting' 2013-04-26 02:39:48 +02:00
cketti
5f49195a0a Hide "condensed layout" setting instead of disabling it 2013-04-19 02:24:41 +02:00
cketti
e15409bafa Don't show ALL unread messages for "notification opens unread messages" 2013-04-18 22:06:33 +02:00
Joe Steele
d9979cb1a2 Issue 4503: Auto-fit messages option
Create a preference option to automatically shrink messages
to fit the screen width (default setting is "shrink").
2013-04-04 17:11:17 -04:00
Joe Steele
0ecc49815f Don't show a disabled preference if there is nothing a user can do to enable it. 2013-04-04 16:48:54 -04:00
cketti
c5dc626bbc Show "check mail" action when displaying Unified Inbox etc. 2013-04-02 21:47:20 +02:00
cketti
0c5bdf2c97 Add "Mark all as read" action to message list 2013-04-02 19:17:58 +02:00
cketti
bc665bffe1 Fix NPE introduced in 340d6e0522 2013-03-31 16:53:27 +02:00
cketti
48c3fbd2ba Don't crash when being started by an old unread widget intent 2013-03-31 01:35:38 +01:00
cketti
340d6e0522 Use themed context when creating EmailAddressAdapter
Previously the activity theme was used to display the auto-complete
suggestions. This lead to unreadable text when the activity theme was
different from the "composer theme".
2013-03-28 19:36:41 +01:00
m0viefreak
d85af1bfe0 reenable sorting by sender in messagelist
This was disabled in faa666394c
because it isn't possible to extract the name of the android
contact in the 'ORDER BY...' clause when querying the database.
Instead it simply sorts by the email address.

This may cause the same contact to appear multiple times in
the list, if they have multiple email addresses assigned.

But in most cases this is good enough and surely better than
not having the option to sort by sender at all.

Desktop mail clients such as Thunderbird also simply use the
sender email information when sorting the column.

This also adds a SenderComparator for usage in the MergeCursor.
2013-03-27 13:08:42 +01:00
cketti
9ea46cf03b Merge branch 'Issue_4019_pinch_zoom'
Conflicts:
	src/com/fsck/k9/view/MessageWebView.java
2013-03-19 21:09:23 +01:00
cketti
9118097dcb Avoid NullPointerException when decoding contact pictures 2013-03-19 02:59:05 +01:00
Danny Baumann
3ff522c9c4 Include a full activity back stack when building notification intents. 2013-03-13 11:03:51 +01:00
Danny Baumann
d523caa61b Also clear back stack when a new intent arrives.
This should make sure there aren't any old fragment instances in that
case.
2013-03-13 11:03:51 +01:00
cketti
a619a9df93 Hide delete policy "Mark as read on server" for POP3 accounts 2013-03-13 06:34:14 +01:00