Periodic sync management was wrong in at least two ways:
1) Periodic syncs were scheduled as a side effect of
performing a sync, so changing the sync interval setting
would not do what you expect.
2) Performing a manual mailbox sync would schedule a
periodic sync on that mailbox.
This change removes the side effect from sync, and instead
actually responds to updates to the sync interval by
removing the extra syncs and updating just the account sync.
Bug: 8666490
Change-Id: I3f4a3fb7044c408578f0dc75ccb6c5bb176bfc0b
- Set socket timeout as soon as you open it. This was how
IMAP worked, so I just moved the call up one level. This
should help one of the sync forever scenarios.
- Simplify the SQL query for getting a Mailbox.
- Try to load messages that failed to load last time.
- Always close the connection to the remote folder.
- Don't try to be too clever in fetching the body.
This needs to be fixed later for attachements, but for
now seems to work better and will let me get more testing.
Change-Id: I91b6a6f2a2846b34b1a0c50eb4eb37fc947389ce
We don't have special MIME types for all possible queries.
It's only an error if the matcher doesn't know about it at
all, which is handled by findMatch, so we just return null
here (same as with Gmail).
Change-Id: I7061e25b8fd4543c41f62188cb90712353a64779
Previously, the folderlist itself would only sync when there
was no inbox, i.e. at account creation time. Now any sync
that's not a mailbox specific sync will do it.
Change-Id: If7c446cd2e193ed6e1a4abd3fdde0d5748371ba5
"Stale" is currently defined as "it's been 5 minutes since
my last sync".
Also includes a small refactor so that uiloadmore doesn't
load the mailbox from DB twice.
Bug: 7100372
Change-Id: Ib31aa211fe2ab790044beb7bc7d2fdcccf595171
Replace the current "Hide checkbox" setting with a tri-state setting with
choice of:
- Show checkboxes
- Show sender image
- Show neither
Bug: 8512959
Change-Id: Ifa233b6d65f8c37388edeed71dbfbfdf1295d6fc
- Update syncTime for IMAP and POP whenever we sync.
- Change load more to simply include the delta in the RPC
rather than using the visibleLimit column.
- Add a query to get the message count for a Mailbox.
- Refactor code for updating totalCount and determining
the new message count when syncing.
- Remove dead code from Mailbox.
- Remove uses of visibleLimit from code.
Note that visibleLimit and messageCount in Mailbox table are
no longer useful and will be removed in a later change.
Bug: 8579767
Bug: 8523146
Change-Id: Ieb67e3b6f1c82c3b21b972c5a1e557cd75dc21db
The proxy for local services were not intializing the TempDirectory.
Also, move the TempDirectory initialization out of the try/catch block.
Otherwise if Device.getDeviceId threw an exception, the temp directory
wouldn't be initialized
Bug: 8531456
Change-Id: Iea34e0b03203d6c6fe6e5d1ae9902d081bd90c27
As a result of a previous change, we are appending application version
to the end of the folder name. This breaks the EmailProvider's
expectation about folder URIs. So instead of using just
uifolder/<number>, allow for uifolder/<number>?<appversion query>
getPathSegments().get(i) will still return the path segment without
the query, so the folder ID gets resolved correctly.
The previous change:
https://googleplex-android-review.googlesource.com/#/c/281416/
Bug: 8435074 Not able to access Exchange inbox and combined inbox
Change-Id: I7b9ffad9b5510d1a08a29e2a21aacb091d4330a6
Also restores the trash icon. I'm not using the "correct"
icon -- it's the menu icon, not a folder icon -- but it
looks correct. Also, the "unread messages" icon is likewise
the menu icon for mark unread.
Bug: 8527132
Bug: 8444885
Change-Id: I7d3bc286f80f130e6f08ff1340a013d81700406e
Space after colon violates RFC 5321 (and RFC 821): "Since it has been a common
source of errors, it is worth noting that spaces are not permitted on either
side of the colon following FROM in the MAIL command or TO in the RCPT command"
Change-Id: Ie5330bf2bd01cd8f734134dadd742cf16df70d7a
Signed-off-by: Jack Bates <jack@nottheoilrig.com>
cherry-pick of https://android-review.googlesource.com/#/c/32640/