Commit Graph

3165 Commits

Author SHA1 Message Date
Tony Mantler c6953b7755 Reimplement QuickResponse support
b/8622751

Change-Id: Id079efcf34dce15b5f5057f937582c0e198d3d50
2013-08-16 14:08:54 -07:00
Paul Westbrook 7985b43ab7 Add public no-arg Fragment constructors
Bug: 10311630
Change-Id: I0243462cdc28b9af3151754a8c8583330418579b
2013-08-13 16:43:34 -07:00
Martin Hibdon 66ac290b35 Fix a bug causing duplicate messages to be added
The IMAP time based query only takes a date, not a
date/time. This means that if we want to load all
messages since, for example, Aug 11 at 3:00 PM,
we'll actually get all messages since Aug 11 at any time.

Our local query actually took into account the time, so
when we loaded a map of local messages, it would not
always include all of the same messages that the IMAP
query would. This meant that if we processed a message
that was in our IMAP query window but not our local query
window, we'd always think it was a new message even
if it wasn't.

It's easy enough to increase the size of our local query
window so that it will definitely include all of the
messages the IMAP query might return, but this adds
a new problem: It's no longer safe to delete any local
message that did not come back in our IMAP query result.
Since our local query may include a larger time window
than the IMAP query window, we need to check each message's
timestamp, and only delete it if it is inside the remote
query time window.

Change-Id: Ib3c1bbe8f3db05720d32a981483676afa6d6c38b
2013-08-12 17:22:24 -07:00
Tony Mantler cef6c19be2 Move the "Add new quick response" button into the action bar
Change-Id: I433fb686837d0de125fb277f5055bc33b7769eff
2013-08-12 12:04:43 -07:00
Paul Westbrook 8c13dcd950 Merge "Fix problem in IMAP with non-roman locales" into jb-ub-mail-ur10 2013-08-12 19:02:39 +00:00
Paul Westbrook ae29fb76f0 Fix problem in IMAP with non-roman locales
This is a partial cherry-pick of:
https://android-review.googlesource.com/#/c/57514/1

Change-Id: I1dea4d5bf0bd02fec2baf5763f5864c3eb32f744
2013-08-12 11:43:44 -07:00
Tony Mantler 948e503b4a Merge "Continue rewriting QuickResponse support" into jb-ub-mail-ur10 2013-08-12 18:42:49 +00:00
Tony Mantler 6d24534804 Continue rewriting QuickResponse support
Change-Id: I95530e84d91f4becb3de5280af83ce546e1ed093
2013-08-12 11:40:16 -07:00
Alice Yang 50f0cba92c Merge "Sync disabled tip" into jb-ub-mail-ur10 2013-08-12 05:38:59 +00:00
Yu Ping Hu 4ef1f6a689 Merge "Synchronize all access to the EmailServiceInfo map." into jb-ub-mail-ur10 2013-08-09 20:41:47 +00:00
Paul Westbrook 3b758913be Merge "Use DatabaseUtils method instead of query()" into jb-ub-mail-ur10 2013-08-09 19:19:44 +00:00
yi.jang 44e1603155 Use deleteDatabase method to improve safety of DB file handling
Deleting .db files can make malformed database issues
when WAL(write ahead logging) mode is enabled.
EmailProvider doesn't use WAL mode currently,
But it has to be fixed because it might cause the problem in the
future.

Change-Id: Ie0313c5d253f3080401b00b197e7cbf97f25423c

Conflicts:
	src/com/android/email/provider/EmailProvider.java
2013-08-09 11:58:15 -07:00
Yu Ping Hu b5eed31d1b Synchronize all access to the EmailServiceInfo map.
Bug: 10255995
Change-Id: I36bee575a923b5c8bfbaea7babdf9f2c5e9bd378
2013-08-09 11:51:53 -07:00
yi.jang a674551464 Use DatabaseUtils method instead of query()
Use DatabaseUtils.longForQuery() method instead of SQLiteDatabase.query().
This reduces processing cost of database cursor.

Change-Id: Ibe53645b32a4de1ab6518f879e564ddf8f75d822

Conflicts:
	src/com/android/email/provider/EmailProvider.java
