Commit Graph

16 Commits

Author SHA1 Message Date
Danny Baumann c96099279b Properly unregister alarm manager callbacks.
Change-Id: I2d474bc1cee168a5b76b8710b382498cd6c2fd59
2015-10-18 14:06:01 -07:00
Danny Baumann a7bc7d8572 Use AlarmManager to schedule an IDLE connection restart.
We also want to restart it during sleep.

Change-Id: Ib2c26e06fb923487b10d94edc1bbd743ebb39fb1
2015-10-18 14:06:01 -07:00
Danny Baumann 739281a727 Don't auto-register IDLE when gaining connection.
We request a sync in this case anyway, which in turn starts the IDLE
connection anyway. If we're starting IDLE earlier, we do unnecessary
work as the sync will tear it down just a few moments later.

Change-Id: I9b99023fbe1aaab72638f6ef9d29223d9a325b7b
2015-10-18 14:05:32 -07:00
Danny Baumann cb4fda8286 Do less work on IDLE refresh.
Don't do a full reconnection, but just a stopIdling/startIdling pair. In
order to be able to do that, make sure the IDLE connection is fully shut
down when stopIdling() returns, for which some refactoring was needed to
avoid a deadlock on mIdledFolders: the ImapIdleListener callbacks
acquire this lock, so stopIdling() now MUST NOT be called with
mIdledFolders lock held.

Change-Id: Ifa1677d7845722ccee2b1b9380c7b7e4014bcd97
2015-10-18 14:05:32 -07:00
Danny Baumann 9e42c23d4c Improve debug logging.
Change-Id: I13a99d5caadcc7bd2682791527f71a697d07f8d0
2015-10-18 14:05:32 -07:00
Danny Baumann 624321751a Use an inexact timer for the IDLE refresh.
Also use a wakeup timer, as we can't rely on the screen being turned on
at refresh time.

Change-Id: If64c164fd151c63404d0d63d9c463556cc3d0658
2015-10-18 14:05:32 -07:00
Danny Baumann 03f09f6450 Fix some more argument order issues.
Change-Id: I1ea17a0fba4ff3af03ee8c0acbe9967bed92aae1
2015-10-18 14:05:32 -07:00
Danny Baumann b9532055e2 Simplify logic.
Make sure that either messages are fetched or a sync is initiated, and
there can be no situation where neither happens.

Change-Id: I73ec2482a5a86c54309634f434b7d8fd77d7c079
2015-10-18 14:05:32 -07:00
Danny Baumann c59103c933 Fix some typos.
Change-Id: Idd3018a03023efe02c3bcf40b44c8f5a5e304436
2015-10-18 14:05:32 -07:00
Danny Baumann d13071399f Don't re-sync when refreshing the IDLE connection.
The refreshing (done every 25 minutes) should be a cheap operation.
Instead, do a (quick) re-sync after idling failed.

Change-Id: Idfcc775417dc02417142e51ca546c9564c660aab
2015-10-18 14:05:32 -07:00
Danny Baumann e680bf0ddc Fix argument order.
Change-Id: I087937c1323cfa1fd3d5400ef0a69d7476e36d20
2015-10-18 14:05:32 -07:00
Danny Baumann f364a9b70d Simplify code.
Change-Id: I6c783afb9c436a35176134bfe7ae5264f2255b2f
2015-10-18 14:05:32 -07:00
Jorge Ruesga 08ace26ed6 email: imap push
Change-Id: I8a184a5644e4322ee65d969e14cd47fe119f5df2
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
2015-10-18 14:05:32 -07:00
Jorge Ruesga 598a070c27 email: support for auto-sync multiple IMAP folders
This enables to auto-sync multiple IMAP folders, not only Inbox. Default to Inbox only.
This changes relays in the syncloopback attribute to configure the folders to add to
sync process.

Change-Id: I8973cfd6ddec33446256bc8b48418558e27596b5
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
2015-10-18 14:03:22 -07:00
Ashwini Munigala 11f2252994 Add MAIL_SERVICE WAKEUP, SEND, MOVE, READ, DELETE MESSAGE action
Add change in Email App to process following intents
from Bluetooth App, for MAP MSE support.

- org.codeaurora.email.intent.action.MAIL_SERVICE_WAKEUP
- org.codeaurora.email.intent.action.MAIL_SERVICE_DELETE_MESSAGE
- org.codeaurora.email.intent.action.MAIL_SERVICE_MOVE_MESSAGE
- org.codeaurora.email.intent.action.MAIL_SERVICE_MESSAGE_READ
- org.codeaurora.email.intent.action.MAIL_SERVICE_SEND_PENDING

Change-Id: I2b46265ba20c6f333c9e6d1b19ee73f5a066f1ff
2015-10-06 03:30:32 -06:00
Paul Westbrook bb68c13afa Changes to support smaller email tombstone apk size
This reduces the tombstone down by 100K

A follow-on cl will remove the unused resources from the tombstone build

Bug: 17414014
Change-Id: I5d38811b17a5273ec726e750ab123e10e36cee04
2014-09-16 13:59:07 -07:00