Commit Graph

569 Commits

Author SHA1 Message Date
Yu Ping Hu 1fb5fa6981 Merge "Populate real name in From: field" into jb-ub-mail-ur10 2013-10-21 22:46:55 +00:00
Yu Ping Hu 7b28bb95a3 Merge "Update the folder sync status while searching in IMAP" into jb-ub-mail-ur10 2013-10-21 18:47:09 +00:00
Tony Mantler 632ee24d48 Populate real name in From: field
b/11246653

Change-Id: I8629ba655b99629f7b14f857acb67cb8453ddb8b
2013-10-18 16:49:56 -07:00
Yu Ping Hu a5a28ffb63 Do not require RPC for getCapabilities.
Bug: 11241892
Change-Id: I3da136c9035414c821ee2038da01134c551bb9dd
2013-10-18 14:09:09 -07:00
Alon Albert 8c989772df Handle User Refresh in Edge Cases
Handle the following edge cases when a manual refresh is triggered:
* No connectivity
* Low storage space
* Timeout (sync not started)

Bug: 11241113
Change-Id: I580235d633fcb65999c0bfe8bf383c9c8ba72110
2013-10-18 09:32:47 -07:00
Tony Mantler af52f20930 Update the folder sync status while searching in IMAP
b/7538620

Change-Id: I7bb0c706fd63b1fe7d20dc0f186934e0dcac2f06
2013-10-17 16:07:21 -07:00
Martin Hibdon 85d2190552 Clear all "drafts" related flags from email when sending
b/11224331

Change-Id: I1df8ea3e0e24b050cd391dea454124e06988bf7d
2013-10-14 17:42:02 -07:00
Yu Ping Hu 1004d74f2c Fix folder list loading.
We used to do N+1 DB queries when our list has
N folders in it. Now just do 1 and be smarter about
how we read our values out of it.

Bug: 11112954
Change-Id: Icde0b979ca985e63d6ceba05c3a63f3a9b7e3566
2013-10-14 14:47:33 -07:00
Yu Ping Hu ac93f838b8 Only fake the footer for mailboxes that sync from server.
Bug: 11193271
Change-Id: I7bc8903889ae4f91065cdb4696128a4eed62844f
2013-10-12 15:15:33 -07:00
Alon Albert 9a342b3147 Cleanup Logs
Bug: 11149133
Change-Id: I764e2e3a8c37769d2e788688cf50789d0f22e9d3
2013-10-11 15:31:24 -07:00
Martin Hibdon e7f61f403c Merge "Always fix parent keys on startup of email" into jb-ub-mail-ur10 2013-10-11 22:24:34 +00:00
Martin Hibdon f7078466c3 Always fix parent keys on startup of email
b/11174975
There are already several database fixing steps that
occur when the database is opened, add another one
to correct uninitialzed mailbox parent keys.
This is because we use a two pass system for adding
mailbox rows, first to insert the rows, and second to
assign parentKeys to child rows. We need two passes
because we may insert a child row before its parent,
so the parent's rowId is unavailble. But if the process
dies before the second step is complete we'll be in
an inconsistent state.

Change-Id: Ifaeeaca7e82c1e99656033bc1a9f25d7acb67517
2013-10-11 15:18:41 -07:00
Tony Mantler 03dc3f22d1 Combined account name is locale-dependent. Notify on locale changes
b/10784192

Change-Id: I2a9783f19709ff5cf0ab5a4a14ab1ad60b71d821
2013-10-11 14:20:03 -07:00
Tony Mantler 11fb2d161e Merge "Use the correct widget provider class" into jb-ub-mail-ur10 2013-10-10 21:06:42 +00:00
Tony Mantler 8117953140 Merge "Add null check before passing from address to Rfc822Tokenizer" into jb-ub-mail-ur10 2013-10-10 18:45:49 +00:00
Martin Hibdon 03f56f2c1a Merge "Allow multiple mailboxes to be synced in a single request" into jb-ub-mail-ur10 2013-10-10 18:31:17 +00:00
Tony Mantler 22f0c87d5f Add null check before passing from address to Rfc822Tokenizer
b/11167816