2013-08-09 11:50:27 -07:00
Tony Mantler fdb0fc712a Merge "Start cleaning up QuickResponse code" into jb-ub-mail-ur10 2013-08-08 02:21:18 +00:00
Yu Ping Hu bf0911f3de Disable attachment preview pref.
Bug: 10232077
Change-Id: If1ed251d63befd40dc55ada2da7c56f5ac611c68
2013-08-07 18:09:13 -07:00
Tony Mantler 05273f8309 Start cleaning up QuickResponse code
Change-Id: I76b5adbe8e05713c44d11a2e51d317cae6266a56
2013-08-07 16:57:21 -07:00
Martin Hibdon d42e14ad72 Merge "Implement two part imap sync" into jb-ub-mail-ur10 2013-08-07 20:30:00 +00:00
Martin Hibdon c75f5880ab Implement two part imap sync
b/10075523
Now, every 15 minutes we'll sync the last 24 hours.
Every 4 hours we'll perform a full sync, which will
take either the last 7 days, or until the oldest message
we already have locally.

Change-Id: Idc55a46a28af2a68cc324e414d51d88373941595
2013-08-07 12:26:24 -07:00
Mark Wei 034149b586 Add a setting for attachment previews.
Bug: 10131520
Change-Id: I782b331971272203d1b36a578cf6a149793b10e6
2013-08-07 10:55:59 -07:00
Alice Yang f1284d4d55 Sync disabled tip
Bug 9825835

Change-Id: I5fd692c7cd8a03d3b8ea140f2d6e8919bd293904
2013-08-07 08:31:29 -07:00
Yu Ping Hu c3ceed6894 Fix ui notifications on folder list changes.
uifolders and uiallfolders cursors now setNotificationUri on
the appropriate uri. That uri is notified whenever:

- A folder is inserted, deleted, or modified.
- A message is inserted or modified (since this can affect
  message counts).

This second one is still not quite right: there are some
conditions where counts aren't updating correctly.

While I was here, I renamed the notification uris to
avoid collisions between different versions of the app.

Bug: 9111855
Change-Id: Ia29bb6a65b4f673bf352fdf0e14270b3f1443ca8
2013-08-06 20:37:35 -07:00
Yu Ping Hu 6edccbf1f1 Fix capabilities to allow discarding drafts.
Bug: 10098652
Change-Id: Iebceb203cd054a1550f7c1f118841a77429f853a
2013-08-06 20:20:15 -07:00
Yu Ping Hu 9d628b4c41 Merge "Fix icons for unread virtual folder." into jb-ub-mail-ur10 2013-08-06 00:50:53 +00:00
Yu Ping Hu 5e5b08dcce Fix icons for unread virtual folder.
Bug: 9594158
Change-Id: I9e00e89fe74c43c99b8cb67e068aa06593c79413
2013-08-05 17:34:08 -07:00
Martin Hibdon d7384918e7 Merge "Fix a couple of bugs in imap synching" into jb-ub-mail-ur10 2013-08-05 19:30:38 +00:00
Martin Hibdon fda9d945e7 Fix a couple of bugs in imap synching
b/10111339
b/10125810
The first problem was that the imap BEFORE clause
is exclusive, so messages on the date given in
BEFORE will not be sent. Now, on the sync for the
most recent messages, we will just not specify a
BEFORE clause, so we can always get the most recent
messages even if our clock drifts from the server.

The second is that some imap servers do not accept
time information on the query dates, and that causes
errors. The imap spec defines the BEFORE and SINCE
clauses to come with a <date> only, not a time,
and although it seems that at least some imap servers
handle that, it can't be expected to always work.

Change-Id: Ibf41c6f7600b9f9537bc6d13b59873ee36798e1e
2013-08-05 12:27:13 -07:00
Yu Ping Hu bcd81d96a4 Report message count for folders where total count < 0.
Local-only folders will set total count = -1 to signify that
they should never sync with server.

Change-Id: I6034633e453343f14faac077902e67ea4e6b0a35
2013-08-02 12:23:19 -07:00
Yu Ping Hu 431811986f Merge "Move required system folder types to Mailbox." into jb-ub-mail-ur10 2013-08-02 01:18:34 +00:00
Martin Hibdon ef576c8e6c Merge "Update pop3 syncing" into jb-ub-mail-ur10 2013-08-02 00:44:39 +00:00
Martin Hibdon b177af7534 Update pop3 syncing
b/9857766
If we currently have zero messages (i.e. initial sync of
a new account) we will load the most recent 100 messages.
On subsequent syncs, we will load more recent messages
until either:
1. We have loaded 100 and not yet past any of the messages
we already had locally, or
2. We encounter messages that we already had locally, and
then load "deltaMessageCount" additional messages past
the ones we have locally.

Change-Id: I8b34409dcdaceff2d2e1906174241a74f2331688
2013-08-01 16:25:26 -07:00
Yu Ping Hu eb4ee8a7aa Move required system folder types to Mailbox.
I'm formalizing the concept of folders that must exist,
and the list of such folders should be accessible to all
sync adapters.

