Commit Graph

3915 Commits

Author SHA1 Message Date
Alice Yang 6929654a0d Remove checkboxes from Email
Change-Id: Ie2338cddcf15a278622f72e4827e6b160e16912f
2013-04-25 22:13:29 -07:00
Alice Yang 81c1b3ee2f Sender images in email
This is the minimum change to not break the build in Email when CL
for removing checkboxes is submitted in MR2.
I'm still investigating why contact images aren't showing up in Email and
will follow up with a fix.

Change-Id: I814ed2b0b0a468ee465e57c47c6c7248f4afdbbc
2013-04-25 20:28:31 -07:00
Scott Kennedy c726d4fa6c Add "Reply all" setting to tablets
This controls the notification action on tablets.

Change-Id: I0b8df2ded371820f0dada3f1b11cebad462962ed
2013-04-24 18:15:19 -07:00
Andrew Sapperstein 156a9bde06 PreferenceMigrator force commits pref upgrades.
Now, when PreferenceMigrator.migrate is run,
we forcibly call commit after the VersionedPrefs
object is updated (whether MailPrefs, AccountPreferences
or FolderPreferences). This commit applies the change to
Email2. Should fix b/8640441 and b/8520847.

Change-Id: I9a014c1c4bd35aa2ea8e268fec9a050d47e4d732
2013-04-24 13:38:08 -07:00
Scott Kennedy 643846abbd Settings changes
Bug: 8685202
Change-Id: Ica781557b91e5ed43221f6e28b9d65cbb044ea55
2013-04-23 13:12:31 -07:00
Andrew Sapperstein 625409b169 CL to support method signature change.
Helps fix b/7923968. This is just a one-line
change. The real change is in the UnifiedEmail code.

Change-Id: I60808c0265e911394cbffa92214d10626769ca9a
2013-04-22 13:59:16 -07:00
Yu Ping Hu e669f28b08 Fix periodic sync (for POP/IMAP).
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
2013-04-21 11:33:52 -07:00
Yu Ping Hu 50d5152f54 Merge "Code cleanup." into jb-ub-mail-ur9 2013-04-19 23:16:00 +00:00
Yu Ping Hu 0eb47994a3 Code cleanup.
- Refactor EmailProvider.call
- Remove unused import

Change-Id: I9f0ae35256856a9cd6ea015348d49fcbb6fa8b0f
2013-04-19 15:59:27 -07:00
Mark Wei 3a82ad5992 Fix migration from Email1 to Email2 when using combined inbox.
Bug: 8578254
Change-Id: I2afb7e145664c1e6d10c0cfbf654d835fec8c9f1
2013-04-19 15:07:28 -07:00
Yu Ping Hu 503cc0630d Stop using ContentCache and related caches.
Bug: 8655671
Change-Id: I349ce464b5d752b3ac687852dbce4f0b57e04c67
2013-04-19 11:09:15 -07:00
Yu Ping Hu 9a2686afa2 Improve POP sync.
- 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
2013-04-17 10:54:33 -07:00
Scott Kennedy e0d4cab353 Populate the account object with the type
This is needed for prioritizing contact results