Change-Id: I13671d953b067ecc5becf160eab52be30e4f1354
2013-10-10 10:35:58 -07:00
Martin Hibdon 56aba8d843 Allow multiple mailboxes to be synced in a single request
b/11103878

Change-Id: Ic6abf51457fe94e89fe51b461da4371f50e0fe86
2013-10-10 09:30:31 -07:00
Tony Mantler 5da03b90e2 Merge "Temporary workaround for ConversationCursor missing updates" into jb-ub-mail-ur10 2013-10-10 16:20:00 +00:00
Tony Mantler e12b22148f Temporary workaround for ConversationCursor missing updates
Launch a 2-second delayed message to send a second notification on the folder change update

b/11027351

Change-Id: Ia0a22be79f4a74c6857517cc21e2313cea9cc0e9
2013-10-09 16:15:29 -07:00
Tony Mantler 37aa460ef7 Use the correct widget provider class
b/11043157

Change-Id: Icb4e6408535ca4cc055581ca7e8bd74c83aeecdf
2013-10-09 15:52:16 -07:00
Tony Mantler 4b32e54309 Merge "Update widgets on provider instantiation." into jb-ub-mail-ur10 2013-10-09 20:27:42 +00:00
Tony Mantler 73379a2729 Parse "From" addresses when constructing ConversationInfo
Fixes sender image tiles

b/11120430

Change-Id: Ie53e2a01cfffd70318fad7cd1cbc2565f1bbb87b
2013-10-09 10:29:36 -07:00
Tony Mantler 02b9ac1b95 Update widgets on provider instantiation.
b/11043157

Change-Id: I439a67447875b6f9ba818b2c2cb95c83db034896
2013-10-08 11:55:39 -07:00
Tony Mantler 805bc397bd Merge "Populate the snippet in ConversationInfo" into jb-ub-mail-ur10 2013-10-08 16:22:58 +00:00
Tony Mantler b62486b019 Populate the snippet in ConversationInfo
b/11111973

Change-Id: I8a4e824ad4c708fba8013221279a0b1ac6df7a8c
2013-10-07 16:50:55 -07:00
Tony Mantler 5d47ee0f87 Store the total count of search results in the database only
b/11027351

Change-Id: Ibb63bd7b80ff0af653cca4424dd2d17168262710
2013-10-07 14:40:14 -07:00
Yu Ping Hu 1265011585 Merge "Don't push things that haven't performed initial sync." into jb-ub-mail-ur10 2013-10-04 21:41:13 +00:00
Yu Ping Hu 3f24a9e2c7 Don't push things that haven't performed initial sync.
Also remove the ping kick.

Bug: 11081520
Change-Id: I21d5050886b2c352771013f4f3e5b9282482d508
2013-10-04 14:36:43 -07:00
Tony Mantler d946f8319a Merge "Reply-all setting is modified at runtime, don't cache it in a static map" into jb-ub-mail-ur10 2013-10-04 21:21:26 +00:00
Tony Mantler b424ffa65b Reply-all setting is modified at runtime, don't cache it in a static map
b/11066041

Change-Id: I4e14c3add3fe2503e8369dbb7ef976e110ef2fee
2013-10-04 13:25:26 -07:00
Martin Hibdon fc8a57bb29 Fix display for inlined and non-inlined attachments
b/11069575
The problem is that the UI_MESSAGE query strips out
any inlined attachments, but the UI_ATTACHMENTS query
does not. This means that we display all attachments
at the bottom, regardless of whether or not they're
inlined, but the formatting is wrong because when we measured
we only had the non-inlined attachments.
Maybe we should not display the inlined attachments at
the bottom, but right now if we do that, it's impossible
to save an inlined image. So for now, I'm just making
UI_MESSAGE query keep the inlined attachments so that
both queries have the same behavior.

Change-Id: I155f5bb74dbfbc8dbf02b56dca58fbca3da5da78
2013-10-04 12:13:02 -07:00
Martin Hibdon 921c04d2ac Add some logging
Change-Id: Ib26ffad0bb6841361b8ee7be4ee2a6255d509ae2
2013-10-01 17:08:16 -07:00
Tony Mantler 768c6b86db Don't show "No messages" when starting a search on Exchange
Also clean up some finals

b/11027351

Change-Id: Ib76cc90b04acb531d53b2d6bdc4e3b0ad911f72c
2013-10-01 12:02:47 -07:00
Tony Mantler 53ecec0ad4 Merge "Only return messages that are unread and unseen for an unseen query" into jb-ub-mail-ur10 2013-09-30 23:34:19 +00:00
Tony Mantler d4a06f409d Only return messages that are unread and unseen for an unseen query
b/10970849

Change-Id: I23d40fc39987fab35521f1dd75f4631f1fae16d5
2013-09-30 15:32:42 -07:00
Martin Hibdon 2cf965b85f Merge "Make draft attachments work correctly" into jb-ub-mail-ur10 2013-09-30 22:23:42 +00:00
Martin Hibdon f484751e06 Make draft attachments work correctly
b/10968838
The main problem here is that Ui Attachment was always using
a content Uri that was generated using the attachment's account
Id and rowId. This works correctly for attachments in messages
we have received, but it does not work for drafts: Draft attachments
are not stored in the normal place, rather, they are stored in
the cache directory. There is an additional column in the
Attachment table, called cachedFile, which is not replicated in the
Ui attachment. That's okay though, if we have a cachedFile, then
when we are populating a Ui Attachment, we should just use that
for content Uri.
Also, I discoverd that for draft attachments, we were not correctly
setting the account key. That didn't turn out to be the problem,
but I'm fixing it anyway because it will cause problems later on.

Change-Id: I0143ba824f3a5bfcd77f32828931b94d6977626f
2013-09-30 15:08:45 -07:00
Tony Mantler b38c7d1c37 Avoid ANR due to looking up account info on the main thread
b/10987175

Change-Id: I7344e2717ab1b9557385eb6eb9e7962461b10c9d
2013-09-30 12:31:52 -07:00
Yu Ping Hu 125cbdf9d4 Make certain we don't use a null account.
Bug: 10965484
Change-Id: I525d32fcbde0fbbe0bec467814cf4f09a3de38fe
2013-09-29 18:09:17 -07:00
Yu Ping Hu 85ad73aecd Pass the correct id to getAccountManagerAccount.
Bug: 10965484
Change-Id: I8e1aab4810da4673313b10231592283736a92ef9
2013-09-29 16:12:52 -07:00
Yu Ping Hu 69418d0460 Kick the push once an hour, in case it fails.
Bug: 10954795
Change-Id: If6325c04b2011fb476f20f1419afaee13a786d3c
2013-09-26 22:20:20 -07:00
Yu Ping Hu 5e8d8c1f80 Modify ping on settings changes.
Bug: 9020744
Change-Id: I0dfa2b8e9d999072b8201da61916372ca1a5b08b
2013-09-26 18:33:13 -07:00
Alon Albert feb2c387b0 Upsync Exchange Folders on syncedMessage updates
On updates to content://com.google.android.email.provider/syncedMessage
request a sync for the folder the message is in.

We need to do this because Exchange sync adapter is marked as
android:supportsUploading="false" so notifySync() doesn't work.
Neither does adding a UPLOAD extra to the sync request. If we do that, the
request is dropped.
This means that the sync request will also downsync the folder but t's probably
a good thing anyway.

We could add our own version of UPLOAD extra if we really want to prevent downsync.

Bug: 10678136
Change-Id: I14f06c4da905560716773d31d59388d2e6d25635
2013-09-26 11:16:23 -07:00
Tony Mantler bc5653471c Merge "Separate the account name from the account manager's account name" into jb-ub-mail-ur10 2013-09-25 22:10:56 +00:00
Tony Mantler d17359c2b4 Notify on message Uri when a message is deleted.
b/10919322

Change-Id: I0b39bcbc2e03c45fc0c161211c7cdacd97791c15
2013-09-25 10:09:01 -07:00
Tony Mantler 7349fbff64 Separate the account name from the account manager's account name
b/10894178

