Creating new ones (which is the implicit effect of FLAG_CANCEL_CURRENT)
causes PendingIntent.equals() to return false for the new and the old
instance, which in turn leads to AlarmManager failing to remove the
alarm.
Also remove the unneeded request code offsets. The intent actions for
the various actions are already distinct, so we need to only identify
between the intents that have the same actions; using the mailbox ID as
request code is sufficient for that purpose.
Change-Id: I9030c24a9c6b1c722b246601fde741f7027d3de7
Schedule the ping restart through AlarmManager to be able to cancel it
properly on connection loss, and make sure to only restart idle
connections that aren't already idling (which may happen e.g. on bootup
or if there was a sync request in the 30 second wait window).
Change-Id: If62ffa0981a7a0a71ed7764a9724c07466c6d8a3
Remove mailboxes from the list synchronously and just do the network I/O
and thread joins in the background.
Change-Id: I2a339e5982c103b69f1212627f1cc98e98a8a068
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
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
Make sure that either messages are fetched or a sync is initiated, and
there can be no situation where neither happens.
Change-Id: I73ec2482a5a86c54309634f434b7d8fd77d7c079
The refreshing (done every 25 minutes) should be a cheap operation.
Instead, do a (quick) re-sync after idling failed.
Change-Id: Idfcc775417dc02417142e51ca546c9564c660aab
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>
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
b/17443087
Now for certain folder types, when they are first created,
the uiSyncStatus is set to NEEDS_INITIAL_SYNC. This prevents
us from displaying the empty state until after the sync has
completed.
Change-Id: Ib04c915f6972ecb75092dd50e90dee8647ee2f64
When AccountManager notifies of account change, resend notifications
because the existing ones can point to an account that doesn't
exist anymore.
Bug: 17713589 Gmail crashes when accessing an old notification for an account that has been deleted.
Change-Id: I6c2cf5234006f4859fea5bbaa52970963bcfccdd
b/16463253
The FAB compose button overlaps the action button found in the TL footer
when network errors occur during sync. To avoid this overlap, the snackbar
is used to display these errors and they no longer appear as a TL footer.
In order to signal the sync error to AAC for display in the snackbar, the
Folder.lastSyncResult needed to be encoded in the manner that AAC reads.
This was not happening for POP/IMAP/Exchange accounts, so a large portion
of this change is encoding that value properly every place it is written.
To ensure the value is read/written properly everywhere, common methods were
introduced in UIProvider that do this work. UIProviderTest was also added
to ensure the read/write methods agree with each other.
Finally, the display of the "Load More" TL footer was updated to match the
latest spec.
Change-Id: I9d3ae1157f288f05b0fed4d1385858f6c9ebfbf9
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