google still lets us build against. Thanks and apologies to Joey Jones
for finding the pre-existing incompatibility that pushed me to make the
build change we've been promising for so long
This let the user go back to the 'main' activity he was in before attempting a folder choice (instead of the folder choice activity itself which could be confusing) when using long-press HOME from another application
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
Switched MessageList from singleTask to singleInstance launchMode
http://stackoverflow.com/questions/2417468/android-bug-in-launchmode-singletask-activity-stack-not-preserved
This makes launched activities to initiate a new task, they have to
handle the BACK key if user has the option enabled. On the other hand,
K-9 still keeps a single instance of MessageList (as opposed to using
the default launch mode which would allow multiple instances -
potential increased memory usage).
See Issue 2467
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.