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

57 Commits

Author SHA1 Message Date
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
cketti
22834d6998 Removed unnecessary null pointer checks 2011-01-19 01:30:13 +00:00
Jesse Vincent
de806f7715 astyle 2011-01-06 16:55:08 +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
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
cketti
5b88a99de0 Got rid of some compiler warnings. 2010-11-04 03:11:34 +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
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
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
Jesse Vincent
4f0bce1569 Simplify many, many boolean conditions with help from IntelliJ 2010-08-29 23:39:26 +00:00
Jesse Vincent
ff5024eaec astyle 2010-08-18 02:48:55 +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
Thialfihar
014b6c19c3 svn:eol-style=LF for src and XML resources
Fixes issue 1982
2010-07-13 21:49:28 +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
Daniel Applebaum
8eeebc593a Handle thread interruptions better and fix some race conditions. 2010-05-22 17:35:05 +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
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
ba021597c4 astyle 2010-05-12 02:51:59 +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
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
9310f3f6c6 Fixes Issue 1441
Shutdown threadPool when Service is destroyed.
2010-04-20 03:22:43 +00:00
cketti
57cc4cd735 Code cleanup. Fixed lots of warnings reported by Eclipse.
- Removed unused imports
- Removed unused variables/code
- Parametrized raw types
- Added @Override annotations
- Added hashCode() when equals() was overriden
2010-04-16 12:20:10 +00:00
Daniel Applebaum
86f3b28f79 Fixes Issue 1413
Look for + as acknowledgement that we're in IDLE mode, not "idling"
string.  

Also, to help with battery life:
1) Give up trying to IDLE after 10 failures.
2) Increase retry delays
2010-04-15 03:17:25 +00:00
Daniel Applebaum
3c7eea7fa5 Remove controller first 2010-04-06 02:38:22 +00:00
Jesse Vincent
a923d066d4 Revert "Fix for issue 1138: New emails after the first do not play new mail ringtone until notifications are cleared by skister2"
(Temporary revert until an NPE is dealt with)

This reverts commit 4bf862a827a456ffed20be707387b9ca4f2b721f.
2010-03-24 01:11:58 +00:00
Jesse Vincent
50d1d7e7aa Fix for issue 1138: New emails after the first do not play new mail ringtone until notifications are cleared by skister2 2010-03-23 02:41:45 +00:00
Daniel Applebaum
e83a428107 Far more advanced poll scheduler. Now it remembers that finish time
of the last successful periodic mail and computes the next start time
as an offset from that successful finish.  The ramifications of this
new method is that changing polling interval on an account does not
force delaying all accounts to poll next in the future by the new
interval.  Instead, K-9 Mail now adjusts the next poll time based on
what the next poll time should be based on the last poll finish and
the new interval.  

Example 1: In the old way, if the old polling interval was 1 hour, and
the next poll was 50 minutes away (10 minutes have passed), and you
changed the interval to 15 minutes, the poll would happen 15 minutes
from now.  In the new way, the next poll will happen only 5 minutes
from now, which is 15 minutes since the last poll.

Example 2: In the old way, if the old polling interval was 1 hour, and
the next poll was 10 minutes away (50 minutes have passed), and you
changed the interval to 30 minutes, the poll would happen 30 minutes
from now.  The next poll would then happen actually 80 minutes after
the previous poll completed.  In the new way, it'll actually happen
immediately, because the time for the next poll, based on the new
schedule, has already passed.

Similar scenarios happen when a loss of network connectivity
occurs. In the old way, polling would resume using the restoration of
connectivity as the starting point.  Each time network connectivity
was lost and restored, the next poll would be further delayed.  *If
connectivity was lost and restored frequently, a poll might never
happen!* In the new way, the next poll is rescheduled based on the
time of the last successful poll, so will be rescheduled just like it
was before the loss of connectivity.  If the time has already been
passed, the poll will happen immediately.
2010-02-10 06:18:35 +00:00
Daniel Applebaum
c12f720ba0 Lower logging level for CoreService and provide instance class name. 2010-02-09 03:11:15 +00:00
Daniel Applebaum
790ae2e25c Fixes Issue 1194
Do both a poll and push reset when connectivity or background data
status changes.
2010-02-09 01:14:55 +00:00
Daniel Applebaum
164ee7cbfd Fixes Issue 1059
Only reschedule polling and setup pushing when necessary due to
particular setting changes.  Makes the K-9 Mail UI much more
responsive to setting changes that do not affect polling and pushing.

The poll schedule is deliberately only rescheduled when the period is
decreased.  An increase in period will still allow the next scheduled
check to happen as originally scheduled.
2010-02-07 21:23:33 +00:00
Daniel Applebaum
9cd52d5ef3 Change WakeLock management logging to verbose level (now that it is
working)
2010-01-22 05:55:58 +00:00
Daniel Applebaum
4ced2fa0e1 Only cause MailService refresh when changing a setting that needs it.
Addresses part of Issue 1059.
2010-01-22 05:54:52 +00:00
Jesse Vincent
c59aeb2c78 Patch from Scott Kister to give us better new-message notifications,
somewhat worked over by me
2010-01-21 18:49:11 +00:00
Jesse Vincent
4493044340 astyle pass 2010-01-18 00:11:02 +00:00
Daniel Applebaum
f3e06b4ef5 Adjust imports for new location of remote control classes 2010-01-15 05:05:41 +00:00
Daniel Applebaum
6c22507dfb Implementation of a Receiver and Service to provide for the capability
to accept control from other Android applications.  Allows for
changing both Account-level and global settings.  Account-level
settings can be applied to a single Account or to all Accounts.

The file class file derived from src/com/fsck/k9/K9RemoteControl.java
will be bundled into a JAR file for use by external applications.

This facility will be used for:
Issue 215
Issue 730
Issue 864
Issue 884
2010-01-14 04:33:50 +00:00
Jesse Vincent
64469e4b4e ran artistic style against src/com/fsck/k9/ 2010-01-14 01:07:28 +00:00
Daniel Applebaum
14587c3f30 Eliminate pointless, useless, deprecated, NOOP, incorrectly commented call. 2010-01-12 19:28:21 +00:00
Daniel Applebaum
64525028de Move execute into a re-usable location 2010-01-12 14:09:30 +00:00
Daniel Applebaum
c86a46deb1 Preparatory for more BroadcastReceivers 2010-01-04 00:47:11 +00:00
Jesse Vincent
6a8ea924c9 Further log cleanup 2010-01-03 02:07:21 +00:00
Jesse Vincent
eb54a99aab EOLs got twisted by something. fixing 2010-01-03 02:07:14 +00:00
Jesse Vincent
a926911e7f rerun astyle 2010-01-03 01:50:51 +00:00
Jesse Vincent
875dc31d5a Log message cleanup 2010-01-03 01:50:32 +00:00
Jesse Vincent
f9e8c877ff Wrap looging in if (DEBUG) statements. 2010-01-03 01:50:25 +00:00
Daniel Applebaum
4859ff7e8f Add wakelocks for calling between MailService and Push/PollServices.
I don't know if these are truly necessary, but they should not be
harmful and might be a big reliability boost.
2009-12-21 01:48:15 +00:00
Daniel Applebaum
921b022fb5 Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items.  For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.

Fixes Issue 924.

Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-20 00:02:46 +00:00
Jesse Vincent
f31b2702a4 Massive rename to K9, step 1.
Conflicts:

	src/com/android/email/Email.java
2009-12-15 02:50:53 +00:00