Change-Id: I9e4d2d51aa495d211eab2d1e36c3fa197a1ac00d
2013-08-01 16:19:28 -07:00
Yu Ping Hu a5355442a0 Merge "Improve message counting, ah ah ah!" into jb-ub-mail-ur10 2013-08-01 17:30:12 +00:00
Scott Kennedy 41d5342d98 Merge "Refactor PreferenceMigrator" into jb-ub-mail-ur10 2013-08-01 17:03:46 +00:00
Scott Kennedy 9e521deb6b Remove some warnings
Change-Id: Ie5adc71af6b6cec316c5186ac0566c02a4fc1bff
2013-08-01 08:47:51 -07:00
Scott Kennedy 60a9b7ecfb Refactor PreferenceMigrator
Do the same thing as with LogTag, so that we don't have the same
class name in the same package name in three projects.

This makes IDE builds much easier.

Change-Id: I6c9235ab231e1c04ba87c5da627094c7258a5edf
2013-07-31 22:40:08 -07:00
Yu Ping Hu 5ff368b845 Improve message counting, ah ah ah!
- Restore message_count in the database.
- For UI queries on outbox, trash, and drafts,
  use message count instead of total count.

Note this won't be the right thing to do when we properly
sync trash & drafts, but we'll address that when those syncs
are fixed.

Bug: 10098601
Bug: 10113686
Change-Id: I647c74396ee12ed981d89bfb654cc6d0a25cac95
2013-07-31 14:27:01 -07:00
Yu Ping Hu ef0d98155c Fix settings menus.
- Account & general fragments need to clear to remove
  "Add account" for phone & 7".
- 10" needs to therefore specify their menus in order to
  have "Add account".

Bug: 10097087
Change-Id: I133db9b9f7f6610ae30b46927ffcb8a9e4df4c0a
2013-07-30 18:51:01 -07:00
Yu Ping Hu e95b9bb3e4 Merge "Delete most of IEmailServiceCallback." into jb-ub-mail-ur10 2013-07-30 03:21:10 +00:00
Yu Ping Hu 2075c97f60 Delete most of IEmailServiceCallback.
The old callback mechanism is deprecated, in favor of making
calls on the ContentProvider.

Bug: 9842867

Change-Id: I65f559e593cda24456c4ffb96f785e054626dd0b
2013-07-29 20:04:42 -07:00
Paul Westbrook 6dd7bd29e9 Load large POP attachments
Load large attachments from a partial POP message

There will be a new change that improves the UI for loading
the rest of the message

Bug: 8651782
Change-Id: I075de1e82e27cf2018607eef50143850e8fecaf2
2013-07-29 18:58:37 -07:00
Paul Westbrook c362f66ee1 Merge "Stop crashing with POP attachments" into jb-ub-mail-ur10 2013-07-29 18:30:03 +00:00
Paul Westbrook 8fe7811241 Stop crashing with POP attachments
This is the first part of the change to fix POP attachments.
A following change will handle these partial messages better

Bug: 8651782

Change-Id: I8d00866207dedf63805e0eecab9555c28104f2dc
2013-07-29 11:21:22 -07:00
Tony Mantler 6cf15e66bc Re-add the demon "Add New Account"
b/10041669

Change-Id: I2b1db0a063ec292b33ec8f176b739c1c4422a040
2013-07-29 11:19:23 -07:00
Yu Ping Hu 48b14fde96 Fix all periodic syncs on upgrade.
Bug: 9844218

Change-Id: Ibacb309752b076faa3f96b5ad57dc121efd79bcb
2013-07-26 18:19:01 -07:00
Yu Ping Hu 02f0b1eee8 Remove MailService.
Change-Id: Ibffd0c9fb0eed4822dff28d1577fb455736cffd1
2013-07-26 17:38:07 -07:00
Yu Ping Hu 30b28286aa Merge "Cleanup service loading." into jb-ub-mail-ur10 2013-07-26 23:38:44 +00:00
Yu Ping Hu 47bcb5a21a Cleanup service loading.
Authenticator upgrading no longer uses the services file
to specify upgrades, so we can remove the fields associated
with that functionality.

Change-Id: I2122f18614d714a3d5a565fb4a6a547ddc010b6f
2013-07-26 16:23:27 -07:00
Yu Ping Hu afe097f318 Simplify account reconciliation.
- Rather than handle by type, do them all at once.
- Simplify when reconciliation happens.

Bug: 9056861

Change-Id: If264678c82c63090246ef8ff857c8e46f6672c85
2013-07-26 16:06:14 -07:00
Martin Hibdon e821797f27 Merge "Update IMAP sync method" into jb-ub-mail-ur10 2013-07-25 01:08:40 +00:00