Bug: 8587925
Change-Id: I093f0914060a01f37b175ae5877b27e0e16e9eaf
2013-04-15 13:22:27 -07:00
Yu Ping Hu f9fd4b6bb4 Remove spammy log message.
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
2013-04-12 16:19:58 -07:00
Yu Ping Hu 9b040bde34 Base64 the folder persistent id.
Bug: 8596345
Change-Id: Ib7025fa54abb12f7c65628639819d06fb530c7ed
2013-04-11 21:42:23 -07:00
Yu Ping Hu 22130ad565 Sync folders during account sync.
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
2013-04-11 20:39:36 -07:00
Yu Ping Hu 64cc777f8b Autosync stale mailboxes when switching to them.
"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
2013-04-11 18:01:29 -07:00
Yu Ping Hu 4b0e25898e Fix checkbox option fetch for combined view.
Change-Id: Ie0679ce00ee0558cccc8e10c9346dd730ce08a33
2013-04-11 15:42:09 -07:00
Alice Yang 54cf4b9d8c Merge "Checkbox vs. sender image setting" into jb-ub-mail-ur9 2013-04-11 21:41:51 +00:00
Alice Yang 9f1cff0659 Checkbox vs. sender image setting
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
2013-04-11 14:16:01 -07:00
Yu Ping Hu 17d5bbf768 Improve mailbox sync and load more.
- 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
2013-04-11 21:06:08 +00:00
Paul Westbrook 0c06a7cf99 Fixed mis-located cleanup code
Bug: 8565783
Change-Id: Iab06411cc85cd4958db574ec52eeebb7457c980f
2013-04-10 00:34:04 -07:00
Vikram Aggarwal 6b88a2471f Allow queries in folder URIs
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
2013-04-09 15:08:11 -07:00
Paul Westbrook 7b423bf136 Remove waitForDebugger call
Bug: 8558839
Change-Id: Ie9f351b119620016e9a46c5bf389fdeb75c77382
2013-04-06 12:35:39 -07:00
Yu Ping Hu 2930476051 Reorder the folders in combined view.
Inbox should go to top.

Change-Id: I90c55952aaa3955adfd6d08a12a568bfb192c730
2013-04-05 16:35:51 -07:00
Paul Westbrook fcddd014da Merge "email: "Exchange Services has stopped" - Rain of Exchange Javacrashes" into jb-ub-mail-ur9 2013-04-05 22:35:37 +00:00
Yu Ping Hu 1389f0ed03 Merge "Add virtual mailbox for all unread messages." into jb-ub-mail-ur9 2013-04-05 22:25:56 +00:00
Emmanuel Berthier 689efab2b1 email: "Exchange Services has stopped" - Rain of Exchange Javacrashes
Cleanup some nasty records containing NULL fields.

Change-Id: Iec5e7e1bebc4beee8fa010c3f9c9ee723fd2cd83
Author: Emmanuel Berthier <emmanuel.berthier@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 60461

cherry-pick of https://android-review.googlesource.com/#/c/47571/1
2013-04-05 15:22:14 -07:00
Yu Ping Hu c065e72819 Add virtual mailbox for all unread messages.
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
2013-04-05 14:50:50 -07:00
Paul Westbrook d402c890dc Fixed make POP and Imap more locale safe
Cherry-picks from:
https://android-review.googlesource.com/#/c/42334/
https://android-review.googlesource.com/#/c/42332/

Change-Id: I557c3d8c725cf6dc4f13f227dcec63864ab5db67
2013-04-05 13:57:51 -07:00
Paul Westbrook 9fd03edb83 Merge "avoid cursor leak in email provider" into jb-ub-mail-ur9 2013-04-05 20:49:09 +00:00
Yoohyun.choi 89c74e89e5 avoid cursor leak in email provider
When cursor is done, the cursor must be closed to avoid cursor leak.

cherry-pick of https://android-review.googlesource.com/#/c/52910/
Change-Id: Iaaffed2c4e90dc4b17ae55fcedb242bf890b3dd5
2013-04-05 13:45:56 -07:00
Jack Bates 4fd97a3050 Fix SMTP RFC violation for better interoperability
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/
2013-04-05 13:42:13 -07:00
Paul Westbrook 391a7fc0e9 Support legacy shortcuts
We need to support shortcuts that were created with previous versions
of Email

Bug: 8530220
Change-Id: I9e2a44b561f5617ffa954af37a9e78a95400f7dc
2013-04-04 02:45:17 -07:00
Yu Ping Hu c5c9c1c69e Restore functionality for uploading new messages.
The code for syncing new messages from client to server
somehow never got moved from Email1 to Email2.

This change also includes minor cleanup on system mailbox
flags.

Bug: 8531552
Change-Id: I1f9396635ba14cb6e641d2bc1b506c6d702f6b2e
2013-04-03 09:32:35 -07:00
Paul Westbrook d1a87bc02d Fix IMAP sync with Arabic language
Email shouldn't rely on the the default locale.
See: http://developer.android.com/reference/java/util/Locale.html#default_locale