Change-Id: Ie64ae00e4fd382fb03fc7c87ea91c7aff8fc8f43
2013-09-24 16:41:50 -07:00
Tony Mantler bab16f9161 Merge "Virtual folders are valid folders, don't kick back to the inbox when we're viewing them" into jb-ub-mail-ur10 2013-09-24 18:58:43 +00:00
Tony Mantler 96192ef342 Virtual folders are valid folders, don't kick back to the inbox when we're viewing them
b/10847930

Change-Id: I182fee7d6caa5c4a67911c0c8e969d8668ac87d0
2013-09-24 11:42:21 -07:00
Martin Hibdon 1290f376c0 Merge "Improve display of attachments in pop" into jb-ub-mail-ur10 2013-09-24 04:14:18 +00:00
Scott Kennedy 0203a06c87 Ensure we have all columns in combined view
I added these to real mailboxes for hierarchical folders, but we
also need them in combined view.

Bug: 10891994
Change-Id: Iaa291fb9a9cd6039fb4d347309ce3a37aa64392a
2013-09-23 14:08:36 -07:00
Martin Hibdon aad690f699 Improve display of attachments in pop
b/10714298
This is related to this CL in UnifiedEmail
https://googleplex-android-review.git.corp.google.com/#/c/363626/1

Change-Id: Idea2827791ed52e7558b11aaea07b1f3f1764db5
2013-09-20 17:39:05 -07:00
Scott Kennedy bba11cdec9 Merge "Hierarchical folders in conversation list" into jb-ub-mail-ur10 2013-09-20 22:59:28 +00:00
Scott Kennedy fc5aae98e7 Hierarchical folders in conversation list
Use something similar to the sectioned inbox teaser.

This change allows displaying sender snippets in the teaser.

Bug: 9604590
Change-Id: Ib27f002ab8cbd2315d95d46eeb1735aa6b594db5
2013-09-20 17:46:27 -04:00
Tony Mantler ef0c53e15f Fake syncing while we're waiting for the sync to start
b/10695945

Change-Id: I6a32c45facaa0c2c888726e2276d07b7c5e46689
2013-09-19 12:19:02 -07:00
Tony Mantler 04dbb647ff Update mailbox status according to current sync status
b/9177086

Change-Id: I24a7d26b7d7e5ee68ede003e823c1b80abaf56d3
2013-09-18 15:20:59 -07:00
Tony Mantler 2c3328bfd7 Don't return a null cursor from queries to uimessages
b/10807214

Change-Id: Ia49dae8bd50773097bb1082c2bc5cf264a76ce55
2013-09-18 10:53:58 -07:00
Tony Mantler 106970b83e Merge "Notify when message changes (mostly for saving drafts)" into jb-ub-mail-ur10 2013-09-17 01:34:06 +00:00
Tony Mantler c637bff198 Notify when message changes (mostly for saving drafts)
b/10785769

Change-Id: I1ad8e0583ddaa9fa4fcc45906745980f103ec1fa
2013-09-16 16:15:32 -07:00
Yu Ping Hu d672b0eb2b Merge "Fix MessageStateChange to include mailbox id." into jb-ub-mail-ur10 2013-09-16 22:56:11 +00:00
Tony Mantler 7d761f3de3 Fix "Load More" for IMAP search
Also kill some warnings while I'm at it.

b/8607507

Change-Id: I8bfa90e9144d71e964799d6f2dab5e79f48b277f
2013-09-16 11:56:11 -07:00
Yu Ping Hu e984940465 Fix MessageStateChange to include mailbox id.
Also ignore messages without server ids for moves and
state changes.

Also cleanup to match needs of EAS upsync.

Bug: 10678136
Change-Id: Id4d5229b8479e61bd718b707b0d2bc77a9e68046
2013-09-15 15:43:35 -07:00
Alice Yang 17d014dfdf Disable attachment previews
Change-Id: Ic2314f89b813956a6351bed51bfa6881e51605ff
2013-09-13 00:43:55 -07:00
Tony Mantler de8b97c72e Postpone initialization of notification URIs until the EMAIL_PACKAGE_NAME is known
b/10693908

Change-Id: Ia232dda55e03e02db24040b9d17c383addaff0b0
2013-09-11 11:48:38 -07:00
Tony Mantler 2bae64df29 Merge "Notify combined account when individual accounts change" into jb-ub-mail-ur10 2013-09-11 16:21:34 +00:00
Tony Mantler fc906340f9 Notify combined account when individual accounts change
b/10610684

Change-Id: I675a5b2dfd9ccdb412f2746f5785c8f1141f6a76
2013-09-10 16:44:13 -07:00
Tony Mantler 9e9caaee7c Reorder db update/notify and clean up warnings in EmailProvider
Change-Id: I6c65c18ea19bd1afd956b455ac296a4c2d402662
2013-09-10 16:20:31 -07:00
Tony Mantler 2fb5d2f9dd Don't spam the log with null columns.
My bad.

Change-Id: Ia9bcf2b09f905e3f720814b50453df59d5341038
2013-09-10 11:38:34 -07:00
Yu Ping Hu ca79aba675 Add the MessageMove & MessageStateChange tables.
We need to track changes that need to be unsynced. Because
Exchange handles moves differently from other changes, we
create two different tables. The tables are structured as
change logs to better handle error cases.

Change-Id: I4df90c75f36707fa117aed9718508426e60e0749
2013-09-09 15:47:26 -07:00
Tony Mantler 582bc439ea Tidy warnings
Change-Id: I08517af26c27a85fddabccf15dd1a50316df5b5c
2013-09-09 09:52:54 -07:00
Tony Mantler 33bc3df32b Always mark messages as seen when we return to the folder list
b/10533884

Change-Id: If1e0774b70a379884cc435fab9965d39531efb58
2013-09-05 14:10:56 -07:00
Scott Kennedy e743a06ddf Allow going back to search results
If you went from search results to conversation view, then hit the
back button, we were taking you out of search results to the inbox,
because we didn't know you had search results.

Now, we're tracking this (through the use of a folder type), so we
take you where you should go.

Bug: 10591438
Change-Id: I12ad81323fe3e1f199d9dd06a1a4e18f765b01ee
2013-09-04 14:24:00 -07:00
Andrew Sapperstein 66520b3145 Remove CAN_HOLD_MAIL folder capability.
b/9623931

Change-Id: Ic15860d46a6adf8d313536b68ce8e0fad1d97810
2013-09-03 15:16:59 -07:00
Yu Ping Hu 336e65b6e1 Add the moved messages query.
Change-Id: I6dea8055c5d1a4195b9613f684fbd1f5e8d807fd
2013-08-23 15:50:10 -07:00
Yu Ping Hu 4525565948 Improve synchronization in EmailProvider.
It's possible to have multiple EmailProviders.
Also get rid of references to the multiprocess attribute.

Bug: 10388165
Change-Id: Ic6be363eaee20b3b5deddc7b3054d1a7419483a1
2013-08-20 15:06:06 -07:00
Tony Mantler c0a1a81543 Make EmailProvider URL matcher init threadsafe
Also remove mysterious extra indentation

b/10388165

Change-Id: I9a6f16c58e31653e5c47ff2898f66a44412b8a33
2013-08-20 09:58:17 -07:00
Yu Ping Hu 901faf1bfb Allow deletion from virtual folders.
Bug: 10367404
Change-Id: I869dfc5af7064e2992bbd47c89fd990e2caaa701
2013-08-16 18:30:44 -07:00
Tony Mantler c6953b7755 Reimplement QuickResponse support
b/8622751

Change-Id: Id079efcf34dce15b5f5057f937582c0e198d3d50
2013-08-16 14:08:54 -07:00
Alice Yang 50f0cba92c Merge "Sync disabled tip" into jb-ub-mail-ur10 2013-08-12 05:38:59 +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
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
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 5e5b08dcce Fix icons for unread virtual folder.
Bug: 9594158
Change-Id: I9e00e89fe74c43c99b8cb67e068aa06593c79413
2013-08-05 17:34:08 -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 a5355442a0 Merge "Improve message counting, ah ah ah!" into jb-ub-mail-ur10 2013-08-01 17:30:12 +00:00
Scott Kennedy 9e521deb6b Remove some warnings
Change-Id: Ie5adc71af6b6cec316c5186ac0566c02a4fc1bff
2013-08-01 08:47:51 -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 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
Yu Ping Hu 9a1f00bee4 Change deleteAccountPIMData to take emailAddress, not id.
By the time the remote call actually runs, the account
may be deleted from the DB, so the account id is likely
useless.

Bug: 9021105
Change-Id: If28b4b8c4b5c52be35c6ff68b326c4ea28d7f7b4
2013-07-19 18:42:43 -07:00
Scott Kennedy 281c6365fb Add a new FolderUri
This will allow us to add query parameters such that Uris will still
appear to be equal, regardless of differences in the parameters.

Bug: 9780067
Change-Id: I483d009fe3681ec3d4323b3ca95dff8ca9f4ffde
2013-07-16 12:12:23 -07:00
Paul Westbrook ccf730fbe5 Migrate "show sender image" to UnifiedEmail
Bug: 9497358
Change-Id: Iefe39052fb7d53de02535ef98b45c66f1f918209
2013-07-15 18:17:10 -07:00
Paul Westbrook 765fa9e27e Remove STOPSHIP logging
Bug: 8132946
Change-Id: I1f14a75c4dd334c4ae04cb0d79409cd072f2be08
2013-07-15 12:03:25 -07:00
Yu Ping Hu 070569b46c Merge "Remove the folder structure daily sync for push accounts." into jb-ub-mail-ur10 2013-07-15 17:54:45 +00:00
Yu Ping Hu 05cf8a1c1f Remove the folder structure daily sync for push accounts.
Turns out that you don't need it -- Exchange has a way to
tell the client when folder changes occur.

Change-Id: If8089d9fe55e7ece407acf2f0dae977dced522b4
2013-07-15 09:29:05 -07:00
Paul Westbrook b2c7bcff78 Set the correct account uri to message
Bug: 9595801
Change-Id: Ie3a92c2194caf77ef6f3286e9dcb43684a0b32f4
2013-07-12 18:15:46 -07:00
Paul Westbrook dbb8b75a4b Fix feedback from Email settings
Bug: 9428466
Change-Id: I6816976b858a6a15da7d643320983208287a463a
2013-07-11 13:13:11 -07:00
Vikram Aggarwal 50f645e019 Parent folder as a URI
Email populates the URI correctly

Bug: 9694857 Populate folder.parent correctly in the provider