Bug: 7138507
Change-Id: Ia2c6eccc6dee011f4e7e7c663a0328d4fd76131b
2013-04-02 11:36:11 -07:00
Yu Ping Hu de4c230f00 Exclude not fully loaded messages from uimessages queries.
Bug: 8370633
Change-Id: I5643454333b490bb1a988efb7b59e20b18fa67f4
2013-04-01 20:08:30 -07:00
Yu Ping Hu 46d6a4a7cb When loading messages, use left join for Message and Body.
Existing inner join means that a Message without an entry
in Body table cannot display correctly, even though this is
a potentially legitimate state.

However, because the MessageCursor for Email doesn't read
flagLoaded at all, this change actually causes another bug:
if you go to a partially loaded message, it will show as
blank with no load indicator. Fixing b/8370633 will mask
this by not letting you get in a situation where partially
loaded messages are shown.

Bug: 8512030
Change-Id: Ie2e365e7e5df3959115ed299d1a7f03aa1d7af79
2013-04-01 18:17:25 -07:00
Yu Ping Hu 3bef153c9c Merge "Improve error logging for mailboxNotification." into jb-ub-mail-ur9 2013-04-02 00:36:48 +00:00
Paul Westbrook 11472650d1 Fix apk attachments
Bug: 7585865
Change-Id: I20191523377d99472e333dece4d727415f97c67a
2013-04-01 17:20:27 -07:00
Paul Westbrook 3767da5d26 Add capabilities for search folder
Bug: 6693452
Change-Id: Ib55fca4f883a699eabdaabf35568bffa055d556f
2013-03-31 12:00:14 -07:00
Yu Ping Hu 7cc82371ec Improve error logging for mailboxNotification.
Change-Id: I5b16ac46ce8cdd6e8f791c9cea7d7ead7e053bdc
2013-03-28 19:10:23 -07:00
Yu Ping Hu c534638b7a Disable notification prefs until folder prefs are loaded.
Bug: 8485354
Change-Id: Id56c2634a16274e9340ad6ecb96661ee8a489d49
2013-03-27 17:40:38 -07:00
Yu Ping Hu 1dd937bf18 Prevent NPE when getting a bad mailbox id.
The mailboxNotification query apparently can return bogus
mailbox ids. This underlying bug still needs fixing.

Bug: 8482721
Change-Id: Icfbd0d986ab32fe878a0dbe09a3276322c75cafe
2013-03-26 15:00:30 -07:00
Paul Westbrook 28a344042d Prevent NPE
Also add additional logging for this case

Bug: 8372753
Change-Id: I87aa9ee46f0ca866745d62d27f4b40913f2e9b97
2013-03-22 18:21:19 -07:00
Yu Ping Hu 861c5c8c9e Guard against potential NPE.
Change-Id: I379da1f478b1b1fd1e488dbeff249cc10e3d48d5
2013-03-21 19:25:14 -07:00
Paul Westbrook 5a3aebbd2d Fix problem with sending attachments in Exchange
The problem was that when the attachment was attempted to be opened
from the Exchange process, it didn't have access to the cached file.
Instead, use a content provider uri to reference the cached file.

Bug: 8400456

Change-Id: I80abd66642e938cf09f73bf0e9bd049aa8d7ba1d
2013-03-21 17:34:19 -07:00
Yu Ping Hu 68a8e21248 Merge "Always create system folders during sync." into jb-ub-mail-ur9 2013-03-21 16:05:03 +00:00
Yu Ping Hu 8a11cb8fd1 Merge "Always show the starred folder." into jb-ub-mail-ur9 2013-03-21 16:04:53 +00:00
Scott Kennedy f16a7612c0 Exclude all inbox labels when we're viewing an inbox
Bug: 8426563
Change-Id: I7707c9ebf9ebcb73be73ef82f5f2212514671bfe
2013-03-20 17:51:59 -07:00