Change-Id: Ia509e1dbb2805a752805ba443527c3013715db24
2013-07-03 15:56:58 -07:00
Scott Kennedy 229c070b0b Change the concept of a default account
The user no longer has control over this. Now, the "default" account
(which is only used for prepopulating the name of new accounts is
either the last used account (to be defined), or the first account in
the database.

This removes a setting, and simplifies a lot of code.

We may also want to auto-select the default account when entering the
compose screen from the combined view, but we do not currently have
an easy way to do that.

Bug: 7442992
Change-Id: Iff5bb36d8cbd327334211b670fa4851cbda6b9a0
2013-06-27 10:22:22 -07:00
Andrew Sapperstein cdee4b0c11 Use resource strings for system folders.
Fixes b/9193813. Previously we returned
a value from the database in all cases.
This meant that system folders were not
translated.

Change-Id: Ife568651886bfb6de76221b8bc5d013dac8fa21a
2013-06-26 18:20:10 -07:00
Scott Kennedy 1b8e0fa23f Clean up a bunch of warnings
Bug: 9565838
Change-Id: I5e95562bbf463f057cbcc4a9884427a774473b45
2013-06-25 15:34:32 -07:00
Andrew Sapperstein 478417a794 Support eml attachments in email.
Change-Id: I76274540d00a292d5a8f777d75d8e9f7b2ef3a51
2013-06-21 11:38:13 -07:00
Yu Ping Hu a54ee609cd Convert Mailbox syncInterval column to boolean.
We are no longer doing per-mailbox sync intervals; instead,
mailboxes opt in to syncing, and the account sync interval
controls what happens.

Change-Id: I8ae32ea25079abbb63bb6a6a282bf5c06de73fca
2013-06-20 18:38:48 -07:00
Yu Ping Hu 6f2beeb59a Add "account only" periodic sync for push accounts.
EAS push only gets changes to the contents of collections,
but not for changes to accounts or folder structure. This
adds a new sync type to fetch only accounts, and adds a
periodic sync of this type for push accounts.

Change-Id: I1e9337252dbb5e53db3f7c5953e089de2c69d18c
2013-06-20 15:46:29 -07:00
Mark Wei 8f474dc02f Fix IMAP attachments REDOWNLOADING.
Previously, if you clicked Download again, you will never be able to view that
attachment again.

Change-Id: Ie944becaf8c89a1a27b8625af4795550e9213f5e
2013-06-19 17:35:37 -07:00
Yu Ping Hu 70500d2253 Return null instead of crashing when querying a bad folder.
Bug: 9250557
Change-Id: Ic0074fa1f6db53a7495c7de48a8f42158a0ea1d9
2013-06-18 18:13:45 -07:00
Yu Ping Hu aa0ca16a27 Remove references to account mailbox.
Exchange implementation no longer uses them.

Change-Id: I221a914f2428c0c7989f79392ca82f7a8f4b1c52
2013-06-17 19:51:47 -07:00
Scott Kennedy 1079b6e962 Move to Inbox
Add a new Account setting field: Uri moveToInbox
This contains the Uri to use for the "move to inbox" action, which
may differ from defaultInbox.

There is no Move to Inbox in Email right now.

Bug: 9256654
Change-Id: I7c81c8115eda83123a09a9b7da7adf97a3c79964
2013-06-11 19:56:44 -07:00
Paul Westbrook 38f22dbf08 Use "show pictures" code from UnifiedEmail
Bug: 9320770
Change-Id: I701a93e2f09b8405a2c4bc56f7793f5abadbcd1e
2013-06-07 18:09:57 -07:00
Paul Westbrook 555bd3c0b7 Don't show search folder
In folder lists, don't show the search folder

Bug: 9227357
Change-Id: Ic0b8a39929f6d2528f445d3746c4eb1915275593
2013-06-06 11:06:38 -07:00
Scott Kennedy 4c47dadf18 Merge "Unify LogTag" into jb-ub-mail-ur10 2013-06-06 18:03:53 +00:00
Paul Westbrook c1d56928b2 Add a limit to the Conversation query
Bug: 9294348
Change-Id: Ifedfe657f205adb1c8a12382b908f4b3b4346500
2013-06-06 10:08:22 -07:00
Scott Kennedy 560bfadc31 Unify LogTag
There is now only one LogTag class. The static initializer of
GmailApplication (existing) and EmailApplication (new) will now set
the log tag to "Gmail" and "Email", respectively. Up until that code
is run, it will be "UnifiedEmail".

"setprop log.tag.Gmail VERBOSE" (or .Email) will trigger all logs to
be printed as long as they go through LogUtils, regardless of what tag
is used by that individual log. This lets us still turn on logging
everywhere in one command, but also lets us use more descriptive tags
(like the class name).

And since we no longer have three com.android.mail.utils.LogTag
classes, builds will be much easier.

Also, we now use LogUtils everywhere.

Change-Id: I55f1c7a66ce50ead54877a13e40256422a56dc39
2013-06-05 20:06:15 -07:00
Paul Westbrook 9d5ed9e7a8 Added logging, and switch to AsyncTask
Bug: 9111546

Change-Id: I287b07346bb1729c7a1afadbc0c94a0d37df92f8
2013-05-29 20:17:17 -07:00
Scott Kennedy ddca2a0dcb Show unread count when virtual folder is selected
We were not populating the unread count for virtual folders in one of
the two code paths, which resulted in the count disappearing from
the folder list whenever that folder was selected.

By moving the count code into getVirtualMailboxRow(), it will always
be called, so the count will always show up.

Change-Id: Ibb947ec6ed761babbcf162dbab38f44a6150d5e3
2013-05-28 14:59:22 -07:00
Andrew Sapperstein f3618c2320 Return raw folder in respond().
To get the name of the folder, we need
the conversation cursor's respond method
to return a Folder object. Now it does.

Also refactored a getFolder method in
WidgetProvider to be in EmailProvider so
anyone can use it.

Change-Id: I55ee180955ff4f4be7012ed6b5dda596e8e9d236
2013-05-23 11:55:43 -07:00
Scott Kennedy d8302b01fa Ensure notifications get cancelled when necessary
There were a few places calling the old notification code to cancel
notifications. These calls were completely unnecessary.

Also, when an account is removed, we now clear all notifications that
may exist for that account.

Bug: 7935576
Change-Id: I58f7e194c3f9a928e932b3b1b87475e7d3653b6a
2013-05-22 18:36:07 -07:00
Mark Wei 29dc837d80 Fix flashing conversation list reloads.
The MergeCursor was not setting the notification uri and observers correctly.

Bug: 9051928
Change-Id: I920cd836aeb6fe550bf05a7e21bc4378ef9772a3
2013-05-21 12:49:25 -07:00
Andrew Sapperstein 53836e572e Enable "move to" from trash.
Fixes b/8986915. Forgot to set a flag in the
FolderCapabilities.

Change-Id: I202e46d89fe5705e3ddd05b1fbd0c8cd9f8fae0d
2013-05-16 17:55:42 -07:00
Andrew Sapperstein 5f1dbb7e66 Merge "Using proper Unread icon for unread "folder"." into jb-ub-mail-ur9 2013-05-16 18:55:50 +00:00
Andrew Sapperstein 7e75311926 Using proper Unread icon for unread "folder".
Fixes b/8967972.

Change-Id: I1089fdeac5803fd6f9bed19d1c22d0629814ba87
2013-05-16 11:53:23 -07:00
Yu Ping Hu 67b38031ab Merge "Changes to support cleaving sync out of ExchangeService." into jb-ub-mail-ur9 2013-05-16 18:43:26 +00:00
Yu Ping Hu 7c3f85885c Changes to support cleaving sync out of ExchangeService.
Change-Id: Idbfff4ddc8fca4829228d04816d40a4ab9639382
2013-05-15 15:04:59 -07:00
Andrew Sapperstein fff905416f Show "no messages" when list is empty.
Fixes b/8547230.

Change-Id: I7d9d00c9448f1222d38a1a6406709818b2523ceb
2013-05-15 12:11:42 -07:00
Andrew Sapperstein b8d7d8d31d Fixed label icons when selected.
Fixes b/8599310. Using selector xml drawables
to properly get the right assets for the folder labels.
Also did some renaming/moving cleanup.

Change-Id: I3b5ddc9fb9da239131405880e637fa1df2c99ea6
2013-05-14 14:30:56 -07:00
Yu Ping Hu f55972ecd8 Add more sync status callbacks.
Change-Id: I77e8b122474d5240ad5aaed7556471263a05e6de
2013-05-08 10:42:31 -07:00
Paul Westbrook 968a2fe780 Return full email address in conversation
Bug: 8850702
Bug: 8737081
Change-Id: I7d267e0cca243baf174c6cb61c887538e5e3bb54
2013-05-07 11:00:02 -07:00
Scott Kennedy bed61a78a0 Support the "Reply all" setting
Bug: 8571631
Change-Id: I52c976f7a8247d53908d90569a24d0573dd4508f
2013-05-06 19:58:19 -07:00
Yu Ping Hu 71737836e6 Add call for sync status updates to UI.
Change-Id: Ib91284b423cf88e8feac3b40d13627d26ccc7de7
2013-05-02 18:53:17 -07:00
Yu Ping Hu 5b52817243 Merge "Use system SyncManager for Exchange." into jb-ub-mail-ur9 2013-04-26 18:08:00 +00:00
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
Yu Ping Hu 9e7f5a2a33 Use system SyncManager for Exchange.
Change-Id: I77e4e75c94c532d22a28cf97e6f55f1259b8bdde
2013-04-25 14:03:00 -07:00
Scott Kennedy 643846abbd Settings changes
Bug: 8685202
Change-Id: Ica781557b91e5ed43221f6e28b9d65cbb044ea55
2013-04-23 13:12:31 -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
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 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