• Home
  • History
  • Annotate
  • only in /packages/apps/Email/src/com/android/email/provider/
History log of /packages/apps/Email/src/com/android/email/provider/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
fbc34a7993857a482c448bd3e49b1c84bc3c088e 20-Nov-2013 Tony Mantler <nicoya@google.com> Null check service info

b/11754422

Change-Id: Iae3c87c894eb3d16880768a3b8894e43d75a5878
mailProvider.java
1580fcacc0125e3c6f013821d6890436b97e96c1 07-Nov-2013 Yu Ping Hu <yph@google.com> Merge "Hack to make the Conversation View footer reload when a POP message finishes loading" into jb-ub-mail-ur10
80e9fa84b8061805485452f9d2d38c3c010cc993 07-Nov-2013 Martin Hibdon <mhibdon@google.com> Merge "Update the duplicate message deletion trigger" into jb-ub-mail-ur10
13ff5b86ac9314bbce09ae9e4ec381b6273a497b 06-Nov-2013 Martin Hibdon <mhibdon@google.com> Update the duplicate message deletion trigger

b/11535121
Now we only delete messages with the same serverId and account
if the account is an exchange account.

Change-Id: Ic2ebb465ccdb38724b88daac8ac40771c7a24bed
BHelper.java
d482cbd54b3e4f9ed889bc622069fa4fba4e4416 06-Nov-2013 Martin Hibdon <mhibdon@google.com> Fix attachments in search results

b/11294681
We had some really broken logic about handling search
results.
In IMAP search, we would request, in a single pass,
FLAGS, ENVELOPE, STRUCTURE, and BODY_SANE. BODY_SANE means
the first N bytes of message content, whether it be from
the message text or attachments. This is different from how
sync works: In sync, we get FLAGS and ENVELOPE in one pass,
and in a later pass get STRUCTURE and first body part text
for each message.
If the total size of the message exceeded the maximum limit
for BODY_SANE, then we'd mark the message as partial, which
would cause us to create a dummy attachment in copyMessageToProvider().
This is a weird solution to the problem of POP messages not
being completely loaded, because in POP message body and
attachments can't be requested separately, so the dummy attachment
just signified that we needed to fetch more data.
This system fails completely on IMAP, because just fetching the
rest of the body will not get you the attachments.

But even if that code is disabled, attachments in search results
still didn't work properly. For reasons I don't yet understand,
if we requet both STRUCTURE and BODY_SANE at the same time, either
we don't received the full attachment metadata, or we ignore it, and
only use the attachments whose contents could actually fit in the
limit imposed by BODY_SANE. So attachments that didn't fit,
or didn't completely fit, would either be missing or corrupt
and unretriveable.

So, end result: It's not clear why we were trying to load
BODY_SANE all in one pass, unlike how it works for sync.
In fact, the way sync does it now makes a lot of sense: We
load FLAGS and ENVELOPE data (small) and put the in the DB
immediately so they can be displayed. In the second pass we
load the (potentially large) structure and message body. If this
is the right solution for sync, it's probably the right solution
for search. So now, that's what we do.

There is cleanup I'd like to do post MR1: Some code is duplicated
between sync and search that could be consolidated, but we're in
low risk mode now so I only changed search code.

Change-Id: I11475e290cda04b91f76d38ba952679e8e8964d5
tilities.java
62604b1a4438e655ff9e21c5363fca9ad4700ebb 05-Nov-2013 Tony Mantler <nicoya@google.com> Hack to make the Conversation View footer reload when a POP message finishes loading

Get rid of this later when we stop using dummy attachments for "Load More"

b/11439833

Change-Id: Ia0ea9408fb74b6c305de43eada306c5df4c5fd59
mailProvider.java
294a4248beae466c7aa19ad5b5683d35ed053f7a 01-Nov-2013 Yu Ping Hu <yph@google.com> Merge "Fix off by one error." into jb-ub-mail-ur10
1a6a3fe797d636ff371c6b7d0f8aae7577aff210 01-Nov-2013 Yu Ping Hu <yph@google.com> Fix off by one error.

Bug: 11475318
Change-Id: I046fc66713c54f355a3dc4e6b7b7b288a1450326
BHelper.java
5ed194434f875df551ebcaf673f5b9e8c385d652 31-Oct-2013 Martin Hibdon <mhibdon@google.com> Add logging to see why attachments fail to load

b/11436795
Now, if we ever insert or update an attachment to have
a blank location, we'll log a warning with stack trace.
Also, logging from ADS now uses the same log tag as everything
else, so we'll be able to see it without needing to turn
on some funny log tag.

Change-Id: Ic566cd87e8893128d074b897d7594a01ae12bc8c
mailProvider.java
5181cd6d4a60ed0b7dbed022484d299a3e91f0da 30-Oct-2013 Yu Ping Hu <yph@google.com> Add a provider call to get device friendly name.

For now, it sends the device model name as friendly name, in lieu
of actually having a user-supplied friendly name. This is wrong
for at least two reasons:

1) We need to have an actual user-supplied friendly name, but that's
not easy to find.
2) This really shouldn't be a provider query -- it should be something
the Exchange can know locally (ideally this is a system preference
but that's not currently implemented). This workaround just lets
us have some reasonable value that we can update easily.

Bug: 11161234
Change-Id: If83ad768736de19c9d0e833d1f86a6ce9daf5039
mailProvider.java
3e8e59798b718e034da8c250e706e6429c41c2a5 30-Oct-2013 Alon Albert <aalbert@google.com> Null Protect Account Info

Bug: 11355850
Change-Id: Idb42769b3009787efb4edfe2ffbd65171cd8d8d8
ccountReconciler.java
ae46818a1925cc22fe20ee26ffee8779561a903b 29-Oct-2013 Alon Albert <aalbert@google.com> Disable Move Actions for POP3 Folders

Bug: 11311812
Change-Id: I5813281cca76b9b4a373b5b40dbbd1909800f951
mailProvider.java
7b7d7d5cb57c9f0e589b686511eabf3c73f96f00 25-Oct-2013 Yu Ping Hu <yph@google.com> Fix DB upgrade code.

Bug: 11294681
Change-Id: I7333aabbdb9e45154d83386b85398e6d108e5bf2
BHelper.java
66f85c878cebdf2683ae6181086a4d01e769c4e8 25-Oct-2013 Yu Ping Hu <yph@google.com> Merge "Add an additional mailbox key column to message table" into jb-ub-mail-ur10
4b73385ecbdae7857331a2a0b6f71c18ccd94b97 25-Oct-2013 Yu Ping Hu <yph@google.com> Merge "Prevent a NPE in ImapService search handling" into jb-ub-mail-ur10
7dad461e9e0c17bc909da2afbd8023cf7059d931 23-Oct-2013 Martin Hibdon <mhibdon@google.com> Prevent a NPE in ImapService search handling

b/11339972

Change-Id: Ief34e6e1fd59d029847dc8525a34f20ea9de26b1
mailProvider.java
c86fbb5bcbff72102f87747d94948f0749402229 23-Oct-2013 Martin Hibdon <mhibdon@google.com> Add an additional mailbox key column to message table

b/11294681
The problem is that when we try to open an attachment for a
message in search results, it fails. The reason is that part of
loading the attachment, we need to open the remote folder the
message is in. For search results, the message's mailboxKey is
the special fake "search_results" folder, which doesn't actually
exist on the server.
For this change, I've added a new column called "mainMailboxKey".
For search results, this column will be populated with the real
mailbox the message is in. It will be blank for other messages.

This is a quick and low risk fix for this bug, but it's kind
of awkward. We would prefer to do one or both of the following
some time after MR1.

1. Make the "search_results" folder be a virtual folder, the same
way that unread, starred, and other virtual folders are. For these,
there is actually no mailbox row in the database, just some
queries that check various flags in the messages and behave
like folders in the UI. The messages actually still reside in the
real folders.
2. Remove the requirement to open the folder at all to load the
attachment.

Change-Id: I825ab846f78bf8b041a5d1d579260dc5d7b4c522
BHelper.java
4cece307c4a7873bde2396d79121b53b48ca5ec0 23-Oct-2013 Tony Mantler <nicoya@google.com> Restore sender snippet for nested folder teaser.

It's a bit ugly, but it's much better than firing up a new loader for each subfolder.

b/11288044

Change-Id: Ia568f82ccd615ee950944d411c30f9470a55aea9
mailProvider.java
3cc5e68bd2fdb42ae186498c28ed4220ef755caf 22-Oct-2013 Justin Ho <justinho@google.com> Merge "Change trigger to allow duplicate messages in search folders" into jb-ub-mail-ur10
ac40b8648504ba5e4e2f8ad44ec2e5063a054cb3 22-Oct-2013 Martin Hibdon <mhibdon@google.com> Change trigger to allow duplicate messages in search folders

b/11294681
b/11325976
The problem is that when we get a message as part of a search
result, we'll end up deleting that message from the inbox (or
whatever folder it's currently in). This is because there is
a trigger that deletes messages if a new message is inserted
that has the same serverId and account.

Now, messages with duplicate serverId/account combinations are
allowed if one of the messages is in a SEARCH type folder.
Also, make a change so that when a message comes down in
a search result, we do also copy it into the primary mailbox
that message resides in, we only add it to the SEARCH folder.
Prior to this there was some code that intended to put
the search result message into the regular mailbox it's supposed
to be in, so that we'd have correct state in that message.
Unfortunately, there are several problems with this:
1. The code didn't work, it would make a copy in the regular
folder, and then unconditionally move it to the search folder.
2. If we leave this code in place, putting the message
temporarily into the regular folder still activates the duplicate
message deletion trigger, wiping out the original copy, even with
the update to the trigger.
3. It's unclear that it's even desirable to load the search
result message into the regular folder. It could be a very old
message that would not have been synced before, leaving a large
gap in your inbox, which is confusing and could interfere with
IMAP syncing.

Change-Id: I34671a3b677ab42a3efd0d170a6ebd9246ec493d
BHelper.java
b8ef7da6340b3ce3638e43335a359bd2ca4e521f 22-Oct-2013 Yu Ping Hu <yph@google.com> Merge "Treat updates into non-existent body rows as inserts." into jb-ub-mail-ur10
d0b81a0d062f9bad15c9d9ba104b6cdf8590e5fe 21-Oct-2013 Yu Ping Hu <yph@google.com> Treat updates into non-existent body rows as inserts.

Bug: 11245727
Change-Id: I648b0267e9149f3f431ce01be9789087f73edab1
mailProvider.java
1fb5fa6981c66d2eca19187e738eb1f77fb464ec 22-Oct-2013 Yu Ping Hu <yph@google.com> Merge "Populate real name in From: field" into jb-ub-mail-ur10
7b28bb95a34556c5a84e128ba206bff64288d741 21-Oct-2013 Yu Ping Hu <yph@google.com> Merge "Update the folder sync status while searching in IMAP" into jb-ub-mail-ur10
632ee24d48f308c855ddec8f013b674e5ade67e2 18-Oct-2013 Tony Mantler <nicoya@google.com> Populate real name in From: field

b/11246653

Change-Id: I8629ba655b99629f7b14f857acb67cb8453ddb8b
mailProvider.java
a5a28ffb63785eefe8602174316d9ba6233ac428 18-Oct-2013 Yu Ping Hu <yph@google.com> Do not require RPC for getCapabilities.

Bug: 11241892
Change-Id: I3da136c9035414c821ee2038da01134c551bb9dd
mailProvider.java
8c989772dfba08438650575f1ac2bb952bd56158 18-Oct-2013 Alon Albert <aalbert@google.com> 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
mailProvider.java
efreshStatusMonitor.java
af52f20930b2c0f24eeecc10be903712802d0965 18-Oct-2013 Tony Mantler <nicoya@google.com> Update the folder sync status while searching in IMAP

b/7538620

Change-Id: I7bb0c706fd63b1fe7d20dc0f186934e0dcac2f06
mailProvider.java
85d2190552d05dbc06518bdc21674c6aabeb583b 15-Oct-2013 Martin Hibdon <mhibdon@google.com> Clear all "drafts" related flags from email when sending

b/11224331

Change-Id: I1df8ea3e0e24b050cd391dea454124e06988bf7d
mailProvider.java
1004d74f2c2c8085d793bf8f0118d80fe934e830 14-Oct-2013 Yu Ping Hu <yph@google.com> 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
mailProvider.java
ac93f838b8673437e416d1ab4d6259457e10ef70 13-Oct-2013 Yu Ping Hu <yph@google.com> Only fake the footer for mailboxes that sync from server.

Bug: 11193271
Change-Id: I7bc8903889ae4f91065cdb4696128a4eed62844f
mailProvider.java
9a342b31472536b89f55b1e6ae2e6f868ba1064d 11-Oct-2013 Alon Albert <aalbert@google.com> Cleanup Logs

Bug: 11149133
Change-Id: I764e2e3a8c37769d2e788688cf50789d0f22e9d3
mailProvider.java
e7f61f403c65f08ff57f45aeb22f71a31cef0ce7 12-Oct-2013 Martin Hibdon <mhibdon@google.com> Merge "Always fix parent keys on startup of email" into jb-ub-mail-ur10
f7078466c3a5ac9eefc388787aa5fcf187dfe4ee 11-Oct-2013 Martin Hibdon <mhibdon@google.com> 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
mailProvider.java
03dc3f22d151d0cddc6487429786a708de813d67 11-Oct-2013 Tony Mantler <nicoya@google.com> Combined account name is locale-dependent. Notify on locale changes

b/10784192

Change-Id: I2a9783f19709ff5cf0ab5a4a14ab1ad60b71d821
mailProvider.java
ed4e1c503942eb8e809782d762be519b70d6f89a 11-Oct-2013 Martin Hibdon <mhibdon@google.com> Merge "Disable sync settings controls for drafts folders" into jb-ub-mail-ur10
cb30243fe1fa3a2f7540495cbeea470e77b539be 10-Oct-2013 Martin Hibdon <mhibdon@google.com> Disable sync settings controls for drafts folders

b/11158759
Make the default sync setting for drafts folders 0
(never automatically sync), and disable the settings
control so that it cannot be changed.
Also add a db upgrade step to set any existing drafts
folders to not sync, and clean up any Exchange synced
draft messages.

Change-Id: I256bde231d722089ef2a623482f570a20eccf1de
BHelper.java
11fb2d161ecbde53ca395ef65c60c79adf273bb8 10-Oct-2013 Tony Mantler <nicoya@google.com> Merge "Use the correct widget provider class" into jb-ub-mail-ur10
8117953140719217d96c4e2c77704db6ac9c16aa 10-Oct-2013 Tony Mantler <nicoya@google.com> Merge "Add null check before passing from address to Rfc822Tokenizer" into jb-ub-mail-ur10
03f56f2c1a052db3abff8ad624ecf8eae16ceea3 10-Oct-2013 Martin Hibdon <mhibdon@google.com> Merge "Allow multiple mailboxes to be synced in a single request" into jb-ub-mail-ur10
22f0c87d5fce1a3d60913e78061d232871702c8c 10-Oct-2013 Tony Mantler <nicoya@google.com> Add null check before passing from address to Rfc822Tokenizer

b/11167816

Change-Id: I13671d953b067ecc5becf160eab52be30e4f1354
mailProvider.java
56aba8d8436b083bfc1169dd8b988161d537f7e5 09-Oct-2013 Martin Hibdon <mhibdon@google.com> Allow multiple mailboxes to be synced in a single request

b/11103878

Change-Id: Ic6abf51457fe94e89fe51b461da4371f50e0fe86
mailProvider.java
5da03b90e2f313cebdb802cd3795db20b9a970ea 10-Oct-2013 Tony Mantler <nicoya@google.com> Merge "Temporary workaround for ConversationCursor missing updates" into jb-ub-mail-ur10
e12b22148fec2d8ec3ee2504b43cf8b0d9a780e7 08-Oct-2013 Tony Mantler <nicoya@google.com> 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
mailProvider.java
37aa460ef7ee4d996e04b24a181846879fb6b601 09-Oct-2013 Tony Mantler <nicoya@google.com> Use the correct widget provider class

b/11043157

Change-Id: Icb4e6408535ca4cc055581ca7e8bd74c83aeecdf
mailProvider.java
4b32e54309746fa053c5df9beed75174097dc672 09-Oct-2013 Tony Mantler <nicoya@google.com> Merge "Update widgets on provider instantiation." into jb-ub-mail-ur10
73379a27290720c05e8f60dfdfff1491f3790eb6 09-Oct-2013 Tony Mantler <nicoya@google.com> Parse "From" addresses when constructing ConversationInfo

Fixes sender image tiles

b/11120430

Change-Id: Ie53e2a01cfffd70318fad7cd1cbc2565f1bbb87b
mailProvider.java
02b9ac1b95947a2dc66bc0f6c770a1cb3ffdbbc9 08-Oct-2013 Tony Mantler <nicoya@google.com> Update widgets on provider instantiation.

b/11043157

Change-Id: I439a67447875b6f9ba818b2c2cb95c83db034896
mailProvider.java
805bc397bd9db8ef42c7aa88b9913565ac908732 08-Oct-2013 Tony Mantler <nicoya@google.com> Merge "Populate the snippet in ConversationInfo" into jb-ub-mail-ur10
b62486b019ec30c81145e34385e015fc31c5c06c 08-Oct-2013 Tony Mantler <nicoya@google.com> Populate the snippet in ConversationInfo

b/11111973

Change-Id: I8a4e824ad4c708fba8013221279a0b1ac6df7a8c
mailProvider.java
5d47ee0f87208ab22c317abc87f615b6254cc852 07-Oct-2013 Tony Mantler <nicoya@google.com> Store the total count of search results in the database only

b/11027351

Change-Id: Ibb63bd7b80ff0af653cca4424dd2d17168262710
mailProvider.java
12650115857424428282d7e0fad195397e51128d 04-Oct-2013 Yu Ping Hu <yph@google.com> Merge "Don't push things that haven't performed initial sync." into jb-ub-mail-ur10
3f24a9e2c76af8b772953c8a026d9886321f0044 04-Oct-2013 Yu Ping Hu <yph@google.com> Don't push things that haven't performed initial sync.

Also remove the ping kick.

Bug: 11081520
Change-Id: I21d5050886b2c352771013f4f3e5b9282482d508
mailProvider.java
d946f8319a34c922ac720d5cf9cc95540300ccd5 04-Oct-2013 Tony Mantler <nicoya@google.com> Merge "Reply-all setting is modified at runtime, don't cache it in a static map" into jb-ub-mail-ur10
7c24f48a37c465fff393c546198ee83c556961ef 04-Oct-2013 Tony Mantler <nicoya@google.com> Merge "Remove notifications while we still know what type of account this is" into jb-ub-mail-ur10
b424ffa65b809094e6b9109e2131b718ec9eae76 04-Oct-2013 Tony Mantler <nicoya@google.com> Reply-all setting is modified at runtime, don't cache it in a static map

b/11066041

Change-Id: I4e14c3add3fe2503e8369dbb7ef976e110ef2fee
mailProvider.java
ac1d3249fbb50714ad1bee5aec41968574befd90 04-Oct-2013 Tony Mantler <nicoya@google.com> Remove notifications while we still know what type of account this is

Also add null check just in case

b/11070468

Change-Id: I187b9b084512a2b994f4a0a3b750ade5eee50624
ccountReconciler.java
fc8a57bb29087a4c582a3fdb0ca338d9fdfe1f02 04-Oct-2013 Martin Hibdon <mhibdon@google.com> 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
mailProvider.java
921c04d2ac5df091fb3c5cfa823e6dc2fc6cdf5a 02-Oct-2013 Martin Hibdon <mhibdon@google.com> Add some logging

Change-Id: Ib26ffad0bb6841361b8ee7be4ee2a6255d509ae2
mailProvider.java
768c6b86db854569a687f68c9b8f232e9ebf1573 01-Oct-2013 Tony Mantler <nicoya@google.com> Don't show "No messages" when starting a search on Exchange

Also clean up some finals

b/11027351

Change-Id: Ib76cc90b04acb531d53b2d6bdc4e3b0ad911f72c
mailProvider.java
53ecec0ad43866b00d28908ba19e67561674591c 01-Oct-2013 Tony Mantler <nicoya@google.com> Merge "Only return messages that are unread and unseen for an unseen query" into jb-ub-mail-ur10
d4a06f409d08a61bd387ab2e2f37eca519f10010 01-Oct-2013 Tony Mantler <nicoya@google.com> Only return messages that are unread and unseen for an unseen query

b/10970849

Change-Id: I23d40fc39987fab35521f1dd75f4631f1fae16d5
mailProvider.java
2cf965b85fe4daa1046d7d04137c3b24d1e2800b 01-Oct-2013 Martin Hibdon <mhibdon@google.com> Merge "Make draft attachments work correctly" into jb-ub-mail-ur10
f484751e060620ddf4e2dfe38f2b9f46f472ac9d 01-Oct-2013 Martin Hibdon <mhibdon@google.com> 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
mailProvider.java
b38c7d1c37bba593b7aaba44a9ffccc8cf3a4108 30-Sep-2013 Tony Mantler <nicoya@google.com> Avoid ANR due to looking up account info on the main thread

b/10987175

Change-Id: I7344e2717ab1b9557385eb6eb9e7962461b10c9d
mailProvider.java
125cbdf9d4dbc30127d99b56c9c025fab70aa358 30-Sep-2013 Yu Ping Hu <yph@google.com> Make certain we don't use a null account.

Bug: 10965484
Change-Id: I525d32fcbde0fbbe0bec467814cf4f09a3de38fe
mailProvider.java
85ad73aecdec51dcf19ed22ac13af88b8f87f0cf 30-Sep-2013 Yu Ping Hu <yph@google.com> Pass the correct id to getAccountManagerAccount.

Bug: 10965484
Change-Id: I8e1aab4810da4673313b10231592283736a92ef9
mailProvider.java
69418d04606419fca80a0c368d650c4bedffb656 27-Sep-2013 Yu Ping Hu <yph@google.com> Kick the push once an hour, in case it fails.

Bug: 10954795
Change-Id: If6325c04b2011fb476f20f1419afaee13a786d3c
mailProvider.java
5e8d8c1f80951fdb49e64bc123283e7914af07d1 27-Sep-2013 Yu Ping Hu <yph@google.com> Modify ping on settings changes.

Bug: 9020744
Change-Id: I0dfa2b8e9d999072b8201da61916372ca1a5b08b
mailProvider.java
6580e500318a3ee421516364b4a9314403174734 26-Sep-2013 Yu Ping Hu <yph@google.com> Fix a bad log message.

Bug: 10950496
Change-Id: I06c5e20eea9090bbfc6d0c12d8ce8e31d47f52a2
idgetProvider.java
feb2c387b0332a28f1dc5e82205ed087277dff92 26-Sep-2013 Alon Albert <aalbert@google.com> 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
mailProvider.java
bc5653471c11d8d2678c22bda8b6ae33e65650a1 26-Sep-2013 Tony Mantler <nicoya@google.com> Merge "Separate the account name from the account manager's account name" into jb-ub-mail-ur10
1082ed94305de70f40320b0fd181d2f0328b8cfe 25-Sep-2013 Tony Mantler <nicoya@google.com> Merge "Match against both account name and type when reconciling accounts" into jb-ub-mail-ur10
ed0ee50a12fdd36b813831da7a60774c3965b9c1 25-Sep-2013 Tony Mantler <nicoya@google.com> Match against both account name and type when reconciling accounts

b/10210901

Change-Id: Ice60ab64a2f7287be9ee639e5777f85bda4bd390
ccountReconciler.java
d17359c2b4e39baa426c7bce09f1a5d293378c77 25-Sep-2013 Tony Mantler <nicoya@google.com> Notify on message Uri when a message is deleted.

b/10919322

Change-Id: I0b39bcbc2e03c45fc0c161211c7cdacd97791c15
mailProvider.java
7349fbff64328100cb5bd878f4d400ccc611ec80 25-Sep-2013 Tony Mantler <nicoya@google.com> Separate the account name from the account manager's account name

b/10894178

Change-Id: Ie64ae00e4fd382fb03fc7c87ea91c7aff8fc8f43
mailProvider.java
bab16f9161edb940f8a612846a2ff4ac50ffc58d 24-Sep-2013 Tony Mantler <nicoya@google.com> Merge "Virtual folders are valid folders, don't kick back to the inbox when we're viewing them" into jb-ub-mail-ur10
96192ef342f182deadcfe8a245306f7f155e4a79 20-Sep-2013 Tony Mantler <nicoya@google.com> Virtual folders are valid folders, don't kick back to the inbox when we're viewing them

b/10847930

Change-Id: I182fee7d6caa5c4a67911c0c8e969d8668ac87d0
mailProvider.java
olderPickerActivity.java
4f32213ebebb59d5316e0dd4ca9d78dc1c170879 21-Sep-2013 Tony Mantler <nicoya@google.com> Missing part of I27ad5ee75df669315e03c9ccc299bfc8eacbb53b

Change-Id: I207898b4f6f9148758d4ee1c6a82cbb387570240
olderPickerDialog.java
e54d6957dbbd14d35a1858cb02959fd8f9bb0d37 24-Sep-2013 Tony Mantler <nicoya@google.com> Clear out erroneous sync values for IMAP mailboxes on upgrade

b/10695945

Change-Id: Ic68c9ef0baa25eae40631184cf0322ff26c9e5ab
BHelper.java
1290f376c09749988d71e1a00179fe249a88be3b 24-Sep-2013 Martin Hibdon <mhibdon@google.com> Merge "Improve display of attachments in pop" into jb-ub-mail-ur10
0203a06c87e389f0d3af19bc26f61d0cf846226a 23-Sep-2013 Scott Kennedy <skennedy@google.com> 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
mailProvider.java
aad690f699f61793facecc950d3d060baa62fd45 21-Sep-2013 Martin Hibdon <mhibdon@google.com> 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
mailProvider.java
tilities.java
bba11cdec97299417dc5686465ed6beeaf4d1d47 21-Sep-2013 Scott Kennedy <skennedy@google.com> Merge "Hierarchical folders in conversation list" into jb-ub-mail-ur10
fc5aae98e7a440ef9ab015efd4934123c2c15e76 10-Sep-2013 Scott Kennedy <skennedy@google.com> 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
mailProvider.java
ef0c53e15f509ddb132db716177282b9182f035b 19-Sep-2013 Tony Mantler <nicoya@google.com> Fake syncing while we're waiting for the sync to start

b/10695945

Change-Id: I6a32c45facaa0c2c888726e2276d07b7c5e46689
mailProvider.java
04dbb647ffaca5a230a5f76b144e27cd9d9f0d8b 19-Sep-2013 Tony Mantler <nicoya@google.com> Update mailbox status according to current sync status

b/9177086

Change-Id: I24a7d26b7d7e5ee68ede003e823c1b80abaf56d3
mailProvider.java
75e71b3b9758b689f5204d5da5eb336a2162d382 18-Sep-2013 Tony Mantler <nicoya@google.com> Merge "Don't return a null cursor from queries to uimessages" into jb-ub-mail-ur10
2c3328bfd745142f3365c676527daa853fe445d6 18-Sep-2013 Tony Mantler <nicoya@google.com> Don't return a null cursor from queries to uimessages

b/10807214

Change-Id: Ia49dae8bd50773097bb1082c2bc5cf264a76ce55
mailProvider.java
4265ade29a684543ac5b048dda90c4733c58568a 18-Sep-2013 Tony Mantler <nicoya@google.com> There's no such thing as a wrongly incomplete account

b/9856118

Change-Id: If2d2c50989285a13eb0ae29961733e472e26c978
ccountReconciler.java
e3a4a1b25dd20dfd69793ca953f3299bcf6f0501 17-Sep-2013 Yu Ping Hu <yph@google.com> Remove dupes before syncing new messages.

Bug: 10440557
Change-Id: I4ade38a8bb15cbc22b6c10a5f270274fef6f1fca
BHelper.java
106970b83ecc8cfd26e58c2c441f4cd2d64288d4 17-Sep-2013 Tony Mantler <nicoya@google.com> Merge "Notify when message changes (mostly for saving drafts)" into jb-ub-mail-ur10
c637bff1989e768f1ffe0f898bd803a9c78d0514 17-Sep-2013 Tony Mantler <nicoya@google.com> Notify when message changes (mostly for saving drafts)

b/10785769

Change-Id: I1ad8e0583ddaa9fa4fcc45906745980f103ec1fa
mailProvider.java
d672b0eb2bbba53ecfe2df45b83e3db958a1e31a 17-Sep-2013 Yu Ping Hu <yph@google.com> Merge "Fix MessageStateChange to include mailbox id." into jb-ub-mail-ur10
7d761f3de3b05657363a03c8afe3d4d1114a1b2f 16-Sep-2013 Tony Mantler <nicoya@google.com> Fix "Load More" for IMAP search

Also kill some warnings while I'm at it.

b/8607507

Change-Id: I8bfa90e9144d71e964799d6f2dab5e79f48b277f
mailProvider.java
e9849404652f317c4fb3af822fd6fa9cd23ad881 13-Sep-2013 Yu Ping Hu <yph@google.com> 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
mailProvider.java
17d014dfdf172f3b60bcdb41f1b831fbdc8230d4 13-Sep-2013 Alice Yang <alice@google.com> Disable attachment previews

Change-Id: Ic2314f89b813956a6351bed51bfa6881e51605ff
mailProvider.java
24bb2dabd9dd7d8bd39fed53f312ae6034e373bb 13-Sep-2013 Martin Hibdon <mhibdon@google.com> Kill the process when an account is deleted.

b/10653370
This prevents NPEs if a serviec happens to still be running
when an account is deleted.
This mirrors a similar pattern in the gmail app.

Change-Id: I6fd8ae5ffe41580df0a321ec22535403e3f32eee
ccountReconciler.java
de8b97c72e8d0019d892f70d3d452ada051ed8f3 11-Sep-2013 Tony Mantler <nicoya@google.com> Postpone initialization of notification URIs until the EMAIL_PACKAGE_NAME is known

b/10693908

Change-Id: Ia232dda55e03e02db24040b9d17c383addaff0b0
mailProvider.java
2bae64df29c592928c380813cca0b4cac28804a4 11-Sep-2013 Tony Mantler <nicoya@google.com> Merge "Notify combined account when individual accounts change" into jb-ub-mail-ur10
fc906340f9a3ef0246f4d693f0a2afc15af8cd6c 10-Sep-2013 Tony Mantler <nicoya@google.com> Notify combined account when individual accounts change

b/10610684

Change-Id: I675a5b2dfd9ccdb412f2746f5785c8f1141f6a76
mailProvider.java
9e9caaee7c20c538b00f791e54d5d2744c17c1ef 11-Sep-2013 Tony Mantler <nicoya@google.com> Reorder db update/notify and clean up warnings in EmailProvider

Change-Id: I6c65c18ea19bd1afd956b455ac296a4c2d402662
mailProvider.java
2fb5d2f9dd6a243065602a2970e9f698b0d09190 10-Sep-2013 Tony Mantler <nicoya@google.com> Don't spam the log with null columns.

My bad.

Change-Id: Ia9bcf2b09f905e3f720814b50453df59d5341038
mailProvider.java
ca79aba675d5282b6ba365184f3727b7b24a568f 05-Sep-2013 Yu Ping Hu <yph@google.com> 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
BHelper.java
mailProvider.java
582bc439ea4a7b9a965af50361504b68fc542896 07-Sep-2013 Tony Mantler <nicoya@google.com> Tidy warnings

Change-Id: I08517af26c27a85fddabccf15dd1a50316df5b5c
mailProvider.java
33bc3df32ba08ffd02d3e19c039e7c9db4a42bb0 05-Sep-2013 Tony Mantler <nicoya@google.com> Always mark messages as seen when we return to the folder list

b/10533884

Change-Id: If1e0774b70a379884cc435fab9965d39531efb58
mailProvider.java
e743a06ddf7677706da7450100e19d0f4509a43c 04-Sep-2013 Scott Kennedy <skennedy@google.com> 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
mailProvider.java
66520b31457632c8c313caa7bc11e25fe0815a99 04-Sep-2013 Andrew Sapperstein <asapperstein@google.com> Remove CAN_HOLD_MAIL folder capability.

b/9623931

Change-Id: Ic15860d46a6adf8d313536b68ce8e0fad1d97810
mailProvider.java
336e65b6e1eb92fac8f03b5c39dde19361577cb4 23-Aug-2013 Yu Ping Hu <yph@google.com> Add the moved messages query.

Change-Id: I6dea8055c5d1a4195b9613f684fbd1f5e8d807fd
mailProvider.java
b4d4729fa2fc285ddc7ed31d902b15d8ad0cacca 22-Aug-2013 Martin Hibdon <mhibdon@google.com> Merge "Add PingDuration to the Account table" into jb-ub-mail-ur10
52135c6e8750f19084695cdda78ffe34719c4b6c 21-Aug-2013 Martin Hibdon <mhibdon@google.com> Add PingDuration to the Account table

b/10328857
this is so that we can keep the current ping
duration and restore it on startup.

Change-Id: I7ae11fd21687cb9013222924934154c5ebe1f7e7
BHelper.java
4525565948db8728f5608da21bb9fd95993c6be9 20-Aug-2013 Yu Ping Hu <yph@google.com> 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
mailProvider.java
c0a1a81543d147309876701484f5c5be93bdd203 20-Aug-2013 Tony Mantler <nicoya@google.com> Make EmailProvider URL matcher init threadsafe

Also remove mysterious extra indentation

b/10388165

Change-Id: I9a6f16c58e31653e5c47ff2898f66a44412b8a33
mailProvider.java
901faf1bfb3473b4e40ccd82dab3f3f99eb599bb 17-Aug-2013 Yu Ping Hu <yph@google.com> Allow deletion from virtual folders.

Bug: 10367404
Change-Id: I869dfc5af7064e2992bbd47c89fd990e2caaa701
mailProvider.java
908fac0b247deff27fee44297f892afdfbb086a5 17-Aug-2013 Paul Westbrook <pwestbro@google.com> Fix NPE

Bug: 10292690
Change-Id: I34714a6a07bcaba3d20fdae32ee6b129c74c8a32
ttachmentProvider.java
c6953b77552d4cb71776cf0537dc226029381628 14-Aug-2013 Tony Mantler <nicoya@google.com> Reimplement QuickResponse support

b/8622751

Change-Id: Id079efcf34dce15b5f5057f937582c0e198d3d50
mailProvider.java
50f0cba92ce2c2f45600cfd0e5184df84d3ab370 12-Aug-2013 Alice Yang <alice@google.com> Merge "Sync disabled tip" into jb-ub-mail-ur10
3b758913be54c4d561ce718cb2cd629686f92037 09-Aug-2013 Paul Westbrook <pwestbro@google.com> Merge "Use DatabaseUtils method instead of query()" into jb-ub-mail-ur10
44e16031550929a5e840aa61dcb4246ff1f691d9 11-Jul-2013 yi.jang <yi.jang@lge.com> 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
mailProvider.java
a6745514643f66741229a0cca3927931bdfa47b3 16-May-2013 yi.jang <yi.jang@lge.com> 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
mailProvider.java
d42e14ad722db6eb1a8e6b0696abb6d4a88fac4e 07-Aug-2013 Martin Hibdon <mhibdon@google.com> Merge "Implement two part imap sync" into jb-ub-mail-ur10
c75f5880ab70d9f4938727587696b864bb4ea02a 07-Aug-2013 Martin Hibdon <mhibdon@google.com> 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
BHelper.java
034149b5861ff5a42593f9749ab059f2c4cf4381 07-Aug-2013 Mark Wei <markwei@google.com> Add a setting for attachment previews.

Bug: 10131520
Change-Id: I782b331971272203d1b36a578cf6a149793b10e6
mailProvider.java
f1284d4d550230a4e13247a9513f03a7f3fd2347 07-Aug-2013 Alice Yang <alice@google.com> Sync disabled tip

Bug 9825835

Change-Id: I5fd692c7cd8a03d3b8ea140f2d6e8919bd293904
mailProvider.java
c3ceed68948ef6720ae7b861955b4d341f331643 07-Aug-2013 Yu Ping Hu <yph@google.com> 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
mailProvider.java
6edccbf1f1371157cfa6e503d8353a474aafd2a1 07-Aug-2013 Yu Ping Hu <yph@google.com> Fix capabilities to allow discarding drafts.

Bug: 10098652
Change-Id: Iebceb203cd054a1550f7c1f118841a77429f853a
mailProvider.java
5e5b08dcce1b0f48313fd2f7198c9e910d413eec 06-Aug-2013 Yu Ping Hu <yph@google.com> Fix icons for unread virtual folder.

Bug: 9594158
Change-Id: I9e00e89fe74c43c99b8cb67e068aa06593c79413
mailProvider.java
bcd81d96a40f3d987f4d780f64d339dd7f5ab2ed 02-Aug-2013 Yu Ping Hu <yph@google.com> 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
mailProvider.java
a5355442a0a198739c60c11a0d2fc44928218e0b 01-Aug-2013 Yu Ping Hu <yph@google.com> Merge "Improve message counting, ah ah ah!" into jb-ub-mail-ur10
9e521deb6bb525b33365cc2926cb2d0faa7095e2 01-Aug-2013 Scott Kennedy <skennedy@google.com> Remove some warnings

Change-Id: Ie5adc71af6b6cec316c5186ac0566c02a4fc1bff
mailProvider.java
olderPickerSelectorAdapter.java
5ff368b84573833497764c9d1661cc97717b7094 31-Jul-2013 Yu Ping Hu <yph@google.com> 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
BHelper.java
mailProvider.java
e95b9bb3e4b2f9eeaf47eceb550df79599efc41c 30-Jul-2013 Yu Ping Hu <yph@google.com> Merge "Delete most of IEmailServiceCallback." into jb-ub-mail-ur10
2075c97f608a853923980865b72147a5c8ef71f0 30-Jul-2013 Yu Ping Hu <yph@google.com> Delete most of IEmailServiceCallback.

The old callback mechanism is deprecated, in favor of making
calls on the ContentProvider.

Bug: 9842867

Change-Id: I65f559e593cda24456c4ffb96f785e054626dd0b
mailProvider.java
6dd7bd29e97e7190b01bf6325d131f24c097b560 30-Jul-2013 Paul Westbrook <pwestbro@google.com> 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
mailProvider.java
tilities.java
afe097f318a7eeac9d240d2bedbc5caba7640ea8 26-Jul-2013 Yu Ping Hu <yph@google.com> Simplify account reconciliation.

- Rather than handle by type, do them all at once.
- Simplify when reconciliation happens.

Bug: 9056861

Change-Id: If264678c82c63090246ef8ff857c8e46f6672c85
ccountReconciler.java
b3cb475fd29f827002b9743822b2a99ff85d1b38 24-Jul-2013 Yu Ping Hu <yph@google.com> Fix DB upgrade code to set lookback correctly.

Rather than use null, just force the valid default value.
Also rename SYNC_WINDOW_UNKNOWN to SYNC_WINDOW_ACCOUNT to
better reflect how it's actually used.

Bug: 9989995
Change-Id: I8d0b466fe3bc2e4c651c309d4815cea201058d22
BHelper.java
9a1f00bee4c50c128df320a3795cfc8295d5e011 20-Jul-2013 Yu Ping Hu <yph@google.com> 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
mailProvider.java
281c6365fb95037ca284dd8c910538639e8b3dcb 11-Jul-2013 Scott Kennedy <skennedy@google.com> 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
mailProvider.java
olderPickerActivity.java
idgetProvider.java
ccf730fbe53c3bffb0154d0666e9fcbb5e82f551 16-Jul-2013 Paul Westbrook <pwestbro@google.com> Migrate "show sender image" to UnifiedEmail

Bug: 9497358
Change-Id: Iefe39052fb7d53de02535ef98b45c66f1f918209
mailProvider.java
765fa9e27e93f298c4aafe4cb59ba5bbf1153c38 15-Jul-2013 Paul Westbrook <pwestbro@google.com> Remove STOPSHIP logging

Bug: 8132946
Change-Id: I1f14a75c4dd334c4ae04cb0d79409cd072f2be08
mailProvider.java
070569b46ca095c727934a7f6f55dc905dc21c62 15-Jul-2013 Yu Ping Hu <yph@google.com> Merge "Remove the folder structure daily sync for push accounts." into jb-ub-mail-ur10
05cf8a1c1f9b13aff75ec9e5c300fbf5c7aee27f 12-Jul-2013 Yu Ping Hu <yph@google.com> 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
mailProvider.java
b2c7bcff7813f2cecba5c9c52b69cf5ef2cc9cad 13-Jul-2013 Paul Westbrook <pwestbro@google.com> Set the correct account uri to message

Bug: 9595801
Change-Id: Ie3a92c2194caf77ef6f3286e9dcb43684a0b32f4
mailProvider.java
dbb8b75a4bd201f8472a511ef77ca2ed05bd808b 11-Jul-2013 Paul Westbrook <pwestbro@google.com> Fix feedback from Email settings

Bug: 9428466
Change-Id: I6816976b858a6a15da7d643320983208287a463a
mailProvider.java
50f645e019c3165b14457c0b661c59cd4e6ce375 04-Jul-2013 Vikram Aggarwal <viki@google.com> Parent folder as a URI

Email populates the URI correctly

Bug: 9694857 Populate folder.parent correctly in the provider

Change-Id: Ia509e1dbb2805a752805ba443527c3013715db24
mailProvider.java
229c070b0b177793032ce9249cb77f6ca98e5aa4 27-Jun-2013 Scott Kennedy <skennedy@google.com> 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
mailProvider.java
cdee4b0c11400d766ae826e6c01d234c2769554f 27-Jun-2013 Andrew Sapperstein <asapperstein@google.com> 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
mailProvider.java
idgetProvider.java
1b8e0fa23f6e9957f0b8753dd3f5b95d3f5d98ea 26-Jun-2013 Scott Kennedy <skennedy@google.com> Clean up a bunch of warnings

Bug: 9565838
Change-Id: I5e95562bbf463f057cbcc4a9884427a774473b45
ontentCache.java
mailProvider.java
idgetProvider.java
478417a79440904b8a9c45fd3e4ec84db339a755 21-Jun-2013 Andrew Sapperstein <asapperstein@google.com> Support eml attachments in email.

Change-Id: I76274540d00a292d5a8f777d75d8e9f7b2ef3a51
mailProvider.java
a54ee609cdb79ad3abdda2d7180a29617fa38610 21-Jun-2013 Yu Ping Hu <yph@google.com> 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
BHelper.java
mailProvider.java
6f2beeb59ae75ee26c78d99ded532acd87e1ff97 20-Jun-2013 Yu Ping Hu <yph@google.com> 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
mailProvider.java
8f474dc02f01d7805716422625ef7b50fa0e4aef 20-Jun-2013 Mark Wei <markwei@google.com> Fix IMAP attachments REDOWNLOADING.

Previously, if you clicked Download again, you will never be able to view that
attachment again.

Change-Id: Ie944becaf8c89a1a27b8625af4795550e9213f5e
mailProvider.java
70500d2253732f4e26988659c27d1b4186926c54 19-Jun-2013 Yu Ping Hu <yph@google.com> Return null instead of crashing when querying a bad folder.

Bug: 9250557
Change-Id: Ic0074fa1f6db53a7495c7de48a8f42158a0ea1d9
mailProvider.java
aa0ca16a27e4a56a029e5cdebf96de5723bd84b6 18-Jun-2013 Yu Ping Hu <yph@google.com> Remove references to account mailbox.

Exchange implementation no longer uses them.

Change-Id: I221a914f2428c0c7989f79392ca82f7a8f4b1c52
BHelper.java
mailProvider.java
21b2522d7f6b2bce8fc3382e6e532d4b4df1b140 14-Jun-2013 Yu Ping Hu <yph@google.com> Remove auto sync windows.

Also includes other DB upgrade code.

Bug: 8668336
Bug: 9226612

Change-Id: Id9664fd8cda466ec34862a793e41cbcce78efb4c
BHelper.java
1079b6e9628910e726881233f62808976d5d3be1 12-Jun-2013 Scott Kennedy <skennedy@google.com> 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
mailProvider.java
38f22dbf08664b885b4cf063ea665c02edfb1c32 08-Jun-2013 Paul Westbrook <pwestbro@google.com> Use "show pictures" code from UnifiedEmail

Bug: 9320770
Change-Id: I701a93e2f09b8405a2c4bc56f7793f5abadbcd1e
mailProvider.java
555bd3c0b7132509421ae181fbdb35995819787c 06-Jun-2013 Paul Westbrook <pwestbro@google.com> Don't show search folder

In folder lists, don't show the search folder

Bug: 9227357
Change-Id: Ic0b8a39929f6d2528f445d3746c4eb1915275593
mailProvider.java
4c47dadf1848f34ee3a67caf6faacdb906685645 06-Jun-2013 Scott Kennedy <skennedy@google.com> Merge "Unify LogTag" into jb-ub-mail-ur10
c1d56928b2185e6a2643eea271a1fbd50e425ca2 06-Jun-2013 Paul Westbrook <pwestbro@google.com> Add a limit to the Conversation query

Bug: 9294348
Change-Id: Ifedfe657f205adb1c8a12382b908f4b3b4346500
mailProvider.java
560bfadc3151f7a06f3b06e9a6c92cfa534c63ec 26-May-2013 Scott Kennedy <skennedy@google.com> 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
ccountReconciler.java
ttachmentProvider.java
ontentCache.java
BHelper.java
mailProvider.java
olderPickerActivity.java
tilities.java
6be411edd0ef5a1fb357d90c7fee22de83632be5 05-Jun-2013 Andrew Sapperstein <asapperstein@google.com> Refactoring to support eml viewer in UnifiedEmail.

Moved two files out of Email into UnifiedEmail and
removed their dependencies on EmailContent. As a result,
those classes now return the data directly via a data only
class.

Change-Id: Iaf0618dd6879c9dc2a41943d3d15428904b65768
tilities.java
9d5ed9e7a8d87408eb08f3124834e69ae3d9448c 30-May-2013 Paul Westbrook <pwestbro@google.com> Added logging, and switch to AsyncTask

Bug: 9111546

Change-Id: I287b07346bb1729c7a1afadbc0c94a0d37df92f8
mailProvider.java
ddca2a0dcbcd27d2d17b5d5273eee2004fbcdf7c 28-May-2013 Scott Kennedy <skennedy@google.com> 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
mailProvider.java
f3618c23208c7db065847aa3d529b5aad87062c0 23-May-2013 Andrew Sapperstein <asapperstein@google.com> 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
mailProvider.java
idgetProvider.java
d8302b01faa8fc7f175c93e90458aa84e8a663c7 23-May-2013 Scott Kennedy <skennedy@google.com> 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
ccountReconciler.java
mailProvider.java
29dc837d80e3d9faa03f52147285a58e6fd835e8 21-May-2013 Mark Wei <markwei@google.com> Fix flashing conversation list reloads.

The MergeCursor was not setting the notification uri and observers correctly.

Bug: 9051928
Change-Id: I920cd836aeb6fe550bf05a7e21bc4378ef9772a3
mailProvider.java
53836e572eb4b402140a02da949f3e3d0ca146ed 17-May-2013 Andrew Sapperstein <asapperstein@google.com> Enable "move to" from trash.

Fixes b/8986915. Forgot to set a flag in the
FolderCapabilities.

Change-Id: I202e46d89fe5705e3ddd05b1fbd0c8cd9f8fae0d
mailProvider.java
5f1dbb7e66da7c4abca2cc52b84744b4bc8055ff 16-May-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Using proper Unread icon for unread "folder"." into jb-ub-mail-ur9
7e753119260e53628f279176b0a41f5ef5713ce8 16-May-2013 Andrew Sapperstein <asapperstein@google.com> Using proper Unread icon for unread "folder".

Fixes b/8967972.

Change-Id: I1089fdeac5803fd6f9bed19d1c22d0629814ba87
mailProvider.java
67b38031abbbf35b10854d3c8d3b4adf7cb08aaa 16-May-2013 Yu Ping Hu <yph@google.com> Merge "Changes to support cleaving sync out of ExchangeService." into jb-ub-mail-ur9
7c3f85885c767b58eaa4dbbc8e8339bd567b73eb 09-May-2013 Yu Ping Hu <yph@google.com> Changes to support cleaving sync out of ExchangeService.

Change-Id: Idbfff4ddc8fca4829228d04816d40a4ab9639382
mailProvider.java
fff905416f2f786f0483dc627af04524d81a76ab 15-May-2013 Andrew Sapperstein <asapperstein@google.com> Show "no messages" when list is empty.

Fixes b/8547230.

Change-Id: I7d9d00c9448f1222d38a1a6406709818b2523ceb
mailProvider.java
b8d7d8d31de7efa7959a1169d720c30011575749 14-May-2013 Andrew Sapperstein <asapperstein@google.com> 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
mailProvider.java
f55972ecd838f7362837070248ad5ca5abaa2af8 08-May-2013 Yu Ping Hu <yph@google.com> Add more sync status callbacks.

Change-Id: I77e8b122474d5240ad5aaed7556471263a05e6de
mailProvider.java
968a2fe7805756ef6aa1f10f71306e865b9f7f09 07-May-2013 Paul Westbrook <pwestbro@google.com> Return full email address in conversation

Bug: 8850702
Bug: 8737081
Change-Id: I7d267e0cca243baf174c6cb61c887538e5e3bb54
mailProvider.java
bed61a78a08f0a82c2aae12787ad64b4cd566c08 07-May-2013 Scott Kennedy <skennedy@google.com> Support the "Reply all" setting

Bug: 8571631
Change-Id: I52c976f7a8247d53908d90569a24d0573dd4508f
mailProvider.java
71737836e6be308f752cb95c955a03146b039a9c 03-May-2013 Yu Ping Hu <yph@google.com> Add call for sync status updates to UI.

Change-Id: Ib91284b423cf88e8feac3b40d13627d26ccc7de7
mailProvider.java
5b528172436c754b261a786b985124ed9a898269 26-Apr-2013 Yu Ping Hu <yph@google.com> Merge "Use system SyncManager for Exchange." into jb-ub-mail-ur9
6929654a0db0886821c7b161d7d0beb6ae5efb64 26-Apr-2013 Alice Yang <alice@google.com> Remove checkboxes from Email

Change-Id: Ie2338cddcf15a278622f72e4827e6b160e16912f
mailProvider.java
81c1b3ee2f6e32200f1ff48e1b6466bac515ed38 26-Apr-2013 Alice Yang <alice@google.com> 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
mailProvider.java
9e7f5a2a33a31ff392d3116f6432b2f93ffe8e71 25-Apr-2013 Yu Ping Hu <yph@google.com> Use system SyncManager for Exchange.

Change-Id: I77e4e75c94c532d22a28cf97e6f55f1259b8bdde
mailProvider.java
643846abbd1ae60454fc8191992afffd08114e98 23-Apr-2013 Scott Kennedy <skennedy@google.com> Settings changes

Bug: 8685202
Change-Id: Ica781557b91e5ed43221f6e28b9d65cbb044ea55
mailProvider.java
e669f28b0866e66c629103698ad14b22a204442f 20-Apr-2013 Yu Ping Hu <yph@google.com> 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
mailProvider.java
50d5152f54060fa6a491e8f10411d02f13a09b83 20-Apr-2013 Yu Ping Hu <yph@google.com> Merge "Code cleanup." into jb-ub-mail-ur9
0eb47994a328fe450c54e483b894138fd449d9c9 19-Apr-2013 Yu Ping Hu <yph@google.com> Code cleanup.

- Refactor EmailProvider.call
- Remove unused import

Change-Id: I9f0ae35256856a9cd6ea015348d49fcbb6fa8b0f
mailProvider.java
3a82ad59928864931b826c46413831d7431057f9 20-Apr-2013 Mark Wei <markwei@google.com> Fix migration from Email1 to Email2 when using combined inbox.

Bug: 8578254
Change-Id: I2afb7e145664c1e6d10c0cfbf654d835fec8c9f1
mailProvider.java
idgetProvider.java
503cc0630d54de430a97f6013c6c7b7e851e343d 19-Apr-2013 Yu Ping Hu <yph@google.com> Stop using ContentCache and related caches.

Bug: 8655671
Change-Id: I349ce464b5d752b3ac687852dbce4f0b57e04c67
mailProvider.java
e0d4cab353b84fd632d5609d4780f597c8d56092 15-Apr-2013 Scott Kennedy <skennedy@google.com> Populate the account object with the type

This is needed for prioritizing contact results

Bug: 8587925
Change-Id: I093f0914060a01f37b175ae5877b27e0e16e9eaf
mailProvider.java
f9fd4b6bb4a275d12548c250176b9be918619c7d 13-Apr-2013 Yu Ping Hu <yph@google.com> 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
mailProvider.java
9b040bde34529e4e55c70774ecea87868c79f1e5 12-Apr-2013 Yu Ping Hu <yph@google.com> Base64 the folder persistent id.

Bug: 8596345
Change-Id: Ib7025fa54abb12f7c65628639819d06fb530c7ed
mailProvider.java
64cc777f8b3f01fad0b14ad4277d85b7dcfdcd73 12-Apr-2013 Yu Ping Hu <yph@google.com> 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
mailProvider.java
4b0e25898e1663f67ecdc38d1e8d9a24bb2d4e89 12-Apr-2013 Yu Ping Hu <yph@google.com> Fix checkbox option fetch for combined view.

Change-Id: Ie0679ce00ee0558cccc8e10c9346dd730ce08a33
mailProvider.java
54cf4b9d8c04e7531e8474ea01c34419b420fbc4 11-Apr-2013 Alice Yang <alice@google.com> Merge "Checkbox vs. sender image setting" into jb-ub-mail-ur9
9f1cff0659e4b9a179690d9c31f7a9bf56aad228 11-Apr-2013 Alice Yang <alice@google.com> 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
mailProvider.java
17d5bbf768c27ac7782b155e2ab25bcd480f5dcf 05-Apr-2013 Yu Ping Hu <yph@google.com> 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
mailProvider.java
0c06a7cf995c0d3e5dcccae97349891a46c3320f 10-Apr-2013 Paul Westbrook <pwestbro@google.com> Fixed mis-located cleanup code

Bug: 8565783
Change-Id: Iab06411cc85cd4958db574ec52eeebb7457c980f
BHelper.java
6b88a2471f91e9d4b7fbfff6b8ade7820f64d46d 10-Apr-2013 Vikram Aggarwal <viki@google.com> 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
mailProvider.java
293047605189eac463b03710ff2a7c1055a6a6dd 06-Apr-2013 Yu Ping Hu <yph@google.com> Reorder the folders in combined view.

Inbox should go to top.

Change-Id: I90c55952aaa3955adfd6d08a12a568bfb192c730
mailProvider.java
fcddd014dafd33b2db74e51041e3fd0aef617fd6 06-Apr-2013 Paul Westbrook <pwestbro@google.com> Merge "email: "Exchange Services has stopped" - Rain of Exchange Javacrashes" into jb-ub-mail-ur9
1389f0ed03696a4be4891ce1247867a5dec6b08c 06-Apr-2013 Yu Ping Hu <yph@google.com> Merge "Add virtual mailbox for all unread messages." into jb-ub-mail-ur9
689efab2b1beed7185ba75db6f0ef389adc222ae 11-Oct-2012 Emmanuel Berthier <emmanuel.berthier@intel.com> 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
BHelper.java
c065e72819fad62c083fd97e8d300a6b8e78a7ae 05-Apr-2013 Yu Ping Hu <yph@google.com> 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
mailProvider.java
89c74e89e52e3d3223ec9c2f108a9b0735d99d33 06-Mar-2013 Yoohyun.choi <yoohyun.choi@lge.com> 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
BHelper.java
391a7fc0e99457308b6f6bd9444c8aba94b0b7b1 04-Apr-2013 Paul Westbrook <pwestbro@google.com> Support legacy shortcuts

We need to support shortcuts that were created with previous versions
of Email

Bug: 8530220
Change-Id: I9e2a44b561f5617ffa954af37a9e78a95400f7dc
mailProvider.java
de4c230f008ca0615b8035a560cd512624ac2cdb 02-Apr-2013 Yu Ping Hu <yph@google.com> Exclude not fully loaded messages from uimessages queries.

Bug: 8370633
Change-Id: I5643454333b490bb1a988efb7b59e20b18fa67f4
mailProvider.java
46d6a4a7cb98430088595a9e305060ac4273ab8f 02-Apr-2013 Yu Ping Hu <yph@google.com> 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
mailProvider.java
11472650d1fce7548939d311c4434128930c18ba 02-Apr-2013 Paul Westbrook <pwestbro@google.com> Fix apk attachments

Bug: 7585865
Change-Id: I20191523377d99472e333dece4d727415f97c67a
mailProvider.java
3767da5d26c7138a6c3a293fd4b2b685f71f016f 31-Mar-2013 Paul Westbrook <pwestbro@google.com> Add capabilities for search folder

Bug: 6693452
Change-Id: Ib55fca4f883a699eabdaabf35568bffa055d556f
mailProvider.java
5a3aebbd2dd8cdd4d7c1a76ce3085cd6a314c0d0 22-Mar-2013 Paul Westbrook <pwestbro@google.com> 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
mailProvider.java
8a11cb8fd1b52cbcc413be04970e38e738617b54 21-Mar-2013 Yu Ping Hu <yph@google.com> Merge "Always show the starred folder." into jb-ub-mail-ur9
f16a7612c0bc4b4f03c9f8ba982c7723a5f33e17 21-Mar-2013 Scott Kennedy <skennedy@google.com> Exclude all inbox labels when we're viewing an inbox

Bug: 8426563
Change-Id: I7707c9ebf9ebcb73be73ef82f5f2212514671bfe
olderPickerSelectorAdapter.java
idgetProvider.java
a5a963321d2e281d1c05c7a706989dc434258790 20-Mar-2013 Yu Ping Hu <yph@google.com> Always show the starred folder.

Bug: 8383232
Change-Id: I8a5fa0dbdd9f4f2000c5b7d3347eb4946af0ae80
mailProvider.java
9ae81e2af07219bfad26c882516343e83c16d926 15-Mar-2013 Yu Ping Hu <yph@google.com> Move system folder string resources to emailcommon.

This permits us to move shared code for looking up system
folder names to emailcommon, which is also in this change.

Also renames emailcommon2 to emailcommon.

This is part of a multi-project submit with
I4a071a07c3e33aaa4ea404eb66a8db1eabc9ef0e and
I5746c0353783f9b29d52d6540472588c6542a6a2.

Bug: 8383232

Change-Id: I6c6eec4f1bcf2abd54c1ed05da1add8d894ee403
mailProvider.java
91107a4c56176554fe66f8592ea8251117462eb8 18-Mar-2013 Yu Ping Hu <yph@google.com> Remove useless UI notifications in uiUndo.

The uris supplied for these are bogus (lack IDs), and at any
rate the actual undo itself should notify the UI. (That's
currently broken, but not for want of trying, but the point
is that needs to get fixed anyway.)

Bug: 8373349
Change-Id: Id0f4e9fa45f2ece42d07f1f350d841f00270a8d9
mailProvider.java
d0e7d88f43bcd7d612a880f3525ef40dbe8f461a 16-Mar-2013 Yu Ping Hu <yph@google.com> Fix undo to use the correct URI.

Bug: 8373349
Change-Id: Ia23b60a1f82be16cb48afe5cf239e1c588b192a1
mailProvider.java
5ed8b266a480ea413264abdb5042c58b29175df8 14-Mar-2013 Paul Westbrook <pwestbro@google.com> Fix some problems with move message

Make Email respect the accepts moved mail flag

Don't throw an exception when receiving on the
folders_updated column

Bug: 8370675
Change-Id: I92c630577e6f572361bbaf68d8e5d0bfb6204951
mailProvider.java
8e2c4056caffb9695fa7fdf3a90c1c4f056adb97 14-Mar-2013 Yu Ping Hu <yph@google.com> Clean up dead code. Should be a no-op for functionality.

Also includes a fix for saving a draft that's already
been saved (used to create a new one).

The following were unused:
- accountIdAddToField
- mailboxIdAddToField
- uisendmail
- uisavedraft
- uiupdatedraft
- uisenddraft

Deleting those also allows us to remove the translation
from the Bundle used by calls to the ContentValues used by
update (since the update paths are now gone).

Change-Id: I87f2875e3272177a128a8ff65541e51b1f2d05fc
mailProvider.java
a6cd7cbd637fd39f190889c28378c81e93489796 14-Mar-2013 Yu Ping Hu <yph@google.com> Merge "Fix IMAP send by ensuring system mailboxes exist." into jb-ub-mail-ur9
f7055e261821af30874f6597757468eba6830539 14-Mar-2013 Yu Ping Hu <yph@google.com> Fix IMAP send by ensuring system mailboxes exist.

This is a quick fix to get it working ASAP, I will improve
how system folders are created when handling b/8383232.

Bug: 8307247
Change-Id: I6ea24ea756911c60d4eca69ce65d27dff33850c8
mailProvider.java
a833b36ec24a1ab4188dfcea4ff70ecce3f41c43 13-Mar-2013 Alice Yang <alice@google.com> Revert "Change "hide checkboxes" to "show checkboxes""

This reverts commit 5742d449178fd51cfea303280e6c7b327f087f9a.

Bug 8370186

Change-Id: Ie15b7c30aaba8df8678d15e19dcd38fddea6de13
mailProvider.java
5a3d863a43405132d562650603adc0a7bfb87fbc 09-Mar-2013 Paul Westbrook <pwestbro@google.com> Add support for feedback

Change-Id: I6de8c0117f79c0be05d3db2fc108f8bf61415783
mailProvider.java
1cea05ac37523dff68f63dc66799b97522f734d4 08-Mar-2013 Scott Kennedy <skennedy@google.com> Merge "Make widgets work again" into jb-ub-mail-ur9
6967b6b6bcf269222cb995c5b9dad0ded6b79e08 07-Mar-2013 Yu Ping Hu <yph@google.com> Merge "When folder is changed, also update conversation list." into jb-ub-mail-ur9
dfd2c87740cb3f4fe3d3b882116a6fe00cdcb2bd 07-Mar-2013 Scott Kennedy <skennedy@google.com> Make widgets work again

We can't send Folder parcelables to RemoteViews, so let's just send
what we need: two URIs and a String.

Bug: 8330949
Change-Id: Ic3f272e1bae4530cdc7776fd88eeb7bcb1a7dae3
idgetProvider.java
fc0dae9cd74d6edb22464f3a0721a82f0b5f9893 06-Mar-2013 Yu Ping Hu <yph@google.com> When folder is changed, also update conversation list.

Also add the folder's total count to the extras for the
conversation list cursor.

BUG: 7480726
Change-Id: I3215fed561deb8430fd6d6c680bdb44ca87cc162
mailProvider.java
32881e8dd375f16e6059452166503f7136f14ae5 05-Mar-2013 Paul Westbrook <pwestbro@google.com> Fix NPE after migrating older account

Change-Id: Ifeb3b1853ce3efd725227941103d29a00bc14fc2
BHelper.java
9a95253846ccc7a94dd7d4c618ec2d808e2a4000 23-Feb-2013 Paul Westbrook <pwestbro@google.com> Cache attachments on send

Cache attachments in a email directory when sending to allow sending
to succeed when the content provider has a permission

Bug: 7381557
Change-Id: Icf9faead2048de237228625f998b42feade48978
BHelper.java
mailProvider.java
3e2fdd33e32599c8b7e817c2ca00d50ee3bba7bf 26-Feb-2013 Paul Westbrook <pwestbro@google.com> Fix account creation

Notifications were not being sent on account additions,
so the UI would reprompt to add an account, after an account
was added. Now, the appropriate notifications are sent.

Also, fixed some cases where try/finally blocks were not used
to ensure that cursors were being closed.

Change-Id: If65934a34d995471fd5102fbe7e8cacbed5aae44
mailProvider.java
82fef2b3314e5068a3521aeea8f28d6345018df9 23-Feb-2013 Paul Westbrook <pwestbro@google.com> Remove usage of deprecated field

Change-Id: I6c2dc897e0389023f16c0d4887ee9489ebba4cd8
mailProvider.java
ffa3370b39a39e597e02d15915b8b6955f19252f 23-Feb-2013 Mark Wei <markwei@google.com> am ea2edb63: Set MIME type correctly on drafts when content provider does not provide it.

* commit 'ea2edb637036a7368b6ef82a0aafdb1a790e26e9':
Set MIME type correctly on drafts when content provider does not provide it.
7401a826341d0e210f8d65642124198fc58c2893 22-Feb-2013 Paul Westbrook <pwestbro@google.com> Fix suggestions from last CL

Change-Id: I838a408d28b5427f591e8e453008d9945144ff21
mailProvider.java
e04b736866f58c835aac1a6cc3446bdf3aeb0e51 22-Feb-2013 Paul Westbrook <pwestbro@google.com> Remove deprecated fields/members

Change-Id: I74d5f2eb4ed778f0590a3c935e6b79c335a3bdd7
mailProvider.java
779fe0200300978e28a0b8a904817bdc5e587cad 22-Feb-2013 Paul Westbrook <pwestbro@google.com> First part of switching Email to use ContentResolver#call

This CL includes the call() support. Subsequent CLs will remove the
deprecated UI provider uris, will add attachment caching to Email

Bug: 7381557
Change-Id: Iff59c7c0503c6e9ccda1d15954f72ffa78331b4e
mailProvider.java
ea2edb637036a7368b6ef82a0aafdb1a790e26e9 22-Feb-2013 Mark Wei <markwei@google.com> Set MIME type correctly on drafts when content provider does not provide it.

Bug: 8235172
Change-Id: Ia8bc575fb902de882dfbba3bfc7cd3acb625ce2c
mailProvider.java
512433135c184d6c19c8b58dac7b33315ac511dd 16-Feb-2013 Yu Ping Hu <yph@google.com> Merge "Fix how visibleLimit for a Mailbox is set." into jb-ub-mail-ur9
66eef4565dd0a8b99e927bed7b64c472d24c276d 15-Feb-2013 Yu Ping Hu <yph@google.com> Fix how visibleLimit for a Mailbox is set.

- Make sure visibleLimit stays <= totalCount.
- Don't reset it to 0 every time user enters a folder.

Also sets Folder.totalCount = Mailbox.folderCount
(rather than Mailbox.messageCount).

BUG: 7480726
Change-Id: Iae084d9445f483dca2b1da052ffd4dd7d091c6f6
mailProvider.java
2f9c66d08b13c1ed4eb7d2f70baa98116ac5fcfb 14-Feb-2013 Scott Kennedy <skennedy@google.com> Use swipe preference for archive/delete action

Since some people prefer delete over archive, we will use their
conversation list swipe preference to determine whether to show
a "Delete" action or an "Archive"/"Remove label" action. "Delete"
will be shown if they have selected "Always delete"

UR9 version of I4eb0d408474a9f613cc4267c3851cc7277a22ebd

Change-Id: Ia2f1382b88c1ee6f64e864cb8b780d02821b673d
mailProvider.java
132a3f09777953bffb8ab25c501ce3324b2f3ac6 11-Feb-2013 Vikram Aggarwal <viki@google.com> Merge "Add user assignable category for mail foldders if it accepts moved messages" into jb-ub-mail-ur9
5ba32cc2b93f4b9828ea3c2584ae7a0c2b52ea14 08-Feb-2013 Rohan Shah <shahrk@google.com> Add user assignable category for mail foldders if it accepts moved messages

Email requires a user assignable category in the case
the user is moving labels/folders from a category the
user should not be allowed to view (i.e. sys labels).

Change added flag under function where if it allows
moved messages, it will allow the user to assign
there as well.

Bug: 8157593

Change-Id: Icc8a5d4587ef9180d32207613da4f31ddc8854f1
mailProvider.java
b34608228f0b55e401415b67b8150ca9e00cee7d 11-Dec-2012 Scott Kennedy <skennedy@google.com> Move notifications to UnifiedEmail

This involves redoing the persistence model, to split general,
account, and folder settings into separate SharedPreference stores.

It also requires some preferences to be moved into UnifiedEmail.

Depends on Ibe2e3f93ec164370535ffc5f5b2409544cc8d36d (UnifiedEmail)

Change-Id: Ie6ec389b5b5d2e7ab1b299d0877811ae716526e2
BHelper.java
mailProvider.java
idgetProvider.java
a5abf7b338036eddb3baa627e9384a6962297597 07-Feb-2013 Scott Kennedy <skennedy@google.com> am 7fdde9bb: Cache column name/indexes so we can use getColumnIndex()

# Via Scott Kennedy
* commit '7fdde9bb4a24e931618a7a64227e2194c89034da':
Cache column name/indexes so we can use getColumnIndex()
7fdde9bb4a24e931618a7a64227e2194c89034da 07-Feb-2013 Scott Kennedy <skennedy@google.com> Cache column name/indexes so we can use getColumnIndex()

MatrixCursor doesn't do this, so we need to add our own cache.

Depends on Ia5ffd31f54a2a335f495df5e0d1a0886ee08c14b

Change-Id: Ica78e3cec747bf86fcef16508156e359216c64fe
ttachmentProvider.java
ontentCache.java
mailProvider.java
d02b69c5cccc87c6acc356a4ae1784e719eba974 29-Jan-2013 Vikram Aggarwal <viki@google.com> am 4b09765a: Added veiled pattern updates through provider

# Via Vikram Aggarwal
* commit '4b09765a2e8a0fd22a9db0e876aaaada4246aff8':
Added veiled pattern updates through provider
4b09765a2e8a0fd22a9db0e876aaaada4246aff8 28-Jan-2013 Vikram Aggarwal <viki@google.com> Added veiled pattern updates through provider

Change-Id: I09cef0865e3d29f44a93a3887ff72676ab868b14
mailProvider.java
632ab1d6339ca038287fb999d98ee0b78ca7cedd 23-Jan-2013 Paul Westbrook <pwestbro@google.com> DO NOT MERGE Revert "Change "hide checkboxes" to "show checkboxes""

This reverts commit 5742d449178fd51cfea303280e6c7b327f087f9a.
mailProvider.java
idgetProvider.java
5742d449178fd51cfea303280e6c7b327f087f9a 21-Dec-2012 Scott Kennedy <skennedy@google.com> Change "hide checkboxes" to "show checkboxes"

Change-Id: Ie44dc65acab4ed94e8d7b3b26392872c4419a603
mailProvider.java
idgetProvider.java
68a3607895963854637215a405145f190d6458f0 08-Dec-2012 Andy Huang <ath@google.com> convert rawFolders into a blob/Parcel

Requires CL I42eadd.

Bug: 7690709
Change-Id: I303f3c5479402a0eed9037ba2c95e00bdc7087b8
mailProvider.java
2fbe5abcaceeddc1cba13e82bf1e575df8234742 25-Sep-2012 Vikram Aggarwal <viki@google.com> Notify the folder list in addition to the specific folder.

We might be dropping updates to the FolderListFragment since updates
to individual folders do not currently update the top-level
folder-list URI.

Bug: 7487632 EmailProvider doesn't notify on the folder list URI

Change-Id: I7c673eefd2d9cbaf01a5ca3098f7c4728f841f40
mailProvider.java
947911082955d00014d1eccf04cd4b157d8cd8c6 05-Nov-2012 Paul Westbrook <pwestbro@google.com> Fix missed case for suppressing undo

Change-Id: I1393cf87f0372dfa20c46265ce9e26cbf34b15c2
mailProvider.java
c7636b8a47b39a482414cf7a9695846956add963 05-Nov-2012 Paul Westbrook <pwestbro@google.com> Add support to suppressing undo in Email

Bug: 7465798
Change-Id: I5f07b7821bb72ef8c0766da82d335792b010a11c
mailProvider.java
7e49f89a3a1ac5300c2672bdcb64338a8085da45 13-Oct-2012 Paul Westbrook <pwestbro@google.com> Return a value for conversation mode

Bug: 7312540
Change-Id: I0266df9a71f237666efa17360269f9ee5201668f
mailProvider.java
016310a054d54c11490244f2725f5323f4b2ee35 23-Sep-2012 Vikram Aggarwal <viki@google.com> Fix account order.

The combined account is added both at the top and the bottom
currently: Check L.3103 of EmailProvider.java.

Bug: 7100404 Order of accounts in email is broken

Change-Id: I1cbff04efbb0b50630c655918ffdfa4a5d11c2f7
mailProvider.java
114e314968f507b4237e693d279befe261b00f02 22-Sep-2012 Marc Blank <mblank@google.com> Return contentUri for all attachments

Bug: 7189815
Change-Id: If76d3a2038b3260fa44a7662854b03f7b6a1696c
mailProvider.java
54347010fbbdd3ae1dea5b0e282514c640e16a5f 22-Sep-2012 Marc Blank <mblank@google.com> Allow legacy imap to sync

* Remove old (and dangerous) constants

Bug: 7210754
Bug: 7212263

Change-Id: I6a1463a653c5c4823a96c9fbb9ca37e53a45b48a
BHelper.java
78b8c04898c04890b757fbd83df9666e0a9068f5 21-Sep-2012 Marc Blank <mblank@google.com> Add another test for "incomplete" accounts

* We have been erroneously marking some accounts "incomplete" and
this can cause reconciliation to fail after deleting the
accounts in Settings.
* Still need to investigate why the flag isn't cleared at times...

Bug: 7148506
Bug: 7166598
Change-Id: I0059580a6e4b6a5c54c09b8409c4358ff707ff77
ccountReconciler.java
48b4864840751bf68b44bad55e769be03deb2666 19-Sep-2012 Paul Westbrook <pwestbro@google.com> Fix crash with Email widget

Make sure the projection is correct for the sparse account
cursor

Bug: 7029165
Change-Id: If25ee7718fcd2577320404145de26a859fd4de0a
idgetProvider.java
8ff282a260eef699c3e22e8809075191706a171a 19-Sep-2012 mindyp <mindyp@google.com> Lots of fixes to line up with new multi/single move to folder dialog.

This leaves the picker with radion buttons for choosing the trash
and sent folders for imap.

Change-Id: I11bf32458b4d91bd21f2baf9260a69ac13026aaa
olderPickerDialog.java
olderPickerSelectorAdapter.java
887ea25ed5a7074eddbe3a2fcf8c817269631ec1 18-Sep-2012 Marc Blank <mblank@google.com> Merge "Show display name in convo list" into jb-ub-mail
d40524bbac2e55cafc7bf6d634dde093fd432b0a 18-Sep-2012 Marc Blank <mblank@google.com> Show display name in convo list

Bug: 7170872
Bug: 7144575
Change-Id: Iceaa0616b1fd2db842cd6af0d818a4cc2a2189cc
mailProvider.java
eaf7e3bce7a7f8f31c5677db188dec74072a43ca 18-Sep-2012 Marc Blank <mblank@google.com> Don't smartsend reply inappropriately

Bug: 7172780
Change-Id: Id43b75efab9c6f7a32e7c6bd42696547cc81f413
mailProvider.java
93bb868b870980cb7e62bb30a4d7e9b61528d90c 15-Sep-2012 Marc Blank <mblank@google.com> Make sure provider is initialized before setServicesEnabled()

Bug: 7142845
Change-Id: Idf793c5d07e3ea4c4a482696c5a27914fba66022
mailProvider.java
266064bcc7c6ed7318a284d59bb83d53edbf1921 10-Sep-2012 Marc Blank <mblank@google.com> Add "System Folders" settings

* Add this category and preferences for setting the trash
and sent items folders

Bug: 7100092

Change-Id: I964e02e5e319b3f04b030d36ed7dca30ed046362
olderPickerActivity.java
olderPickerCallback.java
olderPickerDialog.java
olderPickerSelectorAdapter.java
olderSelectionDialog.java
19e9291c9ad42a3e6be10e5ff4a12f9bbe8adc05 09-Sep-2012 Marc Blank <mblank@google.com> Merge "Use correct attachment provider authority" into jb-ub-mail
393b85957781baab7d648071b5b2288a26976881 09-Sep-2012 Marc Blank <mblank@google.com> dump is @hide; remove @Override

Change-Id: I4df3a75a7d0747e62ddd4bbc23ab4008344e49a1
mailProvider.java
323954df41bb71076d11f52df6275a57ab2fd4dc 09-Sep-2012 Marc Blank <mblank@google.com> Merge "Create requireSetup attribute; use it for gImap" into jb-ub-mail
16b07e11c737edb362d968da12b42ad5a8b94f69 09-Sep-2012 Marc Blank <mblank@google.com> Merge "Use resource based mime type for application" into jb-ub-mail
6e5bccf2c984039da5ae1dc08cffa665b73b6474 08-Sep-2012 Marc Blank <mblank@google.com> Use correct attachment provider authority

* Make sure new code works with old Attachment rows

Bug: 7130972
Change-Id: Ia5d258930f39266517eead535a92bb4380fdb594
mailProvider.java
81b0f74efa39d80b0aa18686c96499faf0e2691f 08-Sep-2012 Marc Blank <mblank@google.com> Create requireSetup attribute; use it for gImap

Change-Id: Id5f37861e4d6f2c2ed0fe98bd8b4d7eb73868c09
mailProvider.java
7e5df63fc9771c7950d3f95da17cfb112ebbf7f3 08-Sep-2012 Marc Blank <mblank@google.com> Use resource based mime type for application

Change-Id: I41a3cbf5c810668f9b0885f6614b2e48215901b2
mailProvider.java
af092bd5f850653b0d237fb55ccc896f74dc7982 08-Sep-2012 Marc Blank <mblank@google.com> EmailProvider dump

Change-Id: Id975c99427b41f4a56235dc6ba5ad515d6700fe5
mailProvider.java
fdb1635868e9591c3bcaf107360a7eae2e09fe18 07-Sep-2012 Marc Blank <mblank@google.com> More work on FolderPicker

* Only show for Imap2 (hard-coded now w/ STOPSHIP)
* Don't show more than once
* Make sure all folders are set up completely before showing

Change-Id: Ie745c7e2f155496482d213ecfc9eff2009bb23ee
mailProvider.java
olderPickerActivity.java
9a341d85f0027cac0f9dca0312d8c775738f9c73 07-Sep-2012 Marc Blank <mblank@google.com> Merge "Improve trash folder picker upon account creation" into jb-ub-mail
14e5f567ed09b0f5e4442038999d38a77593f658 07-Sep-2012 Marc Blank <mblank@google.com> Merge "Log capabilities (w/ STOPSHIP)" into jb-ub-mail
983c78e92899b94b237c292968c1be2bf53c5d57 06-Sep-2012 Marc Blank <mblank@google.com> Log capabilities (w/ STOPSHIP)

Change-Id: Id448fd48ee1d7a2eabab8f3bd4dae34b6e401a7d
mailProvider.java
26164054710375519ba7468987971a7a3340ba7e 06-Sep-2012 Marc Blank <mblank@google.com> Improve trash folder picker upon account creation

* Use setup intent uri
* TODO: More cleanup

Bug: 7077441

Change-Id: Ieab5b0ed33b73b7a0e9012aedd6becf867db1566
mailProvider.java
olderPickerActivity.java
olderPickerCallback.java
olderSelectionDialog.java
5b3fda11ded711042c5c2b9342a47bd2e2eb7d58 31-Aug-2012 Mark Wei <markwei@google.com> Add supplementary account info to outbound google.com links

Bug: 6661601
Change-Id: Ifae6d4a0f30c8233a1b51971168a19f1548718ca
idgetProvider.java
b210f3ad534c1215de17e95ce5f289dde9fad4a1 05-Sep-2012 Marc Blank <mblank@google.com> Merge "Revert "Initialize mDatabase on provider startup"" into jb-ub-mail
c0a425027b4d01262bd85f73a5212179b4418b16 05-Sep-2012 Marc Blank <mblank@google.com> Revert "Initialize mDatabase on provider startup"

This reverts commit 6c319d78edc52cd4a6d2f53277d2e1cef1afc5bc

Change-Id: I57881b090a3c7efba79369702356b622d9a7aba8
mailProvider.java
c0e2b147e09dd0bf15f19e63807b1b3bab798f50 05-Sep-2012 Marc Blank <mblank@google.com> Clear visibleLimit when folder entered

Change-Id: I39824dbff83ffcf109cbc1ffebf00cad5bce2498
mailProvider.java
2651bcc7be2c5fbce23faa0b0d12db63caee5a45 05-Sep-2012 Marc Blank <mblank@google.com> Put combined account last

Bug: 7100404
Change-Id: Iff2884e635d030d840f297c15f5e2ee646185c5f
mailProvider.java
9765f7b284941fc542c285998e435a8844d0e582 04-Sep-2012 Marc Blank <mblank@google.com> Merge "Initialize mDatabase on provider startup" into jb-ub-mail
5a2b9579de8353996df7cbd84cf0847c2ee075d3 04-Sep-2012 Marc Blank <mblank@google.com> Prevent possible NPE

Change-Id: I0254812c55cf6c5e4825aa28f900b8030502e9f6
mailProvider.java
6c319d78edc52cd4a6d2f53277d2e1cef1afc5bc 04-Sep-2012 Marc Blank <mblank@google.com> Initialize mDatabase on provider startup

* Try to prevent startup-related races

Bug: 6969684
Change-Id: I58ac16381bb71b8e21e01cb3ead0ba99f70c9873
mailProvider.java
9e4556ae1c4ed0202e3b60c790d165945b4a0fc0 04-Sep-2012 Marc Blank <mblank@google.com> Merge "Revert "Initialize mDatabase on provider startup"" into jb-ub-mail
fcba7fa20a17e2c691a39d344d5c880d051a34e0 04-Sep-2012 Marc Blank <mblank@google.com> Revert "Initialize mDatabase on provider startup"

This reverts commit 33f3b0c1d5930c5420bdc366a6a361c248937265

Change-Id: Ia56d67f49b3b5d7569791d9d556e2f7eed13ee7d
mailProvider.java
efb46b08571aeffb62ec9cd913775a57be6b8407 04-Sep-2012 Marc Blank <mblank@google.com> Merge "Clear visible limit when entering mailbox; enable imap load more" into jb-ub-mail
644f172cde5bb39b383e42f61ea5c73ca0ea1671 04-Sep-2012 Marc Blank <mblank@google.com> Merge "Initialize mDatabase on provider startup" into jb-ub-mail
cc986cf3d75dd80f59e41b829bb41c369f973d7d 03-Sep-2012 Marc Blank <mblank@google.com> Clear visible limit when entering mailbox; enable imap load more

Bug: 7045530

Change-Id: I013c465dfbe992e9df104039e8576465805c9119
mailProvider.java
33f3b0c1d5930c5420bdc366a6a361c248937265 03-Sep-2012 Marc Blank <mblank@google.com> Initialize mDatabase on provider startup

* Try to prevent startup-related races

Bug: 6969684
Change-Id: I5eb2bf2773c2809a27a7eeb461bf8fbfccc864a2
mailProvider.java
df9c1f3aa54792cc65f95ddff8e36a34a9dcdda1 03-Sep-2012 Marc Blank <mblank@google.com> Allow NULL values in genSelect

Bug: 7050016
Change-Id: Ia70e2312e37e8a5adae62d045878a079e9195d00
mailProvider.java
b82ae909d7514bf06090ee3a120aef2154ab0296 24-Aug-2012 Marc Blank <mblank@google.com> Add support for "load more" for Imap2

* Use new attribute in services.xml to indicate support
* Initial implementation

Change-Id: Ia8709d606d521c6d495c343a47ee074b5024d340
mailProvider.java
e714bb9d153cfe13a7f0932e7d67ea08fa5a1d98 23-Aug-2012 Marc Blank <mblank@google.com> Convert authorities, intents, and account manager types

* Tested ok on wiped Nexus
* Tested ok on S3
* Upgrade verified on Nexus

Change-Id: If5d4ce594f8a309cdb59589d10b1d33f3b79326c
ttachmentProvider.java
BHelper.java
mailProvider.java
5ac8d38796952a817f4693b38d62fc124651c121 28-Aug-2012 Marc Blank <mblank@google.com> Always return correct folder capabilities

* This requires us to use a MatrixCursor based on individual
Mailbox queries

Bug: 7059516
Change-Id: Ie9481a519d3d876464985924e5e7ad6d987c3945
mailProvider.java
0b9f23cae28a57730653af7be074a367e3ae4a09 22-Aug-2012 Marc Blank <mblank@google.com> Merge "Report delete capability for all folders" into jb-ub-mail
285cef8ad0af4727b53a7b79e709c0ecb5f40d4f 22-Aug-2012 Marc Blank <mblank@google.com> Report delete capability for all folders

Bug: 7034779
Change-Id: I5cd69739007a870d50e0f362945ca5aa62ae0cdc
mailProvider.java
a6885ba97d9d45d3496c67b8142418cbdefee89b 21-Aug-2012 Marc Blank <mblank@google.com> Remember base64 decoding for IMAP attachments

* Also, add debugging class to EmailProvider

Bug: 6995516
Change-Id: Ia96415caa61f26d55f09beb76fb3f34a40b53691
mailProvider.java
ae597ea949e3351de0dc71ba4b4ab124afea7d96 21-Aug-2012 Marc Blank <mblank@google.com> Handle getExtras() from message list cursor

Bug: 6923453
Change-Id: Iceacf32ab195de47553243cdf16a75436057d995
mailProvider.java
22e9efd44238802cc76ac18ec0c717640898df67 19-Aug-2012 Paul Westbrook <pwestbro@google.com> Supports delete

Make sure that all Email labels report supporting delete

Bug: 7006885
Change-Id: Ia73b37f456d749debdf5c186a8ae688b9d8525b7
mailProvider.java
296d18c02b4397c320a273cc94c234620e13b3fd 17-Aug-2012 Marc Blank <mblank@google.com> Try to find cause for NPE

Bug: 7006995
Change-Id: I12d19fab0264b5d779f24df92274ad879237d254
mailProvider.java
33858c77e9eaa688b43469de38439bd2107073f7 10-Aug-2012 Paul Westbrook <pwestbro@google.com> Fix crash when validating email hostAuth

Bug: 6948287
Change-Id: I781a32a2da0b4248e7ee1e061393ebc2bdc4dd61
mailProvider.java
9439595e582803ede8c4bb8634cf93457681edd7 08-Aug-2012 Paul Westbrook <pwestbro@google.com> Fix NPE when proceeding without selecting trash folder

Bug: 6948677
Change-Id: Iac846a8c4e992a02f5f5974ac623a99bee218b13
olderSelectionDialog.java
b74f2204672ae01e1b2954f5714031d369c332cb 03-Aug-2012 Paul Westbrook <pwestbro@google.com> Make sure to respect the projection from the client

The combined account query wasn't respecting the projection from the
client

Bug: 6930416
Change-Id: Iecda9b08caf6bb3e68a0d1cf79496b3d32b4b54e
mailProvider.java
idgetProvider.java
cee9881650e01da155b3d7117357a15f49a7a4a1 03-Aug-2012 Marc Blank <mblank@google.com> Fix typo in DBHelper

Bug: 6930157
Change-Id: Id98cb1772b3d2d58dcd3098566f1096b10ea66f2
BHelper.java
7f7f7e6402eec1baab6bedcb58da61369cae4097 03-Aug-2012 Marc Blank <mblank@google.com> Handle server deletion of local POP deletions

* Also avoid looping through zillions of messages when
checking uid's
* Always have 25 (or whatever the visible limit) messages
loaded

Change-Id: Ib2f02a59cc438e3fd14d7ac607fb01d9a5fa5282
mailProvider.java
f6db592c313c77190727c7cd72d3edda9d23a099 02-Aug-2012 Marc Blank <mblank@google.com> POP3 renovation

* Much, much faster
* Remove message length pass and lots of other useless code
* Create pseudo-attachment for long messages (click to download) that
includes size (so user can determine whether it's worth it)
* Handle download of message via pseudo-attachment; real attachments
are then created as necessary.

TODO: Add real UI with UX input (or modify existing to clean up the
loose ends)
TODO: Optimizations for loading the whole message
TODO: Get server delete working (isn't working currently anyway)

Change-Id: I31f3809fc5a2f9fd490d33cfed70d2930654e71d
mailProvider.java
tilities.java
e0015b2800eeefbf8aaf322645038907f37e62f1 01-Aug-2012 Vikram Aggarwal <viki@google.com> Priority Arrows are always disabled for Email.

Change-Id: If8617fc9c41467987aa572bfe2f93394757c4166
mailProvider.java
7d5e2a7c08966ffd4a9e8c78f504cc4fd5be4216 01-Aug-2012 Marc Blank <mblank@google.com> Do "same certificate" checking when using "trust certificates"

* Refactor/simplify Transport/MailTransport
* Add serverCert column to HostAuth table in EmailProvider
* During first connection to server, save the server certificate
in the HostAuth; on subsequent connections, ensure that the
certificate presented has the same public key as the one
stored
* For now, we'll just fail to connect (with a CertificateException)
if there's a mismatch

TODO: Add some UI to handle different certificates

Bug: 6888866
Change-Id: Ia79497e89eaad8d43617b50d3771121b2ed7f687
BHelper.java
942fea3c97e0f8aa6420ecbc6201d4be27800d94 31-Jul-2012 Marc Blank <mblank@google.com> Synchronize checkDatabases()

Bug: 6538393
Change-Id: I5e4d532aa859d8a49805b74475275ad914e84b86
mailProvider.java
949fc3d88338861dec8eac29fffaef5b17ae07e8 31-Jul-2012 Marc Blank <mblank@google.com> Prevent NPE when the message has been deleted

Bug: 6907706
Change-Id: I5d5f980856eed12242095527aa927d139c77db4d
mailProvider.java
ae57810e1e321991c454a4a6de4b88817c839315 27-Jul-2012 Marc Blank <mblank@google.com> Merge "Imap2 additions" into jb-ub-mail
0b6b83c6f90652b506c7761b923663c08f3af833 25-Jul-2012 Marc Blank <mblank@google.com> Imap2 additions

* Implement first-pass Imap2 server-side search
* Improve number parsing performance
* Better handle the BodyThread (loading message bodies)

Change-Id: I0ccd7377c80a0553b086d5204b211067896a2f49
mailProvider.java
34d8a139ce9c7eb72ec92ba6861353f221301330 27-Jul-2012 Mindy Pereira <mindyp@google.com> Remove extraneous loop.

There better be just 1 folder!

Change-Id: I8f4431cb133b29a4d4f266d0a95b843b374f15cc
mailProvider.java
709b4633eda47f81a689c3be623660d74cdad904 27-Jul-2012 Mindy Pereira <mindyp@google.com> We don't need this! Raw folders does everything for us.

Change-Id: I5e37ed79ce3dce02ffad6fbea184981dd6f4f40e
mailProvider.java
97a198292e665fff5d27d727d415f35b0a0633e4 26-Jul-2012 Marc Blank <mblank@google.com> Notify on "all accounts" when an account is updated

Change-Id: If6bad046d10972dcf7aa76d73b18c8a0c655a6ce
mailProvider.java
b225298b13eb47c6251d73c28506b0a7ad56bf5c 26-Jul-2012 Marc Blank <mblank@google.com> Add swipe-to-delete general preference

Change-Id: I83aa62526ba7a74cea27930300340227b147340f
mailProvider.java
21959b3f297fe96c33b22b623a6c426e95d7effc 25-Jul-2012 Paul Westbrook <pwestbro@google.com> Support widget changes in UnifiedEmail

Change-Id: I48ed403a7f1d61607b70c3ef260cc1f903e27a1b
idgetProvider.java
a4418762d4667dd8e76adfe45d905da9e228d1d5 25-Jul-2012 Marc Blank <mblank@google.com> Merge "Make sure account capabilities get set properly in UIProvider" into jb-ub-mail
0b5f15d61ebf7c0e8428100637bc479ed93a4cb2 25-Jul-2012 Marc Blank <mblank@google.com> Make sure account capabilities get set properly in UIProvider

* Change getCapabilities API to take an account, rather than
the id of the account
* getCapabilities() can therefore execute even before Exchange
is fully up and running

Change-Id: Id4c2a9942ea7a21e0c56401c50206b680274b43e
mailProvider.java
6eee9e4f11d0dad2c2e965281c63146f7acd0d2f 24-Jul-2012 Andrew Sapperstein <asapperstein@google.com> Filtering attachments by content type.

If the optional contentTypeQueryParameters is
set in the attachments URI, we only include attachments
that start with one of the contentTypes given in the
query parameters.

Change-Id: I97364b405b37174c02ba712009604b4dd122ae73
mailProvider.java
51693c5a4ca3553f0a02a91fe1805fb895380e3e 20-Jul-2012 Paul Westbrook <pwestbro@google.com> Migrate legacy widgets

Bug: 6304532

Change-Id: I6a5cad036ec7d4746e396b580e4689c957a7ee18
mailProvider.java
idgetProvider.java
00287c4d8f54ae07c89bb3893f440acdca09d728 20-Jul-2012 Marc Blank <mblank@google.com> Remove unused code; rename some constants

* Also handle large batch operations in chunks

Change-Id: Ie566cb8d8bb73e8edd663de5228e905c223f031b
mailProvider.java
51d4370b770ae56a4437bb68ed4729e5f1111a43 20-Jul-2012 Mindy Pereira <mindyp@google.com> Create ConversationInfo object with senders info for email.

Change-Id: Ibc789682d3bf0b19e026dcb629f94afee0405ec3
mailProvider.java
77a9966f462581707bc49ccbf3348ca65b5fa41d 19-Jul-2012 Marc Blank <mblank@google.com> Merge "More work on Imap2" into jb-ub-mail
a8b683cf3f2efe726220c0235368cf6ea899e3ba 18-Jul-2012 Marc Blank <mblank@google.com> More work on Imap2

* Handle sending mail and moving to sent folder
* Implement picker for sent folder
* Upload sent items to server
* Add support for "automatic" sync window
* Move some files from Email -> emailcommon
* The added files are copied directly from Email (and can be
removed if/when Imap2 is merged back with Email)

Change-Id: I3a6a3d224826e547748be2f1b567b6294ad5db89
mailProvider.java
olderPickerActivity.java
olderSelectionDialog.java
ba6bf4e0520ab8e5eb5e3ccdb0a41a241fab8f34 19-Jul-2012 Vikram Aggarwal <viki@google.com> Merge "Default Inbox name for Email" into jb-ub-mail
a0fef46aea16c1783f681bb0053eeb3f53d975ab 19-Jul-2012 Vikram Aggarwal <viki@google.com> Default Inbox name for Email

Change-Id: Iac4995d948d73c6a663331b0653453a916057189
mailProvider.java
49cbb81332769c97a19cd388dcfd88957c072328 19-Jul-2012 Mindy Pereira <mindyp@google.com> Should be able to forward a message with no additional content.

Change-Id: I6eccf2f2436303a0359027d3efd3763306f9f657
mailProvider.java
c992071671248761de44eff048ffb64554a5cb26 18-Jul-2012 Marc Blank <mblank@google.com> Fix build break

Change-Id: I23cdd4c07faf97d471caf1e9dc37d81f412d8dab
olderSelectionDialog.java
c6089bc01f2ae49fb11904a4b4f222811358254f 29-Jun-2012 Marc Blank <mblank@google.com> Initial Imap2 implementation

This CL includes the following:
* New Imap2.apk generation (not included in builds)
* "Push IMAP" option for accounts when Imap2.apk present
* Account creation/setup
* 2-way sync of messages, deletions, flag updates
* Push (messages, flags)
* Folder list hierarchy handling
* Message text (one plain or html part)
* Picker UI for trash folder (placeholder)
* Capabilities handling/UI command

Major Imap2 new features:
* Push
* Multiple folder sync
* Sync window (like EAS)

TODO:
* Picker UI for sent folder
* Upload of sent messages to server
* Search
* Multiple viewable parts
* Probably lots more, incl. unit tests

Change-Id: Ia5d74073d9c307e0bdae72a7f76b27140dde7d14
BHelper.java
mailProvider.java
olderPickerActivity.java
olderPickerCallback.java
olderSelectionDialog.java
b27348a80836d6f7daac2ece4b2e6620f8d315f4 13-Jul-2012 Andrew Sapperstein <asapperstein@google.com> Adding the via column to email.

Change-Id: I3d49f696a1262f22b0ebaf733b5a4f26ac270935
mailProvider.java
de79ecbbe2356d21ab0b0d40a7ee00f4e18b4924 11-Jul-2012 Andrew Sapperstein <asapperstein@google.com> Update to email2 for the new spam warnings.

This feature being Gmail-specific, we simply
set the default values so that warnings never show
up for email clients.

Change-Id: Ie0a55762c1af73a9c9aa8836faadc23ac9af52cb
mailProvider.java
7c8f1c125aa5cd79f1f5f6048f8443eb084a6b2e 28-Jun-2012 Marc Blank <mblank@google.com> Fix handling of json in SQLite query

Bug: 6749576
Change-Id: I3cd85182d8c35e564f50ee7f9c787d797253e105
mailProvider.java
c5afb16430a145f20d7c887e45f47b38687054da 28-Jun-2012 Marc Blank <mblank@google.com> Add a bunch of stuff missed earlier

Change-Id: I7f707446a963912fe5786dacb5569e68db572d1c
BHelper.java
tilities.java
f419287f22ae44f25e1ba1f757ec33c7941bbfa8 28-Jun-2012 Marc Blank <mblank@google.com> DO NOT MERGE: Move emailcommon2 sources to emailcommon

Change-Id: I06df7e467cd2e0117df8b8db3ddc6ff9da13f1c7
ccountReconciler.java
ttachmentProvider.java
ontentCache.java
mailProvider.java
idgetProvider.java
03cd72805dab0379ed255d151f1c17cc60655fc3 25-Apr-2012 Marc Blank <mblank@google.com> Revert to old Email app

* These are the last sources in the ICS-MR1 tree

Change-Id: Ida4651bddd92a06a518d00f3e1f275ab3a80c8ae
ccountReconciler.java
ontentCache.java
BHelper.java
mailProvider.java
tilities.java
05ba9724087aa032c120cfba64ff1a997a9cba7f 06-Apr-2012 Paul Westbrook <pwestbro@google.com> Move settings into account

Change-Id: I0e791ead6c54af96afbfdf1d38457fb2fb41c4dc
mailProvider.java
6f627965d00bbe137f848cf6593556ce66a53372 21-Mar-2012 Paul Westbrook <pwestbro@google.com> Removed some UI provider code from EmailProvider

Leaving this in was breaking the build, as new files were required.

This change is just to keep this version of Email building.
Eventuually Email2 will replace this one.

Change-Id: I96fbed63a18a11bcdc64c2f0bbe8b100fdb273d9
mailProvider.java
e7dc6a34d481e509021432d501585dd30fa7cd01 16-Mar-2012 Vikram Aggarwal <viki@google.com> AutoAdvance.OLDER always

Change-Id: Ifaf1ab14db0a3415d91b910b726bf9c8e0fec1ea
mailProvider.java
05b99a0d8cbf6e9eab0b12e596e9afbff4cec9d4 16-Mar-2012 Vikram Aggarwal <viki@google.com> AutoAdvance.LIST is safer than AutoAdvance.NEWER

Change-Id: I72ba37cb8a7259c13afcfaabb70a11d65f536b69
mailProvider.java
a7d788d54a602bfdfd4111b1de119404101a3ef4 14-Mar-2012 Mindy Pereira <mindyp@google.com> Fix build.

Change-Id: I077de029e1da06e3dcd6dae438a6c64b58e9e127
mailProvider.java
4bf4edcf64c0b1cb8aabfb2e16ec29f4b19921d2 13-Mar-2012 Mindy Pereira <mindyp@google.com> Send uri of folder this item is in instead of just the id.

Change-Id: I5b7ba10497ac2f5081de02074d525e39d73ba9b0
mailProvider.java
1d202e274d4c4f83d01c83abc909e1e331cd7df6 13-Mar-2012 Paul Westbrook <pwestbro@google.com> Support new folder id

Change-Id: If971ca60e5029487dd1c12b4664c6b64f3133f4a
mailProvider.java
ebbf8e1040ef9742e3ea20b3e3c6b07a08812b58 13-Mar-2012 Marc Blank <mblank@google.com> Merge "Add support for "Load more" for search results"
6550ae97731282e2427c3130c4ea316dfce5538b 13-Mar-2012 Marc Blank <mblank@google.com> Add support for "Load more" for search results

Change-Id: Ie16e11ced34c85de02980c85e2db9d61faed5b6f
mailProvider.java
dd32d141878d0e1018f2f0b8b02b34208e81ff1c 10-Mar-2012 Andy Huang <ath@google.com> cross-project refactoring

Attachment.mimeType -> contentType
Attachment.contentUri(String) -> contentUri(Uri)

Change-Id: Id35fb698d120013c00878f416f9b68a2f0095fca
mailProvider.java
34943d241d189b80d2f825f7577c7e8e509901c4 12-Mar-2012 Marc Blank <mblank@google.com> Trigger load of full msg when opening partially loaded msg

Change-Id: Ia49aa7f423ceac6697d95abf66e10bb5998c5747
mailProvider.java
e2166f75486da0a1b70b804ea34f11f600f11cfd 11-Mar-2012 Marc Blank <mblank@google.com> Add totalCount to Mailbox; send to UIProvider

Change-Id: If01868eb27a97540683f25148f32b8c41ae59c17
BHelper.java
mailProvider.java
9e266d12fb5f09fb309b60f2d1eaaa4a1a0a4a8e 11-Mar-2012 Marc Blank <mblank@google.com> Implement "load more" for POP/IMAP

* Search not yet implemented

Change-Id: Ic808d3adcb48a2b4370fda77d7b108ea656de5c4
mailProvider.java
25fe72687df8fd3aa4d7dc81054cbf9f2be7f1f3 10-Mar-2012 Marc Blank <mblank@google.com> Notify on attachment's message when updates occur

Change-Id: I23d537992fbf8b0f0dab3afaf37cacfd5587d1f3
mailProvider.java
55d0e821eaecb5e454812a30c1137dbc95db98e2 09-Mar-2012 Marc Blank <mblank@google.com> Report search result total to UI

Change-Id: Ic88e7594b98548a96c8c6f96d2f8a585e539f520
mailProvider.java
ebb79619e8ed3c9f0c051e7f323e3971bce7508d 09-Mar-2012 Marc Blank <mblank@google.com> Move account delete logic to EmailProvider

* This functionality had to move away from Controller

Change-Id: I557918a325eab8c83a9728fa1ce33dde8b86158f
ccountReconciler.java
mailProvider.java
ab6321e2c470596b9d8e4f97a23160788d917590 09-Mar-2012 Marc Blank <mblank@google.com> Fix SMTP sending

Bug: 6134036
Change-Id: Id48e4bd17e7493d873d888027e68c7eb86d23198
mailProvider.java
c3643cf2b561a345040645951cb107bb7daf01a9 09-Mar-2012 Marc Blank <mblank@google.com> Fix search to work with IMAP

Change-Id: Ic3d9dfec0e30323e258e59630c2ca42bb1c7e98c
mailProvider.java
26195ef64d9588b1d5f42ee93913bb1222ed9641 08-Mar-2012 Marc Blank <mblank@google.com> Handle searchUri (first pass)

Change-Id: I75f7a757322e1d4f9b4eac92b9ecbb6a0cc6580b
mailProvider.java
06a382f26fe80931359dba4872a2563e6a8e5732 08-Mar-2012 Marc Blank <mblank@google.com> Fix up delete to handle trash/drafts deletions

* Also, while we're here, create default "last touched time" for drafts and
sent so that they appear in the initial recent list

Change-Id: Ie2fe20b34625b5616dac5581f9bbd015f52a82bc
mailProvider.java
ef94d9285ea58e3db47871cd73b0e9270c673021 08-Mar-2012 Marc Blank <mblank@google.com> Return searchUri with accounts; return empty cursor for now

Change-Id: I160676a492ef359007676c3aa9f56f9015b64c64
mailProvider.java
420e97f0f82afe0db64c3651eaf3cb15e149ba01 07-Mar-2012 Marc Blank <mblank@google.com> Support attachment commands from UIProvider

Change-Id: Ib457808bdb424275c0abe6e1d86e3b9d33406780
mailProvider.java
70bbe5ec3cabfc711cf4486318a04bb18e34ebf3 07-Mar-2012 Marc Blank <mblank@google.com> Add columns to Attachment for UIProvider use

Change-Id: I7f85431f409dbd6a5bd6d111b18d1fc89c00b9b2
BHelper.java
b4a4ca99a9bd5aa357cdbc8530e3b3d861af9197 07-Mar-2012 Andy Huang <ath@google.com> Attachment SYNCED column is going away

Change-Id: I19476bc5a9a9e557e61a7347689129ce552b3ff9
mailProvider.java
71b57354c1e9df99d121a6725358311b3450c859 06-Mar-2012 Mindy Pereira <mindyp@google.com> Listen for application/email-ls so we can distinguish between email2/gmail2.

Change-Id: I1b30738b0d8a3f6830dfc6d67b6db385771bba15
mailProvider.java
6ae4b080d498fbf8b9c750ea4289ddd15908f1f1 06-Mar-2012 Mindy Pereira <mindyp@google.com> Set compose to email2 until we get rid of the email app.

Email2 supports the compose intent.

Change-Id: I739ccb95b63806ed46dfa74b721b5a43665aa1c4
mailProvider.java
27282ed34ae1a7f636bd5d85b859e38ee692b5bd 06-Mar-2012 Paul Westbrook <pwestbro@google.com> Change the authority for Email2's account cache provider

Allow the account cache cursor to have the notification uri set

Change-Id: I8b01ada0b787fe7a709ad7feacacb91acc3da826
mailProvider.java
bc7f451442d008e4b3c8e1d28546f1831c7f9d7e 03-Mar-2012 Marc Blank <mblank@google.com> Fix IMAP/POP notifications

* Make sure the default Inbox is always notified
* Use correct "new" count for mailbox

Change-Id: Id66c76e415589f6eb6fdad0649ae039fd45c1205
mailProvider.java
eccf7ee9a4c4b9bf78af9a679827542ec5c42161 01-Mar-2012 Marc Blank <mblank@google.com> Hook up attachment queries; use more specific notifications

Change-Id: I01198b9ddf63e1edd9a35a81c15e0cf791702184
mailProvider.java
ceedaa3c546bd84eccc9c44eff2f1bc09d61ec8a 01-Mar-2012 Marc Blank <mblank@google.com> Fix settingsQueryUri

Change-Id: I519f9e52ebe6a2eeeed78913e0f2b0c01539161e
mailProvider.java
d5187106d1b0e0e387bc020e1d8e1c4aab8ed3ef 01-Mar-2012 Marc Blank <mblank@google.com> Handle account settings query in EmailProvider

Change-Id: Iae33b00c3fa17fe381c0c66d9e159a2717e0f201
mailProvider.java
108f7b639a78ba772dcdc2747e480935bb5c052a 29-Feb-2012 Paul Westbrook <pwestbro@google.com> Support the always_show_images column

Change-Id: I4817ca936cc2775cd22b878d17045e0ede0af04d
mailProvider.java
27be3474a2a6df6d5f1eec3c63d6937c92559a86 28-Feb-2012 Marc Blank <mblank@google.com> Actually put composeUri into the cursor; d'oh!

Change-Id: I1295bb7501c3481f0d5e21e7cc76c1b19ab3047d
mailProvider.java
d9201da55bd57032651ba84207cf95c938d2123d 28-Feb-2012 Marc Blank <mblank@google.com> Setup composeUri for accounts in EmailProvider

* Add intent filter in manifest

Change-Id: Ifbacfcb6109d76d48dabb87eb45ea28ec4278ad8
mailProvider.java
8c4b6e40cf0d258cb15a032cfa3d45e17c21b305 28-Feb-2012 Marc Blank <mblank@google.com> Hook up settingsIntentUri in EmailProvider

Change-Id: Icc47a7dd29f6707443f5b56bdc6df86818295662
mailProvider.java
fd077592ee06b27ad70281f05a6239d9c943b52f 27-Feb-2012 Marc Blank <mblank@google.com> Use EmailProvider to create account list

Change-Id: Iedd99ecb95066c3b7e089e3b987a0caed44b97e5
mailProvider.java
9a5e2a798e11b666670281d64c1039483ad60546 26-Feb-2012 Marc Blank <mblank@google.com> Fix clearing of mailbox notifications

Change-Id: Ieb98a8908ec067229dd449790da55085585ef17b
mailProvider.java
bf5caf97c547c8fa4bbdc2b500e8d43ee6322fcf 24-Feb-2012 Marc Blank <mblank@google.com> Notify by mailbox, rather than account

* Update EmailProvider, removing two no-longer-used columns in Account and
Mailbox

Change-Id: Ie0f10eb0ca315d73e82be968f7760a51a239ba3f
BHelper.java
mailProvider.java
98412cadfb8d8a9ff1f09cf0d4a73a636e478818 24-Feb-2012 Marc Blank <mblank@google.com> Use account id instead of name for queries

Change-Id: I49f870491d2b090df345b956280dbb477436be60
mailProvider.java
99dfd1edfd0151a1aa608d96f26a605d972a8a95 23-Feb-2012 Mindy Pereira <mindyp@google.com> Merge "Remove folder sync_frequency column. UI doesn't need it."
b61bd298bd24f33a70d17e3936927a39e69fa960 23-Feb-2012 Mindy Pereira <mindyp@google.com> Remove folder sync_frequency column. UI doesn't need it.

Change-Id: I2a696115aed048f854174a8c4dc7666165b6ae1f
mailProvider.java
87c84a6d96a360b2310f44ff4ae2e181c7a4479a 23-Feb-2012 Marc Blank <mblank@google.com> Send sync status updates from POP3/IMAP

Change-Id: Ia1bb5d1a302d6dde8b8979e03a762d6d45ee8cd3
mailProvider.java
6b9d94bf397757b5f6654d0a0c56f562ad62a5b2 22-Feb-2012 Marc Blank <mblank@google.com> Make mailbox change notifier less noisy

Change-Id: I6eb7ac4f60acf6d92f4c094a373038fef222d97a
mailProvider.java
1dc7772d4313bec45af4a4d7609bc36f6e3a247b 22-Feb-2012 Marc Blank <mblank@google.com> Support syncStatus and lastSyncResult in EmailProvider

* Also, trigger a sync on refreshUri

Change-Id: Ia8dee593decfc2101873071ad64fcc3fd1fd5f23
BHelper.java
mailProvider.java
7db23e6acb1dbfd04a4a544de7754bc587265c4b 22-Feb-2012 Marc Blank <mblank@google.com> Fix build break; support folder query

Change-Id: Ic2a62e2d00e0fe46a1a488d665818c47243c9d8d
mailProvider.java
59e10b6b3dbc14884b032b1843413b08adaaf288 18-Feb-2012 Marc Blank <mblank@google.com> Support folderUri and statusUri in EmailProvider

* Implementation of status to be completed later

Change-Id: I9dc2b1144b8186341f1c032906145f3d899b2a0b
mailProvider.java
4f813fb12937de74d3ccec730b8de0c9de7a87e0 14-Feb-2012 Marc Blank <mblank@google.com> Convert POP3 to service

* Remove MessagingController and (almost all of) MailService

Change-Id: I8953b58b237de6a71fda770f1727bd94081fec55
tilities.java
d57e096b2cf9c85a3c2df733f92e7f8b2d26402a 15-Feb-2012 Marc Blank <mblank@google.com> This time for sure!

Change-Id: I98a0a8dcc37f52ac29d87379a886c9ca966e923c
mailProvider.java
abad2efba849d1c590581767c704deb412c748cd 15-Feb-2012 Marc Blank <mblank@google.com> Oops! Handle subfolders query.

Change-Id: I62628fb8bdb25b96f023788271508d65fd8b4cdd
mailProvider.java
1e138516eb980352af8ce70338bee4823b2adbc7 15-Feb-2012 Marc Blank <mblank@google.com> Handle query for subfolders from UIProvider

Change-Id: Ic448324a5a87b6679978426ec639fe4c3d8d77d7
mailProvider.java
c0272961e1afff760191f8f6e0ebbed132d9cb0a 15-Feb-2012 Marc Blank <mblank@google.com> Return only top-level email folders for uiFolders query

Change-Id: I9480f8263ded7d1eb3eaecc92564130b498a558d
mailProvider.java
69d952c3debabf44fce642d95c04a3248480e33a 13-Feb-2012 Marc Blank <mblank@google.com> Add folder list to conversation list fields in query

Change-Id: Ieea84693196796175a1bdea8ecd3dbdf4a229c66
mailProvider.java
1e162747761e644cc2368c7c0f2108902bcb0f11 04-Feb-2012 Marc Blank <mblank@google.com> Set the CAN_ACCEPT_MOVED_MESSAGES capability as appropriate

Change-Id: Ifa6e098352afb5feaa277ed0614628eb1765992f
mailProvider.java
83dae570ed7decef4e0be46a0f88cfee142b993f 04-Feb-2012 Marc Blank <mblank@google.com> Handle undo for "move to folder"

Change-Id: Ie3847fe4919fc49411b8465e2600f85efb174d0a
mailProvider.java
e2488c3f02b95c3b7857a9260b6a86911969fede 03-Feb-2012 Marc Blank <mblank@google.com> Handle move-to-folder from UI

Change-Id: I2165b9f83459c0b8f8817108dc294c7882730df8
mailProvider.java
63d60d9eb182d583d08e6d4b6dc11b392dede6f1 03-Feb-2012 Marc Blank <mblank@google.com> Split EmailProvider into two classes (and about time)

Change-Id: Ia72e8c83ea16718077ffe8b8d284d18b6f9f0786
BHelper.java
mailProvider.java
87d7a604172d0e15454e8b615b163377e67050c1 02-Feb-2012 Marc Blank <mblank@google.com> Handle update of draft

Change-Id: I15c2b2b85afeff19e4ae7520c36a6119ab1e5cca
mailProvider.java
3a8291b3e02de754da4886ba40fdd0cd0fe54ad2 02-Feb-2012 Marc Blank <mblank@google.com> Oops; generating bad URI for save message!

Change-Id: Iaf10108dee202c23abc6a18b9e5e8673c4813d0f
mailProvider.java
12142f430ebbc81f29ac17da5944786c4c1eee4c 02-Feb-2012 Marc Blank <mblank@google.com> Support save/update draft and change of convo URI usage

* For now, update not working (it's complicated)

Change-Id: I9df440338ac167f03ce4f2f4b36ad286adad318e
mailProvider.java
5adc6c0be9193632673dc66c8d220776972adfa4 01-Feb-2012 Marc Blank <mblank@google.com> Support undo for message deletes

Change-Id: I55d8950ca782babc00b28ced7c4d23042882b05e
mailProvider.java
5520221f60e6ef2739a1898e24e0ef9d26a2c94f 24-Jan-2012 Marc Blank <mblank@google.com> Handle insert instead of update for "send mail"

* Return proper Uri from insert

Change-Id: I5439fff9872a14c63504a17a2bfef34ff19f99c6
mailProvider.java
7f667159c9ecf44fe7f3da8741e537a6d20f5c60 24-Jan-2012 Marc Blank <mblank@google.com> Merge "Handle convo read/starred/deleted"
5e392205dcbb4e45529fba93dfde7e4103871474 19-Jan-2012 Marc Blank <mblank@google.com> Handle convo read/starred/deleted

* Send UIProvider notification when changes are made by sync engine

Change-Id: I3076c739b13b40e931277f1b5ac08447c814ff6f
mailProvider.java
d16fa893d1a24497147fd91b32698ff7bf695600 20-Jan-2012 Andy McFadden <fadden@android.com> Use Map.Entry, not HashMap.Entry

Map.Entry is the defined return value from entrySet(). HashMap.Entry
shouldn't be used directly.

Change-Id: I855f7a4e855776deb83754ca89c2a4128e9e04a2
ontentCache.java
c8afa2f5cbdcc9b3c59d93e9a8ab1bc1e75dd91f 18-Jan-2012 Marc Blank <mblank@google.com> Send attachments w/ UnifiedEmail outgoing mail

Change-Id: I471816dcaac1ab53aea1465dd69ae4453a1a0268
mailProvider.java
1d3f98c5229d0cb9f270a1601b71b8d887cf5416 17-Jan-2012 Marc Blank <mblank@google.com> Merge "Store UI-friendly addresses in EmailProvider database"
36ed276f7a97529d5ffdd42d4e9a89ce14d8a2f9 17-Jan-2012 Marc Blank <mblank@google.com> Store UI-friendly addresses in EmailProvider database

* Currently, we store a generally incompatible packed string format
for to, from, bcc, cc, and reply-to columns
* Change this to UI-compatible, comma-separated RFC822 strings
* Upgrade database to use new format

Change-Id: I42c01d72b49531c4324d3956edf5ff362d5c9120
mailProvider.java
ce1791abf3326c50da41ab3631738ff28e9a1a54 13-Jan-2012 Mindy Pereira <mindyp@google.com> Update to new message column names.

Change-Id: Ie24fc8e0529ff363dc8bf7a5f6522b601560b91a
mailProvider.java
6605115ec4bd02f9adf190e0b390ceed783bde5b 14-Jan-2012 Marc Blank <mblank@google.com> Set notify uri for queries; trigger notify on message inserts

Change-Id: I9fdf2f83670ec72937deebe352e962632f37b519
mailProvider.java
788d52d831cbc5ec0288655bee2cfe2d0616a1b1 12-Jan-2012 Marc Blank <mblank@google.com> Send new columns for message header; real data for msg counts

Change-Id: I88f560beafdf8cf9194664a63cf74436be281056
mailProvider.java
bb760d73f08041f2f2e813054a02698b3ea17960 13-Jan-2012 Marc Blank <mblank@google.com> Sort message (conversation) list properly

Change-Id: Id208890abf4c646fe8eba01bbfe22de35c610e3c
mailProvider.java
bdf32afa644f566e8be90048ed631e0e70332ac5 13-Jan-2012 Marc Blank <mblank@google.com> Hook up primitive email sending to UIProvider

Change-Id: I5fe949c3cdf3d04514976d029d966caa912ec5be
mailProvider.java
96d0323cfa841361f5a53ef96a66fad9155a5c8b 13-Jan-2012 Andy Huang <ath@google.com> remove CLIENT_CREATED usage

Change-Id: Icb102ef554e9e945bdf4866d0038892556fcf739
mailProvider.java
ca6f713e71ce3734bc688b9821fc6838b5d70de1 12-Jan-2012 Marc Blank <mblank@google.com> Oops; fix order of TABLE_NAMES

Change-Id: I994b31c05c640f61444ae3d66c5b94e1d147e698
mailProvider.java
e9e865345eb5f586e3f972db8c3c714fb6bb5aad 12-Jan-2012 Mindy Pereira <mindyp@google.com> Set c to the result of the query.

Change-Id: I5b8c935aedcdd86d756ee7de70088f2c8db179d5
mailProvider.java
0c550c343fecaec3e04fba274d1ac08bd722d311 12-Jan-2012 Marc Blank <mblank@google.com> Return "0" for unknown columns in UIProvider queries

* For now, let's avoid exceptions

Change-Id: I5758f3aefb458c00fd3fc1865e63df92e9ba1650
mailProvider.java
3594ac81469c55c1ee6ee4594c2ca52942a7c354 12-Jan-2012 Marc Blank <mblank@google.com> Implement initial UIProvider operations (UnifiedEmail)

* Add support for folder list, conversation list, and message view
queries
* Open up EmailProvider (temporarily) to allow access from
UnifiedEmail (signatures don't currently match)
* Modify make file so that we can reference definitions in
UIProvider

Change-Id: If73c59aa9edfdac5619ff2c6b9cedfdfe4e93d6f
mailProvider.java
75987dbe0ca7609bf4f11f2d7edfe4bcd70a4fe5 10-Jan-2012 Paul Westbrook <pwestbro@google.com> am 17d522b5: am 07676012: Fix widget updates

* commit '17d522b51c9aa564e1989095e0264264642c2432':
Fix widget updates
07676012f7e4060faa0d23dc6068e9dcdd4a4106 09-Jan-2012 Paul Westbrook <pwestbro@google.com> Fix widget updates

Fix widgets that stop updating. If the Launcher got killed, the Email
widget service gets unbound. When this happens the cursor loader for the
widget is stopped. Since widget is relying on the loader to update the data,
when the loader is stopped, the widget would never update.

Now when email recognizes a change, it will send a broadcast intent, which
will cause the widget service to be started, if it isn't.

Bug: 5811810
Change-Id: Ia840e58f10e780b94440119662c2e48e7785c507
mailProvider.java
idgetProvider.java
c31736c0d772b1fc4d6624a75139d99f91146563 11-Nov-2011 Marc Blank <mblank@google.com> am af637589: Fix typo in CL; sigh

* commit 'af6375894fe4b405f205a22a7ee9118a36fef428':
Fix typo in CL; sigh
af6375894fe4b405f205a22a7ee9118a36fef428 11-Nov-2011 Marc Blank <mblank@google.com> Fix typo in CL; sigh

* Facepalm

Bug: 5582884
Change-Id: I060518a4bbb2c08e1abef934c81d72ec4fbcb565
mailProvider.java
406641ce0978a3d9f7ae5e47d0528118e85a5075 09-Nov-2011 Marc Blank <mblank@google.com> am 00099da1: Merge "Make EAS Email syncable after GB/HC -> ICS upgrade" into ics-mr1

* commit '00099da1b3b9d91574187e70182e5384debb3731':
Make EAS Email syncable after GB/HC -> ICS upgrade
8ff1842ab123721b66f2ed1e14e92244a51b0b99 08-Nov-2011 Marc Blank <mblank@google.com> Make EAS Email syncable after GB/HC -> ICS upgrade

* In the same upgrade step in which we add AccountManager accounts
to IMAP/POP accounts, we now make Email syncable for EAS accounts
* This step is hit by all users upgrading from GB/HC -> ICS

Bug: 5582884

Change-Id: I11a06e2ad72ffed20c31f5d8be81705642f552a5
mailProvider.java
2736c1a11ce3ecdcd9d19aa9c324fb9ce0910c7b 20-Oct-2011 Marc Blank <mblank@google.com> Rewrite of security policy handling and service code

* Remove PolicyService APIs policiesRequired, policiesUpdated,
isSupported, clearUnsupportedPolicies, and isActiveAdmin
* Add PolicyService API setAccountPolicy, which is the sole
method by which security policies are promulgated
* Add protocolPoliciesEnabled and protocolPoliciesUnsupported
to the Policy class; these are packed, localized strings
indicating policies that the protocol itself have enabled
and/or cannot support (i.e. these are policies that are
unknown to the DPM, e.g. don't load attachments)
* Differentiate in security notifications between three kinds
of policy changes - changes that don't require user
intervention (e.g. reducing requirements), changes that
require user intervention (the legacy notification), and
changes that make the account unsyncable (e.g. the server
adding an unsupportable policy). Handle all possible policy
changes cleanly.
* Make security notifications per account (with multiple
accounts, notifications would get arbitrarily munged)
* Expose ALL enforced policies via the account settings
screen in two categories: policies enforced (including
both policies enforced by the DPM and policies enforced
by the protocol) and policies unsupported (note that these
can only be seen if policies are changed after an account
is created; we do not allow the creation of an account
when any required policies are unsupported). Add a
button that forces a sync attempt, for accounts that
are locked out, but whose policies have changed on
the server (this would otherwise require a reboot).
* Updated unit tests

Bug: 5398682
Bug: 5393724
Bug: 5379682
Change-Id: I4a3df823913a809874ed959d228177f0fc799281
mailProvider.java
a91f33b44b967496d16ef5ed443219df3d97d8c4 19-Oct-2011 Marc Blank <mblank@google.com> onMove in CachedCursor shouldn't call the underlying cursor's method

Bug: 5472277
Change-Id: Ida5a840d2d27941bb8b548a4d2d985b1082e93b6
ontentCache.java
561004883da8d1c5507c163eab7237262e4abbaf 14-Oct-2011 Ben Komalo <benkomalo@google.com> Fix widget update to properly refresh.

Bug: 5413224
Change-Id: Id66c7dc8aac8b5e24c7d5c5b1633c9c3ab981b15
idgetProvider.java
002a1802cad235ffa8f7152e0d0a5a2ebad14f63 16-Sep-2011 Ben Komalo <benkomalo@google.com> Prevent flicker in opening Email.

Welcome had some assumptions that some things had to be done
asynchronously, such as checking inbox status.
This can now be done on the UI thread and so transition into Email can
be done immediately in onCreate, except if there's reconciliating to
be done

Bug: 4599569
Change-Id: Iaaac21e73c985c60e1b7974fb0429948b35968e4
ccountReconciler.java
2c57e7036decceb3767ccc3714e9e9e417217b49 14-Sep-2011 Ben Komalo <benkomalo@google.com> Fix upgrade code.

In HC MR2 we introduced a column for a parentKey, but AFAICT, did not
use it. It was populated with a null value. The first upgrade code in
ICS assumed it was '0' which failed to upgrade it properly.

This prevents IMAP accounts from being broken when upgrading from GB ->
ICS.

Bug: 5252620
Change-Id: I000253b7c02ac1706710bdb21a820293f09cbea5
mailProvider.java
32bed4bb8e23d7322ab338773d135845f392d3cf 24-Aug-2011 Ben Komalo <benkomalo@google.com> Fix unit tests.

- make attachment download service injectable
- fix assertions for account manager account checks
- update message compose ID's so they're consistent on tablet/phone

Bug: 5198343
Change-Id: I9976f5b9e5590dd61fb0a62937d3f9203fefe236
mailProvider.java
a08f654a1a44fb87b2afbef721ec931c1faed302 05-Aug-2011 Marc Blank <mblank@google.com> Merge "Catch case where provider reports returning null in error"
577e604df009df025ae3a5c5fa151c47f7877a43 05-Aug-2011 Marc Blank <mblank@google.com> Catch case where provider reports returning null in error

* Missed this one

Change-Id: I080bd3b910827336fcfde818564067db5b4ec3cc
mailProvider.java
20b511ff6812837e7dc11db3f9ce398959307c09 02-Aug-2011 Marc Blank <mblank@google.com> Handle GB->ICS upgrade of POP3 accounts properly

* Heh.
* We were using the login from the HostAuth in creating the Account
Manager account, but it should be the email address from the
Account itself; in IMAP (and usually in POP3) these are the same
* But not for juno.com!
* Updated unit test coming in another CL (tests are broken in a
strange way, and the bug is FAST-blocker)

Bug: 5110013
Change-Id: Id11799e8b30a0420804f00c2d2f265e44e39c4c0
mailProvider.java
36aef9fb7434bb9fa01dc28038358a4d411a4f00 02-Aug-2011 Marc Blank <mblank@google.com> Add logging to v21->v22 upgrade; small cleanup

Change-Id: I6659998a3ad2490c923061aab5328469c3222e25
ccountBackupRestore.java
mailProvider.java
27a04fecfb267e3498d7e0d621443176cd6e1474 30-Jul-2011 Marc Blank <mblank@google.com> Fix EmailProvider database upgrades

* Two of the upgrades (v21->v22 and v25->v26) need to be fixed so
that they don't reference columns that might not exist.
* Oops

Bug: 4439595
Change-Id: I4a8c556be22bb85fb78807416cd1d6b81c6ef118
mailProvider.java
0306da14e33d5ba0a169be82925e797a9f03e4db 28-Jul-2011 Marc Blank <mblank@google.com> Correct recently added EmailProvider logging

Change-Id: Ica61b7bcbe455448a1a261c83defa840ab1abf3e
mailProvider.java
7390b187767b559f693666156b8ca5c7c25bcfe4 28-Jul-2011 Marc Blank <mblank@google.com> Log return of null from query()

* This shouldn't happen, but ... log it just in case

Change-Id: I8b8df3fec84c9dd14ebb222ee665b0712f63f213
mailProvider.java
7688300055a4ea84cd95768145f773d7c3259948 20-Jul-2011 Ben Komalo <benkomalo@google.com> Fix sync window settings for EAS setup on phones

- the container is the one that should be visible/gone - individual
fields should just be visible
- also do drive by javadoc fixes

Bug: 5052310
Change-Id: I45c4b6b7f94b2b62ac94eeff0ab97bf34c9e117a
ccountReconciler.java
aca94265813e72e692eace527f43eb4c02b09c76 20-Jul-2011 Marc Blank <mblank@google.com> Remove NotificationService; use Account columns for data storage

Bug: 5023662
Change-Id: I84df3b474dd6320327851003af985144cc16348e
mailProvider.java
4e4aba9ebc43c6a83190f3a883fa05bb7d5100b3 19-Jul-2011 Marc Blank <mblank@google.com> Clean up account reconciliation

* Move AccountReconciler to the Email app (from EmailCommon)
* Ensure that Controller.deleteAccountSync() performs ALL actions
needed to clean up after an account deletion (delete attachment
files, reset policies, refresh the UI, etc.)
* Add reconcileAccounts() API to AccountService
* Remove accountDeleted() and restoreAccountsIfNeede() from the
AccountService API
* Remove unused callback

Bug: 4883073
Bug: 4767084

Change-Id: I43ffaf009db1a6f306bb0f2a74fb4dd3b2c4b966
ccountReconciler.java
b2a8c2ce4c617d59cb4876951cb952fc97e8382b 15-Jul-2011 Marc Blank <mblank@google.com> Start/stop AttachmentDownloadService as needed

Bug: 5033646
Change-Id: Ic0e75b28d0d8d5665c3f3ca864a9532fee05df8c
mailProvider.java
4de538be2d17545fb63e781412b8565f0d0d97d4 13-Jul-2011 Ben Komalo <benkomalo@google.com> Prevent account flip flopping from compose

There were two issues:
- the default account ID from the provider wasn't consistent: it was
using a snapshot from the cached data but that simply returns a Map, and
the values aren't guaranteed to be sorted (and indeed I saw that the
order was different on consecutive calls!)
- hitting app up from Compose always just kicked you out to the inbox
for the default account, but it probably should have used the account of
the compose screen, since it can be specified in the Intent

Bug: 5012008
Change-Id: Ic9a753b261e047790453bc1a9417bc0c6d2f87f9
mailProvider.java
2bdf7ee0f0f4a2b11b5f7c0f8b193080600fefd8 01-Jul-2011 Marc Blank <mblank@google.com> Delete orphaned mailboxes/messages/policies at provider startup

Bug: 4972132

Change-Id: Icc756a9e28b77de052261903089b040d229e7b5d
mailProvider.java
c0a9fa9c68a92bb8971b3506ba390ea20f424213 28-Jun-2011 Marc Blank <mblank@google.com> Fix NPE

Bug: 4969186
Change-Id: I27fbdf7a496ee73caf36a90bf56b91c90133b3b7
mailProvider.java
5d7ff8577d7efd938390ddc5d5476717203d0a55 28-Jun-2011 Marc Blank <mblank@google.com> Synchronize access to mailbox type map

Bug: 4967543
Change-Id: I71380d0d2d5664cf92a9b698bfdad516eeb5c80f
mailProvider.java
9a01353f14f718c5447d6a3dc25b413be0f175d9 23-Jun-2011 Marc Blank <mblank@google.com> New search implementation for IMAP in MessagingController

* Add protocolSearchInfo column to Message table; this can be used
to store information related to search results. For IMAP, we
store the serverId of the mailbox that the message lives in on
the server
* Add upgrade code for this column
* Change MessagingController to use the proper serverId for remote
operations, depending on whether the Message is a search result
or not
* Fix some smaller issues with earlier code

Change-Id: I0c7f1d89a4659b95701d02646c0e8426680e2f6a
mailProvider.java
deb345acebce19996726262f7825c39a784b9fa8 23-Jun-2011 Marc Blank <mblank@google.com> Support FLAG_SUPPORTS_SEARCH for IMAP accounts

* Update existing database to add this flag for IMAP accounts
* Set flag when creating IMAP accounts
* Change temporary UI to use the flag exclusively

Change-Id: Idefccd3a74d2222fe8a0ba47116dee981a0ae1f5
mailProvider.java
c09ca39cde44bcb18e9a4d9c7cc3c6f7ee4297eb 23-Jun-2011 Marc Blank <mblank@google.com> When looking for default account, check for empty cursors

* At present, we will cache empty cursors (i.e. where the query
result had zero rows)
* If a widget (or shortcut) references a deleted account, this will
create a cached entry for that account, and the defaultAccountId
code will try to retrieve the isDefault column from that (empty)
cursor
* To fix this, we simply skip over empty cursors when looking for
a default account
* We will also look into whether it makes sense to cache zero-
length cursors

Bug: 4883043
Change-Id: Id998506f77bd6cda6cb1f5d8ce65d689dde4d2c5
mailProvider.java
63537746479f4b65517bd217c1a5f76d697367eb 23-Jun-2011 Marc Blank <mblank@google.com> Fix problem with getDefaultAccountId() with no explicit default

* This wasn't working with the new code and the unit test wasn't
testing this case.
* Updated code in EmailProvider and added a test case

Change-Id: I75c23423c4f43e4201d446886d92a5312fa8a084
mailProvider.java
d12f78d6bac81590f97fc190723865ffe65e5d69 22-Jun-2011 Marc Blank <mblank@google.com> Fix cursor-related errors:

1) Have CachedCursor implement CrossProcessCursor; still need to
figure out how this ever worked
2) Close cursor used internally in findMailboxOfType

Bug: 4869024
Change-Id: Id20d37b7b83e133aa4d5fe9293a42ae217024f01
ontentCache.java
6e418aa41a17136be0dddb816d843428a0a1e722 19-Jun-2011 Marc Blank <mblank@google.com> Improve EmailContent caching...

* Guarantee that up to 16 Account (with HostAuths), and Policy rows
are always cached. Also, 6 commonly used Mailboxes per Account
(Inbox, Outbox, Drafts, Sent, Trash, and Search)
* Precache these rows when EmailProvider starts up
* Ensure that newly added, precachable rows are cached when created
* Clean up some inefficient/wrong caching code
* Fix a commonly called method in NotificationManager in which we
load a single Mailbox row using selection vs withAppendedId
* Confirm that we don't read from the database in typical use and
heavy message loading
* Add a special URI for finding mailbox by type (using the cache)
* Add special-case code for EmailContent.count(Account.CONTENT_URI)
which is used in a number of places (including on the UI thread)
and whose value is easily determined
* Add a special URI to get the default account id
* Confirm that all unit tests work

The goal here is to be able to load all Account, HostAuth, Policy,
and Mailbox objects (by id) without worrying about disk access.
There will still be a single disk read for uncommon Mailbox reads,
but this should be considered acceptable.

Change-Id: Ibc9aa7acc73185e360b0b6f3053b90a985e97210
TODO: Unit tests
ontentCache.java
mailProvider.java
369905c95d8b069205f30726edc54122e6bc388f 21-Jun-2011 Makoto Onuki <omakoto@google.com> Fix crashing tests

Some of the tests are still failing, but at least now we can go through till
the end.

- Fixed NPE in WelcomeTests (caused by the mock context not returning a proper
layout inflator.)
- Removed the rainy day test from MessageFileViewTest.
(Not setting a proper intent will result in the argument check in
MessageFileViewFragment)
- Removed unnecessary null check in EmailProvider.getDatabase()

Bug 4766072

Change-Id: I48b92cc91d0417cd9980c131fda8f63a9a6eb990
mailProvider.java
09a0e9b5dca78244e3cc365d99263e7c2402b25d 21-Jun-2011 Makoto Onuki <omakoto@google.com> Merge "Move restore account to EmailProvider."
9dad9ad973ccf8255228a41acc0ee78af989a651 21-Jun-2011 Makoto Onuki <omakoto@google.com> Move restore account to EmailProvider.

In order to reduce the UI initialization code, move
let EmailProvider restore accounts when it opens the DB.

Backup can be moved too, but I just leave it as a TODO.

Change-Id: Id5c1810904db6abaecbfecbaa8d2d53834ebf07b
ccountBackupRestore.java
mailProvider.java
5a3888f35b669ffb3cc785d7dfe4862879a3896c 01-Jun-2011 Jorge Lugo <jlugo@google.com> Added quick responses.

Added "Insert quick response" button to MessageCompose's action bar. Clicking
it opens dialog with available quick responses. Selecting one of the responses
will insert it into message body at the current cursor location. Also added
menu in account preferences to create, edit, and delete quick responses.

Change-Id: I85f3f6b36801cf112ec9d7c31135a917456173d7
mailProvider.java
f5418f1f93b02e7fab9f15eb201800b65510998e 14-Jun-2011 Marc Blank <mblank@google.com> Move Account into its own top-level class

Change-Id: Ide7c991b7d4d418dbe17164421425bf898ba64ee
ccountBackupRestore.java
mailProvider.java
3161f1a3f21d7ae7eea5bfa00c12004150195e21 08-Jun-2011 Todd Kennedy <toddke@google.com> Merge "Lock cache puts while running tests"
78849fd388041d8727325aa654de31dcb8088786 08-Jun-2011 Todd Kennedy <toddke@google.com> Lock cache puts while running tests

Change-Id: I04c88ee70f9d72252fd1c5114d560a28fcee1b56
ontentCache.java
313586c8eb4e23ceec068b82f3dc0be1c8a7045f 07-Jun-2011 Ben Komalo <benkomalo@google.com> Introduce client cert alias for HostAuth.

Some email servers require client certificates to be presented to
establish an SSL connection. While this certificate will be maintained
by the system key store, we need to store the "alias" of the certificate
stored in that system store.

Wiring up to use the actual alias will be done in future CL's. It is
currently unused.

Change-Id: I8d1290151342daea9ceb0df8a4088405b44faa81
mailProvider.java
2e112b2d12c85d47e85fc821e3cee74c295c6c52 04-Jun-2011 Todd Kennedy <toddke@google.com> Add new column to table creation method

Change-Id: I2c6fe80d06e54dbd10eba41f0a0aa758baffb1b0
mailProvider.java
9dcb72e1ecca83178c3af07f105c2ec12526a52c 03-Jun-2011 Todd Kennedy <toddke@google.com> Add "lastTouchedTime" column to the mailbox table

The last touched time will track the last time a message within that mailbox
was read. This will be used for the recent list.

Change-Id: I97a5fda52fd09b416fc3278a11a87b807da05c9c
mailProvider.java
7f4cf3c46b0dd1bc001c547807e83b7c280f074b 02-Jun-2011 Todd Kennedy <toddke@google.com> Hook account/mailbox picker to widget

now when adding a widget to the desktop, you can pick the account
and mailbox.

Change-Id: Id3d2c21b349af58459304ac5a068402d67f4d0f7
idgetProvider.java
44f5cd67c97da6a5c7e63a73b4dca7057b83cdbb 01-Jun-2011 Todd Kennedy <toddke@google.com> Remove widget views

The new widget UX allows for a single display mode for the widget. This can
be configured when the widget is added or at a later time during widget
re-configuration.

We don't have the configuration activity (yet). We first need to restructure
the widget to take a single account / mailbox combination. Hooking up the
configuration activity will occur in a future CL.

Change-Id: I38a5796c44938a6abd0d2bb50ac77241cc86a497
idgetProvider.java
98108f2e0e472861fe72c7cc9b6cd602a94643c4 27-May-2011 Todd Kennedy <toddke@google.com> Use standard widget call backs

Instead of overriding onReceive() and processing messages ourselves, we should
be overriding the standard widget call back methods, onUpdate(), etc...

Also added a deleteWidgets() method in the widget manager to maintain beter
symetry between create & delete.

Change-Id: Idc84bf220a1e14776a080cfee0b28df39f9a1450
idgetProvider.java
f3ff0ba91076ef1fb087fc30fe65d9504011c2b3 19-May-2011 Marc Blank <mblank@google.com> Create AccountManager acct for pop/imap on upgrade from GB

* Also, unit test for upgrade path

Bug: 4439595
Change-Id: I508a3d8ea70c1a894a412528314e42a39f3ae0e7
mailProvider.java
12b82d9374947c9268217f45befe8a74bd9b60d7 20-May-2011 Ben Komalo <benkomalo@google.com> Move HostAuth to top level class.

No other changes made.

Change-Id: I1c6497c98abc0f99443ea42d8aed6295b263c123
mailProvider.java
53ea83ebf91f820692e8fa8e781f5cc982dd94db 14-May-2011 Ben Komalo <benkomalo@google.com> Move Mailbox to top level class.

No other changes made.

Change-Id: I3d8f3c521dc0d902be313b25252b4b6a4a96e7ee
mailProvider.java
bfac9f2e8a13f6c719608a6948203bbef921c99f 13-May-2011 Makoto Onuki <omakoto@google.com> Move some of the log constants from Email to Logging

Change-Id: If9f4e4e3adcdef897a0d6a4e153bb446a8b24fdd
mailProvider.java
e7fb4ac9e3b098ece98d004403a89652f88bbe7a 12-May-2011 Todd Kennedy <toddke@google.com> Add account observer to NotificationController

The notification controller now observes changes to the account database and
adds or removes message observers as appropriate.

Change-Id: I1670fcfd6ce744030199b86708a6ada55b239a84
mailProvider.java
0993190cafebc107bd27a26996b5d63d4a4ede10 06-May-2011 Marc Blank <mblank@google.com> Complete rewrite of account backup/restore code

* Use EmailProvider to backup/restore into a backup database
* Remove all of the old AccountBackupRestore code
* Get rid of the legacy Account class and all of the Preferences
crap that referenced it
* Remove corresponding tests

Change-Id: I2de75aafdacc87246174303961e58547303f641e
ccountBackupRestore.java
mailProvider.java
a9ac20b96f8d2e2e97fb2878afb9df4795024450 06-May-2011 Todd Kennedy <toddke@google.com> Add lastSeenMessageKey column to the mailbox table

The last seen message key is the id of the last message that we've "seen" for
that mailbox

Change-Id: I197f8a191654225ada1ce553cc959db775809c88
mailProvider.java
bf30f94c2e47a2f3340362060365809bf9258260 06-May-2011 Todd Kennedy <toddke@google.com> Add operation and id to notification URI

In order to provide a bit more granularity for content observers, we add the
operation (e.g. "insert", "remove" or "update") as well as the id of the row
that has changed (if it's known).

Change-Id: I214d3c030872f888cde1a2db9b6b46f1bb121b7a
mailProvider.java
c4cdb11d24c19428dd39f986b00c1a29e75e1505 03-May-2011 Todd Kennedy <toddke@google.com> Remove notification if messages seen off device

If we receive new messages, we may display a notification to the user. If
those same messages are read elsewhere (i.e. via a web client), we will
remove the notification.

Change-Id: Iba09afe01942e0deaac8210fd6f9b315b1c8c93f
mailProvider.java
f91a03f5203bb64ae0726596d65ac90c35088666 05-May-2011 Marc Blank <mblank@google.com> Add new policies to Policy and associated data structures

* Update Policy unit test

Change-Id: I24a980537a73e40fca9fceb1b6ad6b2feaa9c342
mailProvider.java
647007c31b080d992ebdcb2409e3bc14b0c2646f 04-May-2011 Marc Blank <mblank@google.com> Remove scalpel left in patient

Change-Id: Iea55718a815cf3eafdd2b506637c96aeac8e7cb2
mailProvider.java
aeee10e57ef4d931e7708fde218d590453a82aea 28-Apr-2011 Marc Blank <mblank@google.com> Rework of security policy storage

* Replace crazy (and soon to be "full") bit fields stored in an account's
securityFlags with a row in a newly created Policy table (thus, fully
expandable)
* Update code from database version 17 to 18; adds Policy table, a
policyKey row in Account, and a revised trigger that deletes Policy
information for deleted Accounts
* Update old PolicySet unit tests to work against the new Policy class
* Add test for the conversion of securityFlags to Policy
* Tested in a variety of scenarios; appears to be functionally equivalent

Change-Id: I1505ee75230d6a0d3c2b62a46326f39c2c7f9eb5
mailProvider.java
22208771b7b39c5d131372ba6bc45ab23cc22232 23-Apr-2011 Todd Kennedy <toddke@google.com> Add hierarchical folders to IMAP

We now create folder hierarcies for IMAP. This also includes a nifty SQL
statement that will get your existing database into shape.

Change-Id: If07a0632e9b250cf0c33c3e16bfba5816beab94c
mailProvider.java
e36648697f242991a8df0fdc6b23330f7be5e331 20-Apr-2011 Ben Komalo <benkomalo@google.com> Fix apk attachments so they can be installed

This introduces an in-memory cache of file paths for an attachment so
that we can install from a filepath instead of a content URI.
The cache also allows us to prevent duplicated files made if the user
hits save multiple times (the save button is disabled).

Bug: 3338997
Change-Id: I56651a55eef2f1a3f24b6d936c37736c4fc3d295
ttachmentProvider.java
3a58509b2ad7b6f946eb0a4a7b0f75ece6d6a46f 01-Mar-2011 Andy Stadler <stadler@google.com> Add parent key to Mailbox schema

Bug: 2028418
Change-Id: I79d48befe7754692a3cab6c8851105bb399431f5
mailProvider.java
5d29dac8065e75b040aeb29401630fd65fedb9fc 26-Feb-2011 Jesse Wilson <jessewilson@google.com> React to LruCache.entryEvicted renamed to LruCache.entryRemoved

Change-Id: Iab20ce0386ee4dabc8490dbde5cd2208626c293c
http://b/3461302
ontentCache.java
dc78a769fce18d259eccc602c4623fa74cdf5319 14-Feb-2011 Marc Blank <mblank@google.com> Email split, part dix

* The coup de grâce for Exchange in Email
* Remove Exchange bits from AndroidManifest
* Update Android.mk to create static jar for emailcommon
* Delete all com.android.exchange files
* Delete all exchange-only strings
* Change loadAttachment service method to take only attachment id and
background flag
* Add code to AttachmentProvider.openFile() that opens an output file
for attachment writes
* Make sure deviceId is determined in Email app (not Exchange)

Bug: 3442973
Change-Id: I775600252fd121f474d51cb26fefbfcc50e387af
ttachmentProvider.java
d75968acfb8da34c1927616a069a06f59c2ad101 16-Feb-2011 Jesse Wilson <jessewilson@google.com> Merge "Adopt LruCache in Email's ContentCache."
3a5c1fb274a9ce72d708d88509bf2607cb018ddd 13-Feb-2011 Marc Blank <mblank@google.com> Email split, part neuf: Setup, logging, attachment glue

* Make "Exchange" option in account setup depend upon availability of the
Exchange EmailService
* Make presence of Exchange logging depend upon availability of the
Exchange EmailService
* Make AttachmentDownloadService use service rather than ExchangeService
class
* Move SSLUtils to emailcommon/utility
* Move account manager type defs to emailcommon/AccountManagerTypes
* Update proguard.flags
* This is the penultimate CL for the Email package itself; the next CL
creates a clean, SDK-compatible Email application

Bug: 3442973
Change-Id: I9162cf5fa6b5a043ded0fdd1e25fd3ce5948ad8f
mailProvider.java
31d9acbf0623872f9d4a2b3210b5970854b654c7 12-Feb-2011 Marc Blank <mblank@google.com> Email split, part huit: Refactor constants, clean emailcommon

* There are three pieces to this CL (sorry):
1) Move and/or rename some constants into emailcommon
2) Move Utility to emailcommon, moving the few UI
related utilities back into Email (FolderProperties
and UiUtilities)
3) Remove all references to resources from emailcommon
* The three pieces relate in that, between them, they allow
the emailcommon static library to compile cleanly

Bug: 3442973

Change-Id: Ic5e3abaa2a1b36999e0b6653c6c2134ea1bd544f
ttachmentProvider.java
mailProvider.java
92ab6db38dcf15f6935463845fc4fa749a292b3a 11-Feb-2011 Jesse Wilson <jessewilson@google.com> Adopt LruCache in Email's ContentCache.

LruCache simply wraps LinkedHashMap for a better API.
Performance/hit rate should not be impacted.

Tracking bug: http://b/3184897

Change-Id: Icbac38d3cea5f8c522df7a883d8e74a8f3786b92
ontentCache.java
a7bc0319a75184ad706bb35c049af107ac3688e6 10-Feb-2011 Marc Blank <mblank@google.com> Email split, part six: EmailContent

* Moved EmailContent to emailcommon

Change-Id: Ib3db1bfcfe74554c0e5afd3cfce6d72f26e9aeb9
ttachmentProvider.java
mailContent.aidl
mailContent.java
mailProvider.java
2193962ca2b3157e79f731736afa2a0c972e778a 10-Feb-2011 Marc Blank <mblank@google.com> Email split, part quatre: Move along, nothing to see here

* No code was harmed, er, changed in the making of this CL
* All that's happened is that code that is needed by both Email and
Exchange have been moved into emailcommon
* This required import changes to many files, which explains the
length of the CL

Change-Id: I4e12455ba057a4a8054fdbd0b578c73afa411c8a
ttachmentProvider.java
mailContent.java
8a574694606f0e5d781334d0d426fc379c51f3ed 09-Feb-2011 Marc Blank <mblank@google.com> Email split, part trois: AccountService

* Create AccountService.aidl and AccountServiceProxy in emailcommon
* Implement AccountService in email
* Use AccountServiceProxy in Exchange for account reconciliation,
notifications, etc.
* Move sync window constants into emailcommon
* Split attachment provider utilities and constants into emailcommon

Bug: 3442973
Change-Id: I89dce28b799b193243c07774dab65d830ae62775
ttachmentProvider.java
8cc2fc51014d1acaf4d3a2a89fed1cff6ad7b18a 08-Feb-2011 Todd Kennedy <toddke@google.com> Merge "Fix attachment mime type unit tests"
314a51cb1d5bc538f069b6b13d8dffd575a5cc44 08-Feb-2011 Makoto Onuki <omakoto@google.com> Refactoring widget

- Moved to com.android.email.widget
- Extracted nested classes to top-level classes
- Some small clean-ups.
- WidgetProvider and WidgetProvider$WidgetService are left in the original
package to keep compatibility with honeycomb (3.0) release.

This CL is supposed to be pure-refactoring. There should be no
functionality changes.

Change-Id: I37acaa24b6b488724750c0f33374b31fcc433f11
idgetProvider.java
8586532f3ecb4dad4f25d82ad7d6ce345ced9bf1 08-Feb-2011 Todd Kennedy <toddke@google.com> Fix attachment mime type unit tests

Attachments with no extension and mime type of text/plain need to return the
mime type of "text/plain" instead of "application/octet-stream"

bug 3428076

Change-Id: I00452c908ac0672879d42f4ed9ee574e376eac9f
ttachmentProvider.java
433d500cb98029c0c1994b8aa341b890ae4df428 07-Feb-2011 Marc Blank <mblank@google.com> Merge "Show smart forward attachments in MessageCompose"
5e39f90e9d4665713eba38586b08546f1d581adb 02-Feb-2011 Todd Kennedy <toddke@google.com> Resolve build warnings; part 4

Fix unchecked warnings

Change-Id: I872740fca4e5050e6ed2922eabc7e46e5e97ff3c
mailContent.java
3aee641aab491a3da53364aafb9074ae69dd2212 26-Jan-2011 Jesse Wilson <jessewilson@google.com> Use a field rather than a superclass for ContentCache's cache.

This makes it easier for cache experiments to swap out the
LinkedHashMap for another cache.

http://b/3184897
Change-Id: Iacdb266e41f5a98efd9bb30bc09ff8fff5a0a5a9
ontentCache.java
f1b510462fad73de1e7f7bfad2f0637c9cf65cd7 01-Feb-2011 Todd Kennedy <toddke@google.com> Fix ConcurrentAccessException in unit tests

The ContentCache is now an LRU cache. This means we must NOT access the cache
while using any iterator over the cache. In this case, we were calling get()
using an iterator of cache keys.

Change-Id: I2d1feabff7474b6f2a230b98f97df067ab7ccd9c
ontentCache.java
34512ba6303bdce1b7699bbd3c645ff9eb1692e1 30-Jan-2011 Andy Stadler <stadler@google.com> am 809cd769: am 0e3a0331: Widget: Max out message count at 999+

* commit '809cd769390aa503ad90e5b8bce1594f92a2479f':
Widget: Max out message count at 999+
0e3a03317b1aebd168fb1bf41b3656e7dc6a1c89 30-Jan-2011 Andy Stadler <stadler@google.com> Widget: Max out message count at 999+

Bug 3403158

Change-Id: I1daf0c62684bad83a69e19c39ffe1b8df899d077
idgetProvider.java
a86265e8e5e72c61a0eafd966ca02b8438c10798 29-Jan-2011 Marc Blank <mblank@google.com> am 9a09129d: am 1122e0f6: Merge "Remove cache statistics logging" into honeycomb

* commit '9a09129d0928712ad84a11027812ff0a63afed4a':
Remove cache statistics logging
f40294e1aac1f7cd92c02d8a39edc40676fe3c55 28-Jan-2011 Marc Blank <mblank@google.com> Remove cache statistics logging

* Use static final flag to control this
* Set flag to false for all commits

Bug: 3403725
Change-Id: I70c89aaf2f0b226206e505a14e9a8f1ed2ebb51a
ontentCache.java
d07a2312b7c0af9f8bffb397f98825c65bb7d924 28-Jan-2011 Marc Blank <mblank@google.com> Merge "Make ContentCache LRU, rather than LRI"
50c7d755a70895cfaa927e52c23bf0b0d2512797 28-Jan-2011 Marc Blank <mblank@google.com> Make ContentCache LRU, rather than LRI

Bug: 3403111
Change-Id: I12993a8185db1bebe760f8bd1a8d22683bcdddc3
ontentCache.java
fe9db1783117a4942efbc71da8a1538ec25bf33d 27-Jan-2011 Marc Blank <mblank@google.com> Show smart forward attachments in MessageCompose

Bug: 3367188
Change-Id: I59dae9781be59eebe3a68769138e8253a24455e6
mailContent.java
6c5ee59c4fcd5cb2992a53234245df8faeaf8a5d 26-Jan-2011 Todd Kennedy <toddke@google.com> Add "tap to configure" text to widget

If there are no email accounts defined, the widget should show a single string
that allows the user to create a new account. Whenever there are changes to
the defined accounts, the widget(s) will update their headers to ensure they
are only displaying valid information.

bug 3296594

Change-Id: I156c20cfc90692174297a2aededd85775e0ea196
idgetProvider.java
adbd22c9bed1e45e26130f32a684aa29676537dc 25-Jan-2011 Todd Kennedy <toddke@google.com> Merge "Infer attachment's mime type if it's text/plain" into honeycomb
b3740d227ee0eede878d97654d180f781d591da0 25-Jan-2011 Todd Kennedy <toddke@google.com> Merge "Only show loaded messages in widget" into honeycomb
34212cc7df317a058a3f9860fc0e7de508cb7120 25-Jan-2011 Todd Kennedy <toddke@google.com> Infer attachment's mime type if it's text/plain

If the server reports an attachment's mime type as either text/plain or
application/octet-stream, we will try to infer the real mime type using
the attachment's extension. If one cannot be found, we either synthesize
it (if original mime type is application-octet-stream), or, we use the
server specified mime type (if the original is text/plain).

bug 3379416

Change-Id: I331e767ed36e4e17756025cc816bdb7b5a8f0868
ttachmentProvider.java
543953ad87a12d251fcec82c57d00383225b4149 24-Jan-2011 Todd Kennedy <toddke@google.com> Only show loaded messages in widget

The various selection strings were missing a test to only show messages that
have been loaded. This is only important for POP3 accounts.

bug 3377041

Change-Id: I3efe366d09dd547878dc0bf57dff58f76de5cca9
mailContent.java
9128217da1f8ae53f1c44f369934ff075ae5057b 25-Jan-2011 Andy Stadler <stadler@google.com> Merge forward small bug found in password storage

While fixing bug 2981433 in Gingerbread, I discovered one additional
place where passwords were being trimmed. This brings the fix forward
into honeycomb, as well as a new unit test for the fix.

Bug: 2981433
Change-Id: I566f5c0c6693ca7c0069bca9e74f320fca48e600
mailContent.java
751e4b2d9509b63bcdd3c8780afa82b67b99d7d4 21-Jan-2011 Todd Kennedy <toddke@google.com> Prevent auto-download of attachments not in an inbox

When creating the list of attachments to be automatically downloaded in the
background, exclude any attachments that are not in an inbox. Also added unit
tests to ensure the query URIs behave as expected.

NOTE: This is a partial fix for general background attachment downloading issues

bug 3373982

Change-Id: I13ef56cd280c028fa966ab9e655acce28b0b9b91
mailContent.java
6833fd5ab6c1e23c0bf2005dec2950796a040781 21-Jan-2011 Makoto Onuki <omakoto@google.com> AttachmentProvider: Always return mime-types in lowercase

Intent-filter's mime-type matching is case-sensitive. We should always use
lowercase letters.

Bug 3375709

Change-Id: Idd4abb41f94c816a5b9150aef5859dd75487a042
ttachmentProvider.java
02ba344cf2489dba81058e25e3202f2898360083 20-Jan-2011 Todd Kennedy <toddke@google.com> Only show messages from inbox for account & unread views

Use a sub-selection to limit the messages from the inbox. Also add a unit
test to ensure the selections are working correctly.

bug 3368613

Change-Id: Ia24ef6028ded27c69f982ecbc6b67f35f84d1b6d
mailContent.java
idgetProvider.java
a33c0c74cc5fd5230b555bd1311ba92fb5d81d22 19-Jan-2011 Todd Kennedy <toddke@google.com> Revert string name change

to prevent churn for the translators, revert the string name change

Change-Id: I22710d810a5f3602ccd53a9cb4d2f31edca572f1
idgetProvider.java
e539a1973ee6d71e2386b98c88bc6ec989dd5647 19-Jan-2011 Makoto Onuki <omakoto@google.com> Merge "Dump widget state to bugreport" into honeycomb
dc200a44a92013d2d1fd2b22ae857389fa95d5ca 19-Jan-2011 Makoto Onuki <omakoto@google.com> Dump widget state to bugreport

This might be helpful someday...

Change-Id: I5a9e0a2948c7ea9fa5c9a7da61d143c10dda7d9a
idgetProvider.java
3db3e4b795c08122d1c9d4fc105150231795448b 19-Jan-2011 Todd Kennedy <toddke@google.com> widget combined inbox view only shows messages in inbox

instead of showing all messages (e.g. messages in drafts, etc...) the "combined
inbox" view now only messages in the inbox folder. This is now identical to
the "combined inbox" view available in the full email UI.

bug 3368613

Change-Id: I0080b56cd2718a3dce82b279277c63c4f43e86dc
idgetProvider.java
290fb65595e08680a53ab77f54c21e7c9a380da0 18-Jan-2011 Todd Kennedy <toddke@google.com> Update widget colours / assets according to spec

* Modified font colours for read/un-read emails
* Add chip colours when viewing mail from multiple accounts
* Add calendar icon if message has an invite attachment
* Update background of read/un-read emails

bug 3351761

Change-Id: Id59573d25a6988e9e869335f95778aad28b43912
idgetProvider.java
cb8a5544bfb2389ebd735f1575b481000d802eb4 19-Jan-2011 Winson Chung <winsonc@google.com> Updating widget due to API changes.

Change-Id: I8623c48e912330145cfd325c962574d322ccc6f0
idgetProvider.java
946239e8a0e01c628fae61894d3d48248b74cefc 18-Jan-2011 Andy Stadler <stadler@google.com> Add per-account preference for bkgnd attachments

* Add flag to Account record
* Add checkbox to Account Settings (IMAP & EAS)
* Add checkbox to Account Setup (IMAP & EAS)
* Add flag to backup/restore logic
* Update Account & AccountSetupOptions unit tests

Bug: 3360873
Change-Id: I0c407776ede4110f33716644f6f027938f21130a
mailContent.java
d072f9905d8572f454be1f2ea5d7ba173d2b57d1 13-Jan-2011 Makoto Onuki <omakoto@google.com> Don't show trashed messages in Starred mailbox

Also show the *total* starred message count (excluding trashed starred)
in the mailbox list, not *per-account* starred count.

Bug 3346872
Bug 2149412

Change-Id: I2274f215f994b62280ac6138982b927cec22c677
mailContent.java
idgetProvider.java
055dd6be8643727fa1bcf197f5e8438438f28284 13-Jan-2011 Marc Blank <mblank@google.com> Cleanup WidgetProvider

* Remove STOPSHIPs
* Don't use startService calls

Bug: 3341494
Bug: 3342662
Change-Id: I46fd60db40cf3476255f1af795da0b2a4bc34a7e
idgetProvider.java
e5d9691ec5651d2da6555cb4fe2b0e3639bb4240 12-Jan-2011 Makoto Onuki <omakoto@google.com> Merge "Don't show starred mailbox, if account has no starred" into honeycomb
1268bef712f13e19d7c5b94991c6eb7d800ea77a 12-Jan-2011 Marc Blank <mblank@google.com> Fix broken widget display (typo)

Bug: 3329906
Bug: 3342305
Change-Id: I1c1f2ae78ba86b28923d4fd9c7c390425de83af1
idgetProvider.java
9c0da8b84f2e52b38134719fcbf80c9d3c777970 12-Jan-2011 Makoto Onuki <omakoto@google.com> Don't show starred mailbox, if account has no starred

Bug 3334963

Change-Id: I751e56731b990a6e94b8547a577a84c1a848cbc7
mailContent.java
86753bc41c3957b3bba49846f6603ed29f13c84e 11-Jan-2011 Andy Stadler <stadler@google.com> Update file type acceptance rules

* Open up all types for view/save rules
* Add anti-malware block list (based on extensions)
* Clean up code that shows/hides view & save buttons
* Redo handling of load/cancel 1sec timer
* Unit test for new little utility
* Allow larger items when on wifi

Bug: 3338984
Bug: 3334950
Bug: 3338988
Bug: 3340835

Change-Id: I991135636d507f2660e2860720dbed21bd1a955b
ttachmentProvider.java
3d87da33b8426af3813f81b0569405120dedf4f6 11-Jan-2011 Marc Blank <mblank@google.com> Merge "Add logging for widget view switching" into honeycomb
7fbe563f510eb3583f617b583ff126167e1cac14 11-Jan-2011 Marc Blank <mblank@google.com> Add logging for widget view switching

Change-Id: I5e39ffffa0860fb43a503e4ec00ddad8003f5ef4
idgetProvider.java
26cf5639e0e6677ee09a9aebd753d7e6e708da24 10-Jan-2011 Marc Blank <mblank@google.com> Remove STOPSHIP from WidgetProvider

Bug: 3335070
Change-Id: I838d5eeb795759da30946fbdb00fa3f0e4dbdb12
idgetProvider.java
d6ce2998f7cfae510ccc2af72aa729aafc7a40ef 08-Jan-2011 Marc Blank <mblank@google.com> Merge "Fix widget view switching with > 1 account" into honeycomb
dc3f9f4d698267f8b2d44127d6c7bc8c1f450aba 07-Jan-2011 Marc Blank <mblank@google.com> Fix widget view switching with > 1 account

* Add test case for view switching

Bug: 3329906
Change-Id: I738bad118d7d7a8d2839fbd2a9fdc00af2af3153
idgetProvider.java
201a24f51e166f66f99c17da3356aa4fdb7fa54d 06-Jan-2011 Andy Stadler <stadler@google.com> Harden MailService against half-created accounts

* Add simple sanity checks to scanned accounts, skip over if bad
* Fix existing unit tests and add new unit test for this change
* Also fixed minor bug in EmailContent that was never triggered in
production code (only discovered it via a unit test).
* Also fixed minor bug in an existing unit test

Bug: 2937595
Change-Id: Id60bbb5d8bd923db043d46891c7f89d7debb0a11
mailContent.java
d306ba34387f3a7e77a4b8d98c6ac45cc14b95ad 30-Dec-2010 Marc Blank <mblank@google.com> Handle query with an id of -1 more gracefully

* In query of an otherwise valid URI with -1 as an id, simply return
an empty cursor
* Add unit test to verify proper handling of invalid uri's

Bug: 3183245
Bug: 3292080

Change-Id: Ia0c35cbd0f5dd0dc4a8fc794226399644cf1fe13
mailProvider.java
1c1bd6a3eb2b7d99e30713648616c807ae20cbb5 30-Dec-2010 Marc Blank <mblank@google.com> Fix typo in debug code

Change-Id: Iffb3effa3fd659be3df3208bb587fea83bc9116e
mailProvider.java
788408dee4ef861a5b3196992984d7aad4889992 26-Dec-2010 Marc Blank <mblank@google.com> Fix synchronization issue w/ closing CachedCursor

Bug: 3306031

Change-Id: I3000cf92c27e93b2df94799492fb9960a3d795dc
ontentCache.java
66b6b956464a4ad357d4273b387f6a128e8add24 21-Dec-2010 Marc Blank <mblank@google.com> Put individual account inboxes in widget rotation

Change-Id: If1fddc107d9934849bbf273a67dd1db9c2063d99
idgetProvider.java
d9b251d23b30e25cf388fbbc1a9bdbb3f7caeebd 20-Dec-2010 Marc Blank <mblank@google.com> Properly return zero-count cursor from getMatrixCursor

Change-Id: I574528bf56b5a82ecbaab3d3501b26e7afb974ec
ontentCache.java
0fd8ae8808562fffb805f3c1206be286d7732e20 17-Dec-2010 Marc Blank <mblank@google.com> Pixel perfect Email widget

* Functionally correct and pixel perfect
* All current assets in place

Bug: 3292507
Bug: 3284201
Bug: 3135118
Bug: 3255036
Bug: 3252913

Change-Id: I8fa6752748c74b3a9789a3675da12f6c0c11975f
idgetProvider.java
f995f680a8ceb4a61a6f0db7324d558fc204a8fa 17-Dec-2010 Marc Blank <mblank@google.com> Merge "Throw exception on illegal URI's in EmailProvider operations"
e6a22dff397e6453e1f56518d840c0bdd11f673b 16-Dec-2010 Marc Blank <mblank@google.com> Throw exception on illegal URI's in EmailProvider operations

Change-Id: I6354c03e7cead81df3764b7d0bd1be0e90271664
mailProvider.java
497039234182170ada90e63e96650b5675429ff5 16-Dec-2010 Marc Blank <mblank@google.com> Synchronize properly with ContentCache; document synchronization

Bug: 3291682
Change-Id: I69c4a3b2ee62a41e6488b63deeb975e510a3f554
ontentCache.java
2a63ac55e95df2e1c4e40ed5284bb8891c064f87 16-Dec-2010 Makoto Onuki <omakoto@google.com> Merge "Add null checks to investigate bug 3275738"
ebf0f18cbad20d39900d5ed165fff9978d929e5f 16-Dec-2010 Makoto Onuki <omakoto@google.com> Add null checks to investigate bug 3275738

Change-Id: I55f83336c5059b7ea6234b9451c60c4c062fdb06
idgetProvider.java
74596b3799093fa50603d4cd8df7ee1f74b46c05 15-Dec-2010 Marc Blank <mblank@google.com> Enable cache logging for debugging (w/ STOPSHIP)

Change-Id: I97493430f2aedcb070bc6d1789e47b562394eeb3
ontentCache.java
75a873be8420e50f0aeb5a77716358ee0ca66b01 09-Dec-2010 Marc Blank <mblank@google.com> Implement prefetch of IMAP/EAS attachments

* Load attachments in the background for IMAP/EAS messages
* Download an attachment from account X if:
1) 25% of total storage free
2) Attachments for X use < 1/N of 25% of total storage, where N is
the number of AccountManager accounts
* Add accountKey to Attachment table for performance

Change-Id: I913aa710f34f48fcc4210ddf77393ab38323fe59
mailContent.java
mailProvider.java
23d6d9cf24b47d8ba0742d02533db02a5061e863 13-Dec-2010 Makoto Onuki <omakoto@google.com> Merge "Controller.Result callbacks should all have accountId"
aef9515ee70f1f0b6cc4fa601078597b55831331 10-Dec-2010 Makoto Onuki <omakoto@google.com> Controller.Result callbacks should all have accountId

- Added accountId to loadAttachmentCallback/loadMessageForViewCallback

- Cleaned up LegacyListener/MessagingListener.
Removed the constructors which take messageId and attachmentId, which
are used to bridge loadAttachmentProgress, which the callsite doesn't know
these IDs. The inconsistency (only loadAttachmentProgress() uses the member
messageId) doesn't look too good, so extracted this into a separate class,
MessageRetrievalListenerBridge.

Change-Id: I46303e50df2b0e1fe8616e7c9cef632ac14f23aa
mailContent.java
16badc0822ea04f9e53848795724b2f7b51347d1 08-Dec-2010 Marc Blank <mblank@google.com> Clean up initialization of statics in WidgetProvider

Change-Id: I432126a6f403c4d2f280aef5545d1638371ac755
idgetProvider.java
6a858c1be26a9881afdb1027bc2cf02acaf6fc65 04-Dec-2010 Makoto Onuki <omakoto@google.com> Make widget open appropriate screen

Widget should open MessageListXL on tablet.

Bug 3253813

Change-Id: I5cfa63b571e443a0217bc9332bb4a76a039143ac
idgetProvider.java
3181679e9578a492b595eeb5a7ecc11c407ca17e 04-Dec-2010 Marc Blank <mblank@google.com> Always return widget from onGetViewFactory

Bug: 3250431
Change-Id: I161189b6cec2d2a1fe0e511c1e78390673efb0b9
idgetProvider.java
3127277ad5833858a3b48398dbb282a07567116b 03-Dec-2010 Marc Blank <mblank@google.com> Merge "Never close underlying cursor if there are active users"
c159d32be05ee744f3726579d9cd8eed39545137 03-Dec-2010 Marc Blank <mblank@google.com> Never close underlying cursor if there are active users

Bug: 3249537
Bug: 3238216
Change-Id: I281f0b0d6319adaffd78fe8e4c3da6f126eb71da
ontentCache.java
9d5aaeacd6b222877f25924818317c9153708261 03-Dec-2010 Makoto Onuki <omakoto@google.com> Follow-up to Id18fb940. Tests, fix transaction.

Change-Id: If425db7d729e260102a9db82b98e14ff6f6be143
mailProvider.java
edb8af826ca8fd1bb0fa42dacac4af90a65ed554 03-Dec-2010 Makoto Onuki <omakoto@google.com> Update/invalidate cache properly in update()

This prevented EAS accounts from showing the new message notification,
because Account.newMessageCount in the cache didn't get updated
properly.

Bug 3249319

Change-Id: Id18fb94083e2f441c293414f790a26f82869e3da
mailProvider.java
1b9337ea4f41c12cb108cbe67e0077169b1f0b8c 23-Sep-2010 Marc Blank <mblank@google.com> Wireframe email widget

* Formatting and assets are preliminary
* Functionality correct
* Needs cleanup, etc.

Change-Id: I75051df93d233ef529a616c7a9efae403d320bd2
mailContent.java
mailProvider.java
idgetProvider.java
1ca111c19c83d54ad23bd8615d9c648e09ec3366 01-Dec-2010 Andy Stadler <stadler@google.com> Add password expiration plumbing

* Set aggregated expiration values with DPM
* Fix min/max logic when aggregating, and fix unit test
* Add expiration tests when checking if policies are active
* Add expire-password to uses-policies set
* Handle password refresh (clear notifications and sec. holds)
* Handle password expiration (warning and/or wipe synced data)
* Unit tests for provider-level methods
* Refactor common security notification logic
* Placeholder notification strings (need final)

Bug: 3197935
Change-Id: Idf1975edd81dd7f55729156dc6b1002b7d09841f
ttachmentProvider.java
1832ea8c58e695d43e4f0564675611fba57560c4 01-Dec-2010 Marc Blank <mblank@google.com> Merge "Don't throw exception on moveToPosition in CachedCursor"
68dc380d62b29b4b6733bc1b20e44b8931c1d341 30-Nov-2010 Marc Blank <mblank@google.com> Don't throw exception on moveToPosition in CachedCursor

* Just return false

Bug: 3240290
Change-Id: I808ca88c7897c573d19c2c2c92b179b4106a6dd3
ontentCache.java
e29189e3eeea9c629777b3deed6ea2be67caa737 30-Nov-2010 Andy Stadler <stadler@google.com> Cleanups to Controller & AttachmentProvider

* New method in AttachmentProvider to delete all attachments for an
account, and unit test it.
* New method in Controller to delete all synced data for an account,
and unit test it.
* Fixed existing problem with Controller unit tests (needed cache clear)
* Fixed existing problems in Controller (mContext vs. mProviderContext)

Bug: 3197935
Change-Id: I79c6a03c21f18d37eeb8158cd1c2af0e0a6e9d2e
ttachmentProvider.java
5835dcecedb4f6a7bd3473cce172de0fb699cf98 23-Nov-2010 Marc Blank <mblank@google.com> Fix deadlock in ContentCache

* The situation is that putCursor() is called from a reading thread
while invalidate() is called from a writing thread
* putCursor() must not hold the monitor lock on ContentCache while
moving the underlying cursor to position 0

Bug: 3224203
Change-Id: I35b798dccf245c761dc79c39ced4fc8c0cfb9d78
ontentCache.java
349055aad47184b72cd86de1f37ac1b7557d2e70 17-Nov-2010 Marc Blank <mblank@google.com> Allow ProviderTests to work with ContentCache

Bug: 3204331
Change-Id: I5399345c2b759fb34d3dc7c694eb0eef8d7de493
ontentCache.java
2199c7ddf5d497e816bef1a1b7473098369a1bdf 17-Nov-2010 Andy Stadler <stadler@android.com> Minor cleanups for ContentCache

* Change CounterMap to not extend HashMap
* Renamed remove() to subtract()
* Comment out a failing test
* Add a flag that prevents any objects from being cached

Change-Id: I74754133b505178e8b0166390f69509f006a3da2
ontentCache.java
fab77f147f85766d2f75d8aece0aaa4ffb3838e8 28-Oct-2010 Marc Blank <mblank@google.com> EmailProvider content caching

* In this CL, we cache individual rows, based on the CONTENT_PROJECTION
defined for the most common queries (Account, HostAuth, Mailbox, and
Message)
* Queries on individual rows (most often Class.restoreClassById()) will
look to the cache first, rather than querying the database
* Queries on smaller projections will build MatrixCursor's from cached
data
* Write-through caching updates the cache with changed columns
* Experiments with live data indicate that > 95% of queries that are
cacheable (single row, no selection) can be retrieved from the cache,
thereby saving a great deal of disk access.
* Timing experiments show that cache hits are > 40x faster than cache
misses
* Unit tests for the various classes exist, with more coming

TODO
----
* More unit tests

Change-Id: I386a948a2f4cc02b6548d07d9b2fefd1e018a262
ontentCache.java
mailContent.java
mailProvider.java
2ac1eaf8c3f7122da7900f0ea5a1198264631d74 10-Nov-2010 Makoto Onuki <omakoto@google.com> Account selector rework.

- Show email address
- Show inbox unread message count

Initially I thought of using a join to get accounts with their unread
counts with one query, but there were enough subtle issues that I gave up
on the idea.

Instead it uses a MatrixCursor to build a completely new cursor,
based on a regular accounts cursor.

Change-Id: I09e8762f131cc2bd3637e1a3d302088a3b5b2479
mailContent.java
6f3d167cfa948d20153c2172c34cbede5ec83a1d 09-Nov-2010 Makoto Onuki <omakoto@google.com> Don't show non-incoming message in notification.

Filter out non-incoming messages using a subquery.
(because the message table doen't have the mailbox type.)

I was initially thinking of adding a new content URL for
the message table joined with the mailbox table, but it turned out
to be a bit of pain, so ended up using a subquery.
(one of the problems was that both tables had the "_id" field.)

Bug 3177220

Change-Id: I276efb70db1589835f3ddb8c7da4773e72d8691b
mailContent.java
0e6254223a0bf6ce06447dedc5e14d77cf8aa3c0 05-Nov-2010 Makoto Onuki <omakoto@google.com> Reverse FLAG_INCLUDE_QUOTED_TEXT

To make it compatible with old databases.

(Follow-up to Ie7bcca23)

Bug 3162967

Change-Id: Ie3bbb5089900bb9dbd0834adbdd466fa009245f9
mailContent.java
c81bef672089654e6da3babbeb0172bd636564b2 14-Oct-2010 Marc Blank <mblank@google.com> Drag & Drop "move to folder"

* Drag & Drop "move to folder" preliminary implementation
* Use "drag handle" button to initiate drag
* Use the message list item itself as the drag thumbnail for
one item; "Move N messages" for multiple (not implemented)
* Disable MailboxList update during drag
* Use ListView itself as drag/drop target

Bug: 3138004
Change-Id: I9243e4f583cf91caa1b9dd04fd64d52e8b28fa30
mailContent.java
mailProvider.java
d28172670602cde61ef900fac74f72b52b35a387 01-Nov-2010 Makoto Onuki <omakoto@google.com> Add null check to investigate an NPE in restoreMessageWithId.

We're getting an NPE in restoreMessageWithId(EmailContent.java:670)
called from MessageFileViewFragment.openMessageSync().

However, there're only two things that can be null in this line,
context and context.getContentResolver(), and either one really
can't be null. Add explicit null checks to investigate what's going
on.

Bug 3134403

Change-Id: I463b039b6afeda32729f7e6a93edfdb9abf12093
mailContent.java
730cc6724ae0fde63d6f11615338d2e01aef7e4b 26-Oct-2010 Makoto Onuki <omakoto@google.com> Add "Combined view".

- Don't show combined mailboxes with regular mailboxes in the mailbox list.
- Add "Combined view" to the account selector instead.
- "Combined view" has all the combined mailboxes and accounts.
- Renambed these combined boxes. (e.g. "Combined inbox" -> "Inbox")
- Regular account view still has "Starred" mailbox, but it's actually
"combined" and not per-account.
- Re-order special mailboxes per latest wireframe.

Bug 3138004

Change-Id: I4c5860c6774b10c55ba0ca599373e51105432cf8
mailContent.java
0e00160074abffe03285b355dce8b6ae2a6e3138 23-Oct-2010 Makoto Onuki <omakoto@google.com> Fix NoSuchMethodError in test

I should have been used the one without default in the main code,
which uses the other one (with a default), so both can safely be used
in tests.

Bug 3107191

Change-Id: I2011d96f6824a1a6e99e81f5c8e60c966a444d92
mailContent.java
6a2265eff292021f4a940334c079b84e17241ac7 20-Oct-2010 Makoto Onuki <omakoto@google.com> Add checkbox to include original text or not.

Added the "Include text" checkbox according to the latest mock.

Before:
- We removed original message when the user pressed X.

Now:
- We save the original message all the way till the draft is sent.
- The "Include text" check state is saved in the db. (to Message.mFlags)

Bug 3072414

Change-Id: Ie7bcca23bb6a02d676700027b0b6cb94b6627236
mailContent.java
ee7205d100eff01a75c292b80f41cd24a2b19b84 14-Oct-2010 Makoto Onuki <omakoto@google.com> Put the dest mailbox name in the "message moved" toast

Also removed obsolete todo

Bug 3075984

Change-Id: I10ce9df29c4913c328d2a962151d4a9f2e6e1408
mailContent.java
47087049f0cb3790d83e38e06b17826ea095c5cc 06-Oct-2010 Marc Blank <mblank@google.com> Fix issue w/ duplicated messages after move (to trash/folder)

Bug: 2994014
Change-Id: Ia223447f799ebd6490da2dc5caf1d1270b446a44
mailContent.java
01b7e67f78d2b722c66d71716b499024b3a42a5e 30-Sep-2010 Makoto Onuki <omakoto@google.com> Move reply/forward buttons to header

Moved the buttons to the header. All other buttons below the message view
go away, so I just hid the old buttons.

Also now we stop trying to hide these buttons when entering contextual mode,
which fixes bug 3044284: Message view buttons get disabled when closing
quick contact

Assets were temporarily copied from gmail.

Change-Id: Ib178c6221dfab02832a10d0c0441044e4969fb70
mailContent.java
899c5b866192a4c4a12413446d10e5d98dbf94fa 27-Sep-2010 Makoto Onuki <omakoto@google.com> Switch to tablet style notification

- Now we show separate notification for each account
- New notification has sender photo, sender name, and subject
of the latest email
- Added the NotificationController class, which is intended to manage
all notifications besides "new message" eventually.

The framework doesn't seem to be 100% ready, and it's not clear how to
add the 3rd line in the expanded notification at this point. Need to
revisit it later to verify UI details.

Change-Id: I40193ee372cb6b2b7245c1588890f238b2469699
mailContent.java
07597e547bc02cd2247caa866d25b94745dcd448 29-Sep-2010 Marc Blank <mblank@google.com> Use LIMIT parameter in getFirstRowX calls

* Also, rename the LIMIT parameter to be consistent with naming
conventions

Bug: 3046494

Change-Id: Iafc7f7d76f45bc7988e5d63783359082756b7ffa
mailContent.java
mailProvider.java
0efe738e05a31e0c1ebfba645bd2364a373a3f33 28-Sep-2010 Marc Blank <mblank@google.com> Add Uri for Message queries that include a LIMIT

* Use a query parameter (e.g. ?limit=2); LIMIT works with any
query

Change-Id: Idd106ab4b61aec237ac9676a201e797c4f65f15b
mailContent.java
mailProvider.java
d25d87c7ba8bbbbcad771695a7085f227bac8a1b 24-Sep-2010 Makoto Onuki <omakoto@google.com> Fix NPE with use of getFirstRowXxx

Make sure not to cast null into a primitive type.
(i.e. If null isn't expected as a return value, make sure to set a non-null
default value.)

Bug 3032143

Change-Id: I9a344d765c75a66f529ad8d99b00b2b919139f9c
mailContent.java
23f8d3be7dad09dca750c482ddb03c80780d896d 16-Sep-2010 Marc Blank <mblank@google.com> Handle EAS type 1 folders (user-created)

* If a type 1 folder has an mail folder as a parent (at any level),
it is also a mail folder (and therefore, we should have it in our
folder list)
* Before rejecting type 1 folders, look for parents and accept those
that are mail folders
* Add unit test to verify logic

Bug: 2978410
Change-Id: I44cda1d1c1fd7f3976af53a1672736201cc995ff
mailContent.java
625451ed25747d2637bd45274b0ec1f7d1bbb93c 22-Sep-2010 Andrew Stadler <stadler@android.com> Harden thumbnail creation

* Catch some errors earlier; Log all errors.

Bug: 2905324
Change-Id: Icdf4ec881f404787a0621e606d7e611d5e50aab1
ttachmentProvider.java
261d6c3f0c97a12256519a2c3b131a56e57ab45f 15-Sep-2010 Makoto Onuki <omakoto@google.com> Notify only account cursors when resetting new msg count

- Resetting the new message count is now correctly done on a BG thread.
- Added special content provider URI to reset the count.
(/resetNewMessageCount)
- This URI only supports update, which will notify only account
cursors.
- Fixed a problem that an insert with MAILBOX_ID/MESSAGE_ID/ACCOUNT_ID
triggers two notifications.

- This CL changes how we use notification URIs, but unfortunately
no tests for this part. It turned out MockContentResolver doesn't
support the notification mechanism, which made it very hard
to write tests.

Bug 2911646

Change-Id: I35b30a7e6bf2d57510486c7ed19b9f263d8c9b58
mailContent.java
mailProvider.java
7bcf1882bcb33b690f0b104f7605c9a6da39f344 11-Sep-2010 Makoto Onuki <omakoto@google.com> EmailProvider related clean up

- Removed unused URI definitions.
- Added SuppressWarnings to CONTENT_URI's in EmailContent

Change-Id: Id1e746ef5ab86dd76dc1b7dd38a5a00d052bddab
mailContent.java
mailProvider.java
5b0c2c7f344e72915ac63ff45cf3d65885373a39 10-Sep-2010 Makoto Onuki <omakoto@google.com> Fix tests broken by I2bf5de4e (Clean-ups for EmailProvider)

My previous CL broke some tests.
- make sure to set 0 to unreadCount when adding a new row
- when updating messageCount in the tests, directly manipulate
the DB. (the provider no longer allows this)

Change-Id: Ib569349707007badf4f23600fbca37110c78fa6d
mailProvider.java
f678a8e67ace74ea285dcec9727d0117e23a5c73 10-Sep-2010 Makoto Onuki <omakoto@google.com> Clean-ups for EmailProvider

- Don't allow manual modification of unreadCount/messageCount
(We used to check only unreadCount in update().)
- Do the integrity check at the very first in update().
I think the old place was really problematic because we opened
the database in a few lines above and kept it in a local variable.

Change-Id: I2bf5de4e4e45b40c11b951dd2255f8193c26f1aa
mailProvider.java
d36d911fac517f7a82f5a341290f67e2dd04979d 09-Sep-2010 Makoto Onuki <omakoto@google.com> Add a flag to check the current thread on db accesses

Added Email.DEBUG_THREAD_CHECK. If true, EmailProvider warns if certain
methods are called on the UI thread.

Change-Id: I6db9e45f2e449a31850c223fc9eec0fb9a575cb1
mailProvider.java
ddc8dea2bdfb85838f70dc1c2f173e42b86c7554 07-Sep-2010 Makoto Onuki <omakoto@google.com> Fix upgrade problem in I84a2cbe1

I84a2cbe1 didn't upgrade the deleted/updated tables.

Bug 2980891

Change-Id: Ifb0800bab58978352f2239f99186d0503e0dd899
mailProvider.java
e7b9e4ab94093127002f4cddd3ffcc3deb1c0b41 02-Sep-2010 Marc Blank <mblank@google.com> Add snippets to messages

* Add 'snippet' column in Message table and handle upgrades to the
new schema
* Generate a snippet from either HTML or plain-text message body,
removing tags, extraneous whitespace, and other superfluous text
along the way. Store the snippet in the Message table
* Clean up MessagesAdapter to use the pre-existing list projection
and constants
* Write unit tests for snippet creation
* The UI in this CL is always single-line, ellipsized

TODO: Handle two-line subject if portrait and XL

Change-Id: I84a2cbe10957975942edad6eb1255a726924a78a
mailContent.java
mailProvider.java
767f9fe2ebcca7eee20f2a048f33a96ad4bf53da 02-Sep-2010 Makoto Onuki <omakoto@google.com> Implement batch move.

* UI is still temporary
* In this version, we check if the selected messages can be moved *after*
you click "Move", rather than disabling the button beforehand.

Change-Id: Ief2864d2a513001847844963b2b0cb6b714e8667
mailContent.java
a25aa613f79a94d0dea395234ba383de63d03727 01-Sep-2010 Makoto Onuki <omakoto@google.com> Open MessageComponse when draft in All Starred is selected

Also removed a silly unnecessary code in Mailbox.isRefreshable.

Bug 2968445

Change-Id: I75187e5abf1c3e67c8b9ead38c7f749fc8b6cfb0
mailContent.java
62f9c4d2803382f89cf8a19ed12b53b639d547fe 25-Aug-2010 Marc Blank <mblank@google.com> Temporary UI for "move to folder"

* Many TODOs left in code.
* Only supports moving 1 message. (from message view)

Change-Id: Ibdec3163382345a7096c2cba51f448d69a9720af
mailContent.java
e357f5879187124c7af5c2ece5d7d3e4f60f07d2 27-Aug-2010 Makoto Onuki <omakoto@google.com> Fully implement "refresh" action bar button

* Now it'll refresh mailbox list (left pane) as well.
(With the minimal interval of 30 seconds)

* Always refresh inbox.
(also with the minimal interval of 10 seconds)

* Also make sure the "auto-refresh" won't refresh
non-refreshable mailboxes. (drafts, etc)

Bug 2929889
Bug 2930018

Change-Id: I09452d40aad6008a721cfbc3f491617224d7048f
mailContent.java
5247ab8cae802272b1e29e81d3b31a1c4e710da5 24-Aug-2010 Makoto Onuki <omakoto@google.com> Make isEasAccount always work.

isEasAccount now uses getProtocol(), so it works even if the hostauth
hasn't been restored yet.

Bug 2929896

Change-Id: Iee902c18ef59680d8a7d4622230489ec7946f38c
mailContent.java
bf37f67e6d1ccdd47842d496ded4eb11186550ad 24-Aug-2010 Marc Blank <mblank@google.com> Merge "Add utilities to retrieve Mailbox and Account from a message id"
bca4e6e70b53ca7db0ac14522f0d26a7b465cf24 24-Aug-2010 Marc Blank <mblank@google.com> Add utilities to retrieve Mailbox and Account from a message id

Change-Id: Ice727f82b5c284617b831f19e2667078cd3da5dc
mailContent.java
6c36b4c613499655316d8c910e3c6bfb08a0d896 20-Aug-2010 Makoto Onuki <omakoto@google.com> Add shutdown() to providers.

They're needed for unit tests.
I was hoping this would solve some of the unit test issues, but it didn't look
like so. But still they're nice to have.

Change-Id: Ibf6ae78055560d27aac5934d567a17084de99d84
ttachmentProvider.java
mailProvider.java
09fd4d0a181db511a07950f52ad56cc6e686356b 10-Aug-2010 Marc Blank <mblank@google.com> New asynchronous attachment loading code

* Create AttachmentDownloadService to manage all attachment downloads
1) User requested
2) Required for email forwarding
3) Opportunistic downloads to enhance offline use
* New attachment related UI (pending UX approval, of course)
1) MessageView (attachment actions, progress bar, etc.)
2) MessageCompose (attachments for forwarded messages)
3) Associated toasts, notifications, etc.

TODO:
* Unit tests
* Cache Management (separate CL)

Change-Id: I7864a5fb1c3f4f2be68d98341a971edc6cbacfe1
mailContent.java
mailProvider.java
b6ad4c252f5fa75ca6b0a1297d0f9781c9749edd 12-Aug-2010 Marc Blank <mblank@google.com> Merge "Fix AttachmentProvider to work properly w/ EmailProvider"
1ec89e6290df7853990517ebe869bdb212d7e337 12-Aug-2010 Marc Blank <mblank@google.com> Fix AttachmentProvider to work properly w/ EmailProvider

* Apps trying to open attachments using AttachmentProvider were
seeing SecurityExceptions due to the fact that internal calls
from AttachmentProvider to EmailProvider didn't have their
calling identity saved/restored.
* Updated provider calls so that these calls use the Email
process' identity.

Bug: 2908737
Change-Id: Ifb71ad834530c6232728e1aad31439991f8ed379
ttachmentProvider.java
6d8bfa67c438ee18921d13d8bfba876aacaa9ff6 10-Aug-2010 Makoto Onuki <omakoto@google.com> Make AccountBackupRestore/"delete account" robust.

Fix for crashes caused by an incomplete account
which typically a crashed unit test leaves behind.

- "Delete account" now works for incomplete accounts
- AccountBackupRestore won't crash.

Change-Id: Ie235aa15cf9b970fd184c60f14406aa7353c6f00
mailContent.java
191448b430f36167bd1706c13d77e48d7e7505cf 05-Aug-2010 Makoto Onuki <omakoto@google.com> Make Welcome launch MessageListXL

Also added the "1 pane" activity to test the phone UI.

Change-Id: I1c86d2088a2298ada5028b7a266bd090b593593c
mailContent.java
833fe73b99e62ad9cf6e80c782717c7de1ff12e4 03-Aug-2010 Makoto Onuki <omakoto@google.com> Aadd special boxes to mailbox list.

Change-Id: I36616f53555346ca7fbb6f3426a0c3196d7bacbc
mailContent.java
574854b528163f3bf1a7cb974aa80082d1768edf 30-Jul-2010 Makoto Onuki <omakoto@google.com> Add the messageCount column to the mailbox table.

- Use trrigers to keep them up-to-date.
- Batch-update them upon upgrade.

- Motivation:
On the mailbox list, we show the number of messages in trash/drafts.
We currently do this with count(*) on the fly, which is okay
because MailboxList is really shown right now.
However, on the 2 pane, it's always shown and constantly refreshed,
so the use of count(*) can be a huge penalty.

It also make the code significantly simpler.

Change-Id: I26efa238d5183df43420a65925876248ef6c6cb6
mailContent.java
mailProvider.java
bcf32320e2600e96c8a9e997a8903bfc3893b35e 27-Jul-2010 Makoto Onuki <omakoto@google.com> Move isSecurityHold/clearAccountHoldFlags to Account

- Added unit tests
- I see the "open a cursor, move to the first row, read a column" pattern over
and over. Added a utility method for this. (Let's try not to bloat the
binary by copying code around!)
- Added helper classes for database related tests
- Removed code dup

Change-Id: I380959215cc1661b252158f0f6e35369b499cdf8
mailContent.java
4e366b99959e5be422e6c77ec698f2241f4ff4bf 29-Jun-2010 Makoto Onuki <omakoto@google.com> Merge "Always use the mime-type "message/rfc822" for eml files."
1d0be30871745ef0e623d8bb5e2e433567541623 29-Jun-2010 Makoto Onuki <omakoto@google.com> Always use the mime-type "message/rfc822" for eml files.

Bug 2795919

Change-Id: Ie20fccdad34d7d17d7444af25d3e57033a45de5a
ttachmentProvider.java
8d8f86e899165772a7d91250b98dfc3c0d78b538 25-Jun-2010 Marc Blank <mblank@google.com> Cleanup and speed up isMessagingController

* Use the new Account.getProtocol() method to determine whether an
Account "isMessagingController" (i.e. uses the legacy controller)
* Cache the result of this test, so that it's only done once per
Account
* Add unit test

Change-Id: I6a0ec789a84bdf30b55156e6337a627fb4e81a08
mailContent.java
9b4988de43dbee6c06066caab63806e8c8303d7d 10-Jun-2010 Marc Blank <mblank@google.com> Implement support for new security policies

* Minimum complex characters
* Password history (i.e. disallow re-use of past n passwords)
* Password expiration
* Password expiration is NOT yet supported in the framework; there
is a TODO in this CL and a trivial change will be needed when
support arrives; for now, we report this as unsupported
* The two implemented policies are testable

Change-Id: I477adbc000577c57d1ab1788378c97a60018c10c
mailContent.java
391ae25c43a38829cc0990af18c36bdc7cc374cf 05-May-2010 Marc Blank <mblank@google.com> Handle viewing of attachments that are, themselves, emails

* Add intent filter for application/eml and message/rfc822 mime types,
launching MessageView with a Uri
* Modify loadMessageTask to handle the Uri by parsing the attachment's
input stream with Pop3Message.parse(), and then creating an
EmailProvider message in a special Mailbox created to hold
"attachment" messages
* Delete all "attachment" messages after the parent message is closed
* Add unit tests

Change-Id: I20276ee006b9f05b889f3c808d3dc407cde26d49
mailContent.java
80ebde2897dced46a0f24efb7c15a997b660a8fe 01-May-2010 Andrew Stadler <stadler@android.com> Better handling for untyped attachments

* IMAP/POP rely on sender to set mime type of attachments
* Which doesn't always work, because senders don't always provide it
* Remap using filename extensions, when needed
* This is applied as late as possible - in the MessageView, and in
the content provider getType(). No changes to how we write databases,
and no change to existing attachment rows.

Bug: 2356638
Change-Id: Ie69e3fd12f406aac803583f9d1299a8af4fba010
ttachmentProvider.java
a942858f0dc26158430a93f5dfd2d91f07471d11 26-Mar-2010 Makoto Onuki <omakoto@google.com> Properly handle old style (<= 1.6) account shortcuts.

A desktop shortcut to an account created on donut or before points at
com.android.email/.activity.FolderMessageList, which we've already removed.

- Added a dummy FolderMessageList to receive it and redirect to MessageList.
- Removed FolderMessageListUnitTests, which was left unremoved.

Bug 2535335

Change-Id: Ie5ffa158882633a4929c4c47a3d9625fd1626863
mailContent.java
9e2ddca59d048fc9ac55278b193ee36b330a7981 17-Mar-2010 Jim Shuma <jshuma@google.com> Add "vibrate when silent" mode to notifications

* Add "vibrate when silent" choice in UI
* Add storage for it in Email's provider. Existing accounts default to
their current settings (always vibrate / never vibrate).
* Respect new mode when notifications are posted
* Updated existing unit tests

Bug: 2457183
Change-Id: I5c933ac39dbef8b2028255f330e0b084a445421a
mailContent.java
0ed690bfb4fdfa86cb6f75c19e24b8ff39a1756c 16-Mar-2010 Marc Blank <mblank@google.com> Send meeting invite mail as multipart/alternative

* Turns out that Exchange 2003 requires the ics attachment to be in a
multipart/alternative, rather than a multipart/mixed MIME message
* Exchange 2007 accepts both types
* Therefore, we change our output for this particular situation, i.e.
a single attachment that is an ics file, to multipart/alternative
* Rename FLAG_SUPPRESS_CONTENT_DISPOSITION to FLAG_ICS_ALTERNATIVE_PART
and make this flag do double duty - 1) suppress the Content-Disposition
header (also required by Exchange) and 2) send the message as
multipart/alternative
* Add unit tests for Rfc822Output to check that mime parts are composed
properly

Bug: 2516394
Change-Id: I60e26f57b8ecaf01d0340e7828533334e0e7d45a
mailContent.java
20225d57609d6a5e482c088fdad60c29212d31a0 12-Mar-2010 Makoto Onuki <omakoto@google.com> Explicitly send ICS files in UTF-8.

- In memory attachments are now stored as byte[], not String.
We can store any type of contents now.
- Added blob content_bytes to the Attachment table.
The content field is now deprecated and not used.
- Explicitly convert ICS files to UTF-8.

- Added Utility.to/fromUtf8().

Bug 2509287
Change-Id: I3785a365a9a34039ec12ba82bd857dcdbc4de92d
mailContent.java
mailProvider.java
c133e6f1858e33fabaa6ffa173c1402bf9a98e31 06-Mar-2010 Makoto Onuki <omakoto@google.com> Fix for Account.isValidId() crash when getting -1.

Bug 2493026
mailContent.java
652be6fb3d04a4ceba6b765cd3160cdaef9e6107 03-Mar-2010 Makoto Onuki <omakoto@google.com> MessageList: Go to Welcome if account not found.

If the account specified with an Intent doesn't exist, show the Welcome
activity instead, which will navigate the user to the appropriate activity.
(e.g. account list if there're more than one account)

Bug 2479609
mailContent.java
e37881aac562c066e6e666349749e40b7c116a21 02-Mar-2010 Makoto Onuki <omakoto@google.com> Store UUID instead of _id in desktop shortcuts.

- Because AccountBackupRestore won't preserve _id.
- Now MessageList accepts both Donut(1.6)-style URIs and Eclair(2.0-2.1)-style
URIs.

Bug 2479609
mailContent.java
29c38d2c84273851282ae3c799f5bf1845202065 26-Feb-2010 Marc Blank <mblank@google.com> Send cancellation email when user-created event is deleted

Bug: 2465496
Change-Id: I49bf9951e816a4500b7622cbca84fb75edfdb76c
mailContent.java
6854a4f24a0e93547fc7785553b7f53878a76e08 23-Feb-2010 Makoto Onuki <omakoto@google.com> Patch for issue 2363606: Make EAS sync window default 3 days.
mailContent.java
3aaba9eb87db34ea0861d70d5c08f84d7ca97ab0 22-Feb-2010 Andrew Stadler <stadler@android.com> First part of Exchange meeting request/reply implementation

* Added two columns to Attachment in EmailProvider
content: content that is written directly as an attachment
suppressDisposition: to suppress the content-disposition header
All meeting invitation emails use these two columns; the first
for ics attachment data (which is quite small, rarely over 1k),
and the second to indicate NOT sending the content-disposition
header; without this, Exchange will consider the ics as an
attachment rather than an iMIP style message (rfc2447)
* Modified tests to include these columns; added upgrade code for
new database version
* New columns and code are designed to be usable outside Exchange,
although there are no other clients of the code at this point.
* Modified Rfc822Output to use the content field, if present, in
lieu of retrieving attachment data via URL; added support for
suppressing the Content-Disposition header
mailContent.java
mailProvider.java
1575e7860d2259f1aed201ab23d526cddf787365 15-Feb-2010 Mihai Preda <preda@google.com> MessageCompose: fix delete quoted on reply/forward for EAS.

Also fix display of quoted html text for a draft (Exchange 2007).

Bug 2363249
Bug 2444496
mailContent.java
4006e5fc224d097450fd66a321901b6636f7d9c4 16-Feb-2010 Marc Blank <mblank@google.com> Add meetingInfo column to Message; use for meeting invites

* Added a meetingInfo column to the Message database
* When a meeting invite is received, the start time is stored here
in ms from start of epoch. Note that this field is defined to be
a String, for extensibility
* Update ProviderTests

Change-Id: If44892d27ccc5ebdc1f8667befafb8b8a27a2cf4
mailContent.java
mailProvider.java
694257cb7e7a191b3314cb209b6c38a8a07583ef 12-Feb-2010 Marc Blank <mblank@google.com> Handle calendar sync state changes by observing Calendars; cleanup

* Use a content observer to detect changes in Calendars; we use this to
determine whether or not sync has been turned off. If sync is turned
off, all events will be deleted, so we need to reset the sync key
* Make sure that all code working on Contacts also now works on Calendar
(push, etc.)
* Remove some old crufty logging and out-of-date comments
* Addresses 2433061

Bug: 2433061
Change-Id: I6299168903fcce9bf820b72b5f6bb157d9169653
mailContent.java
2a5eeea9213005060256054ec773e72406415ce4 09-Feb-2010 Andrew Stadler <stadler@android.com> Adding security hold flag to accounts

* Add hold flag to Account flags
* Add code to set it (when EAS reports policy failure)
* Add code to clear it when we see changes from the device admin side
* unit tests

This should be sufficient to restart sync of an account which is on hold
due to security policy requirements. Note, this is considered a "retry",
and if the account still does not meet requirements for some reason, it
is expected that EAS sync will call policiesRequired() again.
mailContent.java
d9080ed32eba3092b21633f269ec4b71faf93a34 02-Feb-2010 satok <satok@google.com> Add UI for Signature in Email Application

Bug: 1323618

- changed summary of signature to show hint if signature is not set
mailContent.java
91237e9dcb0a948f17488b464edabcea0f259d31 03-Feb-2010 Makoto Onuki <omakoto@google.com> Adding script for building Email app without exchange.

remove-exchange-support.sh makes it possible to build the email app without
exchange support.

This script:
- removes all packages under com.android.exchange.
- removes all lines surrounded by EXCHANGE-REMOVE-SECTION-START and
EXCHANGE-REMOVE-SECTION-END

And the resulting source should still build and run fine.

Bug: 2369784
mailProvider.java
faed6178b1858f0e6df388a409d14fb3f94afefa 02-Feb-2010 Makoto Onuki <omakoto@google.com> Move Eas.ACCOUNT_MANAGER_TYPE out of the package.

Moved Eas.ACCOUNT_MANAGER_TYPE to Email.EXCHANGE_ACCOUNT_MANAGER_TYPE.

This constant is not related to the exchange protocol, and referred in
a lot of different places. Moving it out of the package will make it a lot
simpler when removing exchange dependency.
mailProvider.java
345fb8b737c1632fb2a7e69ac44b8612be6237ed 27-Jan-2010 Andrew Stadler <stadler@android.com> Add utilities for processing account security policies

* Add security sync key & signature columns
* Add utilities for easy read/write of security columns
* Write aggregator for multiple accounts
* Simple API's for exchange security (very preliminary)
* Unit tests of above

Bug: 2387961
mailContent.java
mailProvider.java
5de54008e58ff63d388e4d448b50a47950990e22 25-Jan-2010 Marc Blank <mblank@google.com> Handle Exchange meeting invitation responses

* Includes some refactoring of internal "request" code in SyncManager
* Adds Message flags to tag meeting invites and cancellations
* Adds meetingResponse method in EmailService
* Hooks into Controller and MessageView UI included

Change-Id: I4c5e10bccc4b41956b94d9dfa55925e5af030939
mailContent.java
fc8d943a828cd79ff71c703ced37001bd5482173 21-Jan-2010 Andrew Stadler <stadler@android.com> Add security column to Account

* Upgrade accounts table to add security column
* Read/Write new column
* Backup/Restore new column
* Unit tests for all of the above
* First cut at defining bitfields (non-binding, just putting down ideas)

Bug: 2387961
mailContent.java
mailProvider.java
5e91cccd4b530eb2aeace5c5bf4f3328a5b5d69d 20-Jan-2010 Andrew Stadler <stadler@android.com> Quick backup/restore of accounts

* Workaround for (HTC bug 2275383) & (Moto bug 2226582)
* Adds checkpoints for backing up and restoring accounts
* Uses legacy Account / prefs to back up accounts - this is because
some of this code will be reused for legacy account migration
* Unit tests of Account & LegacyConversions
* Unit tests of backup & restore
* Not done: testing of EAS/Account Manager interface (this will require
deeper dependency injection, to avoid the embedded calls to the Account
Manager and other system services.)
mailContent.java
0b8b68cbebdba372c7302a207e2321cd80b384ae 17-Jan-2010 Marc Blank <mblank@google.com> Fix account creation race condition

* Due to the order in which account creation occurs in the Provider
and in AccountManager, and the fact that there are data observers
on each that initiate account reconciliation, a race condition exists
that can cause either of these accounts to appear to be orphaned,
and thereby get deleted
* We add an "incomplete" flag to the Account in EmailProvider and
set/clear it during account creation. The various reconciliation
methods will ignore accounts marked as incomplete.

Bug: 2353755
Change-Id: I13fb144dd857f839eb3471b01f271f3a0d4d8159
mailContent.java
17da1767e396b873723d53b2aef93da8aca2c00e 18-Dec-2009 Marc Blank <mblank@google.com> Implement Autodiscover for Exchange servers

* Autodiscover allows complete configuration using only email address
and password
* Code handles the two standard autodiscover addresses and redirect
* Autodiscover process starts when the user chooses "Exchange" as the
account type. If the account is created via the AccountManager,
autodiscover begins upon tapping "Next" for the first time
* If autodiscover fails due to anything other than auth failure for
autodiscover-capable servers, the user is placed into the standard manual
configuration screen

Bug: 2366019
Change-Id: I936712b924833d9a133e8da04e11c3ba45d92f92
mailContent.aidl
7a4b1c72f6f2e8395dd67af4b00f9f1c1efbb97b 08-Dec-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I146f63ab into eclair-mr2

* changes:
Don't delete referenced messages from the Exchange server
c29e435eb3a1b42b7bd8ddfe2d9d72b140c69928 04-Dec-2009 Marc Blank <mblank@google.com> Don't delete referenced messages from the Exchange server

* Addresses #2287439 incompletely
* The most likely reason for a reply/forward to get stuck in the Outbox
is that the referenced message has been deleted from the client, with
the deletion occuring BEFORE the message gets sent (currently, the two
are completely independent)
* This change causes deletes NOT to be sent to the server if the message
to be deleted is referenced by an outgoing message

Change-Id: I146f63ab345c07e684790e1d7d1fc08870468bbf
mailContent.java
0e1595c177e40428b267a8696dfc05d015ce6a2f 19-Nov-2009 Marc Blank <mblank@google.com> Handle unexpected deletion of EmailProvider database

* Addresses #2226426
* If the user deletes Email data, or if data corruption causes
EmailProvider.db to be deleted, we will be in an inconsistent
state with any existing Exchange accounts, since the AccountManager
will still know about them, contacts (and eventually calendar) items will
continue to exist, etc.
* Run an integrity check when the provider is created, deleting any
orphaned EmailProvider.db or EmailProviderBody.db
* Catch SQLiteException's in the Provider and do an integrity check
if any is caught

Change-Id: I47d523b90a6b8f71ba8e13fba4b04846b3da1b1d
mailProvider.java
b720ed318324c69ddbcb15c4a1b9e132f3266775 04-Dec-2009 Vasu Nori <vnori@google.com> revert previously submitted CL 34143.

turns out the change I submitted before is not required at all. I mistakenly
assumed sqlite wouldn't be able to handle it. but tested it with the latest
version of sqlite 3.6.20. the old style triggers work fine.
mailProvider.java
8e09bde56833c1d7e55b1553d20b0537794d02b9 26-Nov-2009 Vasu Nori <vnori@google.com> change BEFORE triggers to AFTER triggers - to make them work with sqlite 3.6.20 and beyond
mailProvider.java
9ef6f645f57d869a600113f555389b5d5e368c21 17-Oct-2009 Mihai Preda <preda@google.com> Controller: modify the test for "attachment already loaded".

Bug 2192510.

update unit test.
ttachmentProvider.java
367963639d4291511b7e175a208e2b553aac26c2 20-Oct-2009 Marc Blank <mblank@google.com> Fix SQL for upgrade from ver 6 to ver 7 of Email database

Fixes #2196917

Change-Id: Ia403e50e9ec4ea553d38ded656bba769a4a4dd18
mailProvider.java
ef83299b99288c00b9d661260d19715e73e6889c 14-Oct-2009 Marc Blank <mblank@google.com> Clear out orphaned messages in updates/deletes tables

Case #1:
* Fixes #2184702
* Messages can be in the base Messages table, but also in
Message_Deletes and Message_Updates; the latter two were not
being purged of deleted messages.
* This CL deletes from all three tables when a Mailbox is deleted
* Also run a check for orphaned deletes/updates when the email
provider's db is first opened
* Unit test updated to check for proper deletion
* Unit test for the provider check for orphans

Case #2:
* Fixes #2184708
* Messages in Outbox/Drafts can get modified or deleted, but the
rows added to the updates/delete tables never get removed because
the boxes don't sync
* Added code to SyncManager.ping (which gets notifications of these
changes) to delete these rows

Change-Id: Ib53e441136b0da1e88bc220150d631999058a8f0
mailProvider.java
5b0a12c199198870161876996296b1262c17408e 14-Oct-2009 Andrew Stadler <stadler@android.com> Prevent duplication of POP3 attachments

* For each attachment we add, check the DB for an existing attachment
with similar metadata (name, mime type, content id, etc.)
* Skip adding them if already held
* Unit tests

Fixes bug http://b/2084704
mailContent.java
f16a3f2f6a952640b07acfe669ac626c45cbd8cb 01-Oct-2009 Andrew Stadler <stadler@android.com> Cleanup delete handling issues in POP3

* Removed obsolete "delete after 7 days" option from pop-up prefs
* Mark deleted message sentinels as "read" so they don't contribute
to unread counts.

Bug # 2157487 and Bug # 2159278

Change-Id: Ic3cbc51d6f5ede2eb923e2d0e5c0dfee377764f5
mailContent.java
71754d3f940fe82e251c274e3e56781e702cfd6f 01-Oct-2009 Andrew Stadler <stadler@android.com> Delete attachments when necessary, don't leak disk space

* Add AttachmentProvider.deleteAllMailboxAttachmentFiles
* Call it when server deletes a mailbox
* Confirmed (no change) all message deletes call deleteAllAttachmentFiles
* Unit tests of course :)

Bug # 2069004

Change-Id: I99731e6489fdca4cc9cebdff5fcf9c09d12b7b3a
ttachmentProvider.java
e4a7cc440f081ef9c4375a2bd2f82680cc11b152 30-Sep-2009 Andrew Stadler <stadler@android.com> Re-enable modernized version of "optional" SSL/TLS

* Add "Accept all certificates" modes to incoming/outgoing secure choices
* Change URI scheme slightly to make "trust" a flag, not part of the
protocol.
* Change Stores to know about new URI scheme
* Slightly rework Transport API to make "trust" an independent flag
* Adapt HostAuth to handle new Uri scheme
* Remove the old ambiguous "optional" code, which was allowing
some unsigned certificates, but was *also* allowing TLS to
optionally start (though not SSL, despite the UI strings.)
* Add a few unit tests to EmailContent
* Add logging and a bunch of comments to TrustManagerFactory, and a bit
of simple cleanup to make it more readable.
* Add missing conversion of SSLException->CertificateValidationException
in TLS so we get the correct certificate errors from TLS too.
* Re-enable TLS for mac.com accounts (which had a certificate problem)

Fixes bug http://b/2119755, http://b/1374780, and probably a raft of
earlier and/or external bugs about certificate problems.

Change-Id: Iaf99a8da3eaadaa4cdeec224737838b5d6813e55
mailContent.java
c41c47fa07a22f8a7612fb0191f152a36d95b7a5 25-Sep-2009 Andrew Stadler <stadler@android.com> Enable message upload

* Create logic to detect upsyncable messages in Sent
* Note: Drafts is now local only for IMAP - no sync, either way
* Rewrite MessageController.processPendingAppend for Provider world
* Write provider message -> legacy message converter
* Fixed bug in IMAP APPEND (it was not picking the right UID for the
uploaded message.)
* Better handling of server internaldate
* Add constants for new X-Android-Body-Quoted-Part header
* Add EmailContent routines to get each of the 5 parts of the body
* Remove "Load more" from unsynced message lists
* Add toString to MimeHeader for debug support

Bug # 2097471

TODO (next CL): Upload attachments records too

Change-Id: I209182f5adc6b6696919f559e3cbbdd58b3eed3a
mailContent.java
d66b465776261b3313c4b3bb3ef7c3954ebb08e4 23-Sep-2009 Mihai Preda <preda@google.com> Fix loading the quoted text when editing draft.

Bug 2140036.

Only load the reply fields for an edit-draft situation.
mailContent.java
5fc57eccefeba517fe5e6f093786f37c6c4d50e6 23-Sep-2009 Marc Blank <mblank@google.com> Fix reply/forward for both SMTP and EAS; fixes #2138725

* Add new introText column in the Body database
* Reply/Forward put the appropriate String into this new column
* Rfc822Output uses this when required when streaming the message

Change-Id: I34602fdb3f91692c46fc8bc31ba0e6f680d445a0
mailContent.java
mailProvider.java
0d00889f83fc8c1d69039a2c849b630fb4dd28dd 23-Sep-2009 Andrew Stadler <stadler@android.com> Cleanup Provider Message in preparation for upload

* Remove mServerIntId and its special logic
* Add mServerTimeStamp
* Add column dynamically so we don't lose accounts

Bug # 2097471
mailContent.java
mailProvider.java
fa52e6c95674aef6461a5cfc670a052e1c5b7f2f 21-Sep-2009 Andrew Stadler <stadler@android.com> Clean out old mailbox names logic and fix a couple of bugs.

* Get rid of old Account.getxxxFolderName() calls.
* Clean up any call sites to them
* Properly rename the existing special folder name identifiers
* Use a hash table in MessagingController to improve identification
of special folders for IMAP accounts
* Fix a bug in Controller, which was creating new server-side folders
using localized names.
* Fix a bunch of code in Controller that was using mContext, instead of
using mProviderContext to support testability.
* Fix broken unit tests in ControllerProviderOpsTests

Fixes bug 1904373
mailContent.java
8587aa61211d288d05b5fb2ddf02d69cabe6a9e2 19-Sep-2009 Marc Blank <mblank@google.com> Make EmailProvider more threadsafe w/r/t transactions

* Since transactions can be nested, get rid of pointless/dangerous
flag for indicating we're in a transaction.
* Fixes #2131847

Change-Id: I2955e8a7659533e8ee9e71b949a042570466df45
mailProvider.java
657de3bfd6024811c6d6ef6fb2fb2c2750d9f54a 19-Sep-2009 Marc Blank <mblank@google.com> Revert change to AccountManager naming; use email address again

* Forces wipe of existing accounts

Change-Id: I65d08e07a2d74f94f9142e85791d9bf49c100241
mailProvider.java
e7e1ca432e1aace5b7f11a3f1684a4abc503e6b2 16-Sep-2009 Marc Blank <mblank@google.com> Change AccountManager username for Exchange to the user's login credential

* This is not a backward-compatible change (sorry)
* Existing AccountManager EAS accounts and contacts are deleted
* Existing EmailProvider data is deleted
* Change works with new code (stadler) to avoid account duplication

Change-Id: Ife09c51fa714d91054d017b497bce603add5375a
mailProvider.java
da8836a76cd8a6eaa7e3693eeacc6393870b2066 15-Sep-2009 Andrew Stadler <stadler@android.com> Give warnings if dupe account created:

* Check for existing accounts with matching servername + username
* Show a dialog and block account creation
* Triggers in three cases:
* After input of an auto-setup account (e.g. Gmail or AOL)
* After input of manual setup (incoming) parameters
* After changing incoming parameters of *any* existing account
* Made some notes in EmailContent regarding fields in HostAuth that we
are not actually using.
* Added HostAuth unit tests

Primarily fixes bug # 1964449
Bonus fix for bug # 1594408

Change-Id: I49310faf6654280582e0ab3d3e40f2701bfcd21d
mailContent.java
6c21942ec45f561d711b3d74ecca8e62afb735c4 10-Sep-2009 Andrew Stadler <stadler@android.com> Implement move-to-trash for IMAP and POP3.

* Define new message-loaded state "FLAG_LOADED_DELETED" (used only for
POP3, which needs to write sentinel messages that are not displayed.)
* Also renamed the other flags to make the naming more consistent.
* Tweak MessageList query generation to inhibit display of deleted
message sentinels, and MessagingController won't try to resync them.
* Clean up implementation of Controller.deleteMessage()
* Add support for move to trash to MessagingController. This operates
in three primary modes:
* POP3 local delete (no server-side interaction)
* POP3 server delete
* IMAP server delete (and copy to IMAP trash mailbox)
* Add missing implementation in provider to delete all of the attachments
for a given message
* Fix progress reporting in activities (the test for error vs. progress
was inverted, which caused progress indicators to keep spinning
after errors.)
* Fix broken account settings UI (POP3 delete policy was not persisting)

Addresses bug 2097409

TODO delete from trash / empty trash

Change-Id: I00188e6dc2093823106e009f35b68c760227c9e6
mailContent.java
mailProvider.java
cef2344e70b4ab90cbbb01aac00f248976d273df 06-Sep-2009 Marc Blank <mblank@google.com> Rework EAS account creation & ssl operation

* Fixes 2048663, 2025029, and 2100131
* Add "Trust Certificates" checkbox in EAS account creation
* Use custom ClientConnectionManager for HttpClient with registry
for plain, ssl, and tssl (trusted ssl) connection
* Use a ConnectionPool for HttpClient connections
* Remove "Domain" checkbox in EAS account creation
* Remove tests related to the "Domain" field
* TODO Write a test for valid usernames (requires a bit of research)
<name>, <email address>, <domain>/<name, and <domain>\<name> are all
valid, but there might be others

Change-Id: I4a0338df5960bfd3d679a88aaf22d1c49f49992b
mailContent.java
e25698319325d5e9619bc45ae85d861b0f1c5954 08-Sep-2009 Marc Blank <mblank@google.com> Add sourceKey to Body table; add flags for reply/forward in Message

* Set reply/forward flag and sourceKey as appropriate in MessageCompose
* Update provider tests accordingly

Change-Id: I7f49d80a735314a1a38f09fbf1f234257c41af8c
mailContent.java
mailProvider.java
9be10e62ed4c809c56e2bcc357d5bb7d5dd543c1 04-Sep-2009 Marc Blank <mblank@google.com> Remove the "unique" requirement for serverId; it should never have been there

* People using multiple accounts without this change could end up with missing folders
* Fixes 2099514
* Database version incremented; this change will cause a database wipe

Change-Id: I08d23fa54d8194758e1f7c2ffb528a14bc184f08
mailProvider.java
4bb52e36b18ab5e2fb9242069611bc0ef6116c09 02-Sep-2009 satok <satok@google.com> Fix the foldername of outbox

BUG: 2077596

* fixed the array of special_mailbox_display_names
* added unit tests
mailContent.java
936babc145e2e6eb2e222f2ce5e3da8f9e4fb9f2 02-Sep-2009 Andrew Stadler <stadler@android.com> Bulk change of columns, LAST TIME.

* Add reply columns to Body
* Remove a bunch of unused columns from Message
* Update SQL tables, content read/write, etc.
* Small tweaks to app code that was not-really-using the old columns.
* Update existing unit tests for new/changed columns
* Disable TagsTests to solve a tests failure (prexisting, not caused by
this CL)

Change-Id: Ief493796dfe219669755170d76786f91570cbb9b
mailContent.java
mailProvider.java
0401ad5334fad104336413173f17a5d72b9b5518 28-Aug-2009 Marc Blank <mblank@google.com> Fix usage of isDefault and IS_DEFAULT to be consistent

* There was inconsistent usage between int and boolean for this column

Change-Id: Ifa7bd6f2563920a95b6b714f3a7b14e5be29d176
mailContent.java
1851882c8c4ab06aa66e17735acd596c2c97b95a 27-Aug-2009 Marc Blank <mblank@google.com> Fix bug #2080302

* Was trying to retrieve an integer as a boolean in the ContentValues
* The actual Exception (ClassCastException) was buried by ActivityThread
mailContent.java
e1f0b0a9bcc78ade7f3b2ac540705701f19cd6cd 25-Aug-2009 Andrew Stadler <stadler@android.com> MessageView: next/prev navigation.

in addition:
- fix AND-OR precedence in cursor query in MessageList.
- move special mailbox ids from MessageList to Mailbox
- move shared code from MessageList to com.android.email.Utility
- add invisible prev/next to landscape in order to avoid special-case in code
- select mailbox list using IN() instead of list of OR

Note: Checked in by Andy to facilitate further work on MessageView.

Change-Id: I8049be2b45fed1e4e697a0ed895492c4d0e59e0a
mailContent.java
77398c42899a383680005b92955a29ab3d872c5c 24-Aug-2009 Andrew Stadler <stadler@android.com> Reenable Load More Messages for IMAP/POP

* Properly reset all mailbox limit values
* When load more messages is clicked, increment limit and resync
* Also fixed a race condition in provider

Resolves bug 2065626

Change-Id: If50f25a5cb3b549b3acc48406c78533ad86ed4d5
mailProvider.java
4b41bae270ea4c49ec8403084db43ee9b37cdda4 20-Aug-2009 Andrew Stadler <stadler@android.com> Enable IMAP/POP sending and EAS resend

* Finish IMAP/POP sections of Controller.sendMessage
* Rewrite MessagingController.sendPendingMessagesSynchronous
* Add deleteAllAttachmentFiles to AttachmentProvider, and unit test
* Rework sendMessage callbacks and integrate into MessageList UI
* Send pending from UI

TODO:
* Find other places from which to call deleteAllAttachmentFiles
ttachmentProvider.java
mailContent.java
c0c9c33322deecace00a32766e0a1b355aad4b31 20-Aug-2009 Marc Blank <mblank@google.com> Add URI's that atomically add a value to a particular field (Account or Mailbox)

* Message, etc. could be added, if this had a use case
* Unit test added for both Account and Mailbox cases
* Eclipse changed some parens around; it won't happen again
mailContent.java
mailProvider.java
44144d0301213536b02f2080237b63d8271b2d0b 18-Aug-2009 Mihai Preda <preda@google.com> MessageCompose: initial save attachments and load them back.

- load attachments for EditDraft.
- save attachments when save message.
- unit test for restoreAccountsWithMessageId()
mailContent.java
a867ebba6233becf2061c80e1c53d7d395a6cffc 18-Aug-2009 Marc Blank <mblank@google.com> Have body database attach just once, and never detach

* Much cleaner implementation
* Prevent errors when various threads collide for attach
mailProvider.java
4a8c70c09be3914ded18031b4cca5a6d867de0d3 18-Aug-2009 Andrew Stadler <stadler@android.com> Add "num new messages" field to Account

* Reset DB version to "1"
* Added field and support code (save, restore, & parcel)
* Added forgotten mProtocolVersion to parcelable code
* Added unit test for parceling

Also, fixed race condition in SyncManager that was underlocking the
wake locks during tests.
mailContent.java
mailProvider.java
9627d014e16235eadf981b9165807dc72a14a383 12-Aug-2009 Mihai Preda <preda@google.com> MessageCompose: update body on save.

- plus unit tests.
- and some attachment refactoring.
- move PROJECTION_ID up to EmailContent.
- add index on messageKey to Attachments and Body tables.
- add missing Columns.ID field in EmailContent.
mailContent.java
mailProvider.java
8db0babf726afc4018a721aa589a5ab461630948 12-Aug-2009 Marc Blank <mblank@google.com> Separate syncInterval constants for Account and Mailbox to remove confusion
mailContent.java
fb7974f5bfb6275fb856b0f7ff386ef10680c83a 03-Aug-2009 Mihai Preda <preda@google.com> Fix SQL for DELETE_ORPHAN_BODIES and DELETE_BODY.

and add unit tests.
mailProvider.java
3f1ac4da947f426775c9546f2e37206f58ce1a6e 12-Aug-2009 Andrew Stadler <stadler@android.com> Add code to handle IMAP/POP attachments.

IMAP messages up to about 25k will be downloaded properly.

* Move Store->Provider message rewrite code to a separate utility.
* Add code to descend a Store message and write provider attachments.
* Unit test basic IMAP attachment handler

TODO:
* handle large IMAP messages.
* unit test for POP
* unit test for large IMAP messages
ttachmentProvider.java
fc579d4477ed3632de0a04678ea490875de85eff 08-Aug-2009 Marc Blank <mblank@google.com> Refactor, cleanup, and fix sync bugs

* Found/fixed major sync bug re: first-time sync (emulator only)
* Moved deviceId code to SyncManager
* Added code to handle some edge cases related to sync errors
mailContent.java
9b598924ec1dd53f865a6aa552d40161aeb5dd0b 05-Aug-2009 Marc Blank <mblank@google.com> Try to work around the "ping loop" problem in some Exchange 2003 servers

* First try reloading the folder list; this can sometimes work
* Otherwise, change push to 5 minute sync
* Send notification if we switch to 5 minute sync so there are no surprises
* Added syncStatus column to EmailProvider (can be used for any purpose)
* Use syncStatus to keep track of sync type, result type, and change count;
detect ping loop as consecutive ping's with no changes
* Remove InteractiveSyncService (no longer needed)
mailContent.java
mailProvider.java
cba3a48f97ae2e6d875ac4284a4066da94c922d5 06-Aug-2009 Marc Blank <mblank@google.com> Fix EmailProvider so that deletions can occur during batch operations

* Fixes bug #2034170
* Attach the body database during all batch operations
* Change insert, delete, update, and query to use the main database for
all operations during a batch operation; trying to use the body database
while it is attached will result in a SQLiteException (database locked)
mailProvider.java
f00dccd32125c727cc18d837b59c15c95f5d78bc 31-Jul-2009 Marc Blank <mblank@google.com> Massive reworking of EAS serialization; much smaller and faster now

* Remove all use of Strings in favor of the parser's static final int's
* Strings remain in Tags for debugging output only
* Renamed lots of classes to be more consistent
* Centralized logging behavior in Eas class
* Found and fixed some bugs in the process:
- Account deletion wasn't removing HostAuth's correctly in the trigger
- Adding a second EAS account was trashing the first one
- Fixed looping sync behavior caused by Exchange 2003 bug
mailContent.java
mailProvider.java
758a532fce2f672673d38b2daa5f67eb757b118b 30-Jul-2009 Marc Blank <mblank@google.com> Use providers to update the unreadCount of Mailboxes

* Triggers added for insert/delete/update of Message
* update of Mailbox will never set unreadCount
* Removed old test for unread counts and replaced with on
that tests trigger operation.
* Remove Account.updateUnreadCount (deprecated)
mailContent.java
mailProvider.java
a98de7e55e91229c35352b496fad3fbb108a9609 28-Jul-2009 Andrew Stadler <stadler@android.com> Finish Attachment support for EAS accounts.

* Change service API to allow caller to supply complete target path/file
* Also allow caller to supply the final content_uri
* In MessageView, use full integration with EAS service API and
attachments content provider to enable:
* Save: Only works on SD card
* View: Works w/o SD card using content provider & intents
* Thumbnail previews
ttachmentProvider.java
3d25a519abf676f050b546d34401a277aea5de40 28-Jul-2009 Andrew Stadler <stadler@android.com> Convert AttachmentProvider to use new Provider db.

* Rewrite internals to use EmailProvider instead of raw db access
* Minor changes to APIs as necessary (and scattered changes to follow)
* Convert unit tests and check them
ttachmentProvider.java
301ac18bb7f211b473c4f6fa6ec9bb276bbc6c10 27-Jul-2009 Andrew Stadler <stadler@android.com> Create tests and improve docs on AttachmentProvider

No change in functionality. Just getting a test infrastructure in place
before rewriting to use new EmailProvider. Provides tests for:

* get type (raw & thumb)
* open file (raw)
* open file (thumb)
* query
* resolveAttachmentIdToContentUri
ttachmentProvider.java
41f775bbc731b25854da9f5a80c66a4aa1eb0af9 22-Jul-2009 satok <satok@google.com> Modified to display unread count correctly.
mailContent.java
7375d950e4c71a3ab2c8c726b7641c825fb92efc 24-Jul-2009 Marc Blank <mblank@google.com> Move to single EmailContent file; fix bug #1998157
mailContent.java
531ae9d25f4310e4774e136ed74ed9749f940861 23-Jul-2009 Marc Blank <mblank@google.com> Fix bug #1997284 re: single default account

* Fixed the bug and uncommented the relevant tests in ProviderTests
mailContent.java
9e2c6bd5f21f2d19eef7ebfe30e6fdf94ede0857 23-Jul-2009 Andrew Stadler <stadler@android.com> Remove saveOrUpdate from EmailContent to prevent stale writes

* Numerous classes modified to deal with this change
* Fixes bugs 1993292 and 1994671
* Renamed various setter and getter methods to reflect the underlying
field names
* Renamed syncFrequency to syncInterval in Account and Mailbox
* Convenience method added to AccountSettings to save only user settings
* Calls to content.update(context, content.toContentValues()), which save
all fields, should be double-checked for correctness, making sure that
content has current data and will not conflict with other threads that
might modify that data
* Ran all unit tests to confirm proper function

NOTE: The logic to enforce single default account no longer works,
because that logic is in Account.save() and does not run via
Account.update(). I have patched out a small section of the relevant unit
test and will file a bug to come back for this fix.
mailContent.java
mailProvider.java
54c1f2bf9a6574240b7c9af253f83a2b566442ab 22-Jul-2009 Andrew Stadler <stadler@android.com> Improvements to default account handling

* Remove all references to Account.mIsDefault, which was not the right
way to find the default account (it is lazy initialized)
* Change Account.getDefaultAccount to getDefaultAccountId, which is more
efficient and suitable in most uses.
* Wrote unit tests for provider default account handling

This should resolve bug 1983390 as well as a few other issues with default
account management.
mailContent.java
eda017627e7234fb8c7d0fa4cc41557bb2bf796a 21-Jul-2009 Marc Blank <mblank@google.com> Prevent EAS startup race condition while debugging

* Make sure that mAccount and mMailbox are up-to-date at all sync starts
* Prevent duplication of mailboxes in schema, since it's always wrong
* Add a service call to enable/disable logging in EAS
mailProvider.java
5790d1458fc9f4c3e32a985827f3b3e942a356c9 20-Jul-2009 Marc Blank <mblank@google.com> Work on EmailService calls, attachment loading, etc.

* Stubbed in attachment loading in MessageView for EAS messages
* Modified MessageView.Listener to implement IEmailServiceCallback
for testing callback functionality
* Rewrote EmailServiceProxy entirely
* Simplified loadAttachment service call
mailProvider.java
53093871c492d03947c494f17e2463b27345e083 18-Jul-2009 Marc Blank <mblank@google.com> Changes to EAS: attachments, HTML text, and sending mail (without atts)

* Added HTML support for Exchange 2007 and later
* Modified MessageView to show HTML parts of body (if present)
* Replace some unused convenience methods in Body to be ones that are more
useful (i.e. retrive body for a given message id)
* Made EAS sending operational
* Updated SyncManager to recognize the creation of new messages and check
for work to be done (i.e. starting Outbox sync)
* Modified MessageView to remove EmailContent.X references
* Also changed the pattern EmailContent.getContent(cursor, class) to the better
new ClassName().restore(cursor)
* Add a test of the utility to determine mime type from file name (since
EAS doesn't provide this with attachment header information)
* Fixed bug in ProviderTestUtils in which the base (EmailContent) fields weren't
being checked for equality in the various subclass equality testers. Fixed a
bug in saving emails that was caught by fixing this bug.
mailContent.java
mailProvider.java
4119218e2fd64341ac946fb8f2cbdb796a444cb8 17-Jul-2009 Andrew Stadler <stadler@android.com> Add support for get-attachments-by-message-id

* clean up provider URI's in this area
* minor bugfix in EmailContent, and add auto-writeback of messageId into
saved attachments
* clean up existing attachment unit tests
* add new tests
mailContent.java
mailProvider.java
f33986d5cc248d2eeed0707143d81e94866f8e3a 16-Jul-2009 Mihai Preda <preda@google.com> Eliminate Config.LOGV (deprecated, always false).
Add Email.LOGD as a development log guard.
mailProvider.java
976f92908dd2f69f21f62690632ff24b08d9f5d3 16-Jul-2009 Marc Blank <mblank@google.com> Add support for attachments in EmailProvider and (preliminary) EAS

* EmailProvider now saves Attachment records atomically with Message (and Body,
of course) if an ArrayList is stored in mAttachments
* Update EAS code to support attachment discovery
* Update EAS code to support attachment download via service API (preliminary)
* Add test for atomic attachment save
* Add test for unique file creation (external)
mailContent.java
c6893ddf0fc1a647ca13a2b3aac2c68ca345de37 09-Jul-2009 Mihai Preda <preda@google.com> First steps towards using the new EmailContent.Message in MessageCompose.
mailContent.java
mailProvider.java
6b158f715b2ab6b2f35e894857446023f1d8be88 14-Jul-2009 Marc Blank <mblank@google.com> Handle UI delete in EAS where the message is moved to trash

* Check for the folder of updated messages, and delete those now in trash
* Created convenience method for finding a mailbox of a particular type in
an account (helpful for finding, say, an Inbox or Trash for a given account
* Fix deleted/updated message table so that the _id column is defined to be
unique (to prevent duplicate change records from being written)
mailContent.java
mailProvider.java
b6493a07ef625c0e290890c2e60256b47a066e5e 05-Jul-2009 Marc Blank <mblank@google.com> Major refactor and cleanup of EAS code

* Rewrote push logic to encompass multiple folders (i.e. calendar/contacts)
* Change inbox from push frequency to ping frequency after initial sync
* Implement upsync logic for email (i.e. sending changes to the server)
* Did cleanup of some files (there's still some to do) re: format, style
* Initial one-way sync of Contacts data - add and delete are implemented
* Created adapter package for all parts of the EAS adapter
* Created utility package for utility code that will eventually be merged
with code in the Email application (Base64, QuotedPrintable, etc.)
* SyncManager/AbstractSyncService can be used in the future for other
protocols, especially IMAP push
mailContent.java
mailProvider.java
ddc871d9eddd088c0200a30dbfeb24812a81cf80 30-Jun-2009 Andrew Stadler <stadler@android.com> Fixed a few EmailProvider omissions; added tests

* EmailProvider query wasn't handling queries for deleted messages
* EmailProvider wasn't catching exceptions on some 'drop table' ops
* Added tests of synced messages (delete and update)
mailProvider.java
73018c31d6b8ea636f371025f1c26670437c1129 28-Jun-2009 Marc Blank <mblank@google.com> Add new mailbox types for use by EAS
mailContent.java
f374304e92cc6c27ce1a59242d4b9ff02a9cbb14 27-Jun-2009 Marc Blank <mblank@google.com> Add support for sync related provider operations

There is now a deleted table as well as an updated table for Messages,
and some new URIs that are well documented in EmailProvider
mailContent.java
mailProvider.java
7143d969dde180b7a44bdc42ade6ca2878d0760d 25-Jun-2009 Andrew Stadler <stadler@android.com> Add unit tests for Provider and fix bugs that were found

Uses a mock provider to avoid touching production databases.
Includes utilities for creating accounts, mailboxes, and messages.
Tests basic object creation & readback, object deletion, and some
forms of hierarchical deletion. Has many TODO notes for additional
tests to be written.

In EmailContent, found & fixed a few fields that weren't being written to
the database properly.
mailContent.java
5f4dbd64389cd6540a93cde1daed304bf9392a01 24-Jun-2009 Andrew Stadler <stadler@android.com> Attempt to download small messages, and POP messages.

POP doesn't supply headers in the ENVELOPE phase, so we have to
explicitly ask for, download, copy, and save small message bodies.

Fix bug in EmailProvider (it was not always detaching the body db),
leaving the DB locked in some situations.

Problems outstanding:
* POP messages are committed before they have headers, which leads
to blank entries in the UI. It might be worth tagging them and
selecting them out until they're ready to display.
* Inefficient because we're reloading the message from the provider on
each pass, instead of hanging onto it and updating it.
* Not marking "complete" yet because we aren't handling attachments
or inline images yet. So we keep on reloadin'.
mailContent.java
mailProvider.java
2c67f1f8b869454ed24c0ac3c813aca26d2f3978 16-Jun-2009 Marc Blank <mblank@google.com> Initial submission for EAS support (email)

* There is some temporary code ensuring that SyncManager runs (this will be removed when Exchange
is entirely independent)
* The service interface (aidl) is in place for most user-facing actions (load more, start sync, etc.)
* EAS account validation is done via aidl
* Folder and message sync appear to be functional in this early submission
* Provider now does cascading deletes (Account -> HostAuth and Mailbox, Mailbox -> Message,
Message -> Attachment and Body)
mailContent.java
mailProvider.java
7b0b463477ef7172bd4b9e19c6338634ebedd8ee 23-Jun-2009 Andrew Stadler <stadler@android.com> List messages from MessagingController & Stores.

* update MessageListener callbacks and remove the callbacks that
edit data (this comes through the provider now).
* provide simple linkage via Controller to sync a mailbox
* update FolderMessageList to trigger mailbox sync
* rewrite synchronize to push messages into provider
* small improvements to FML (sorting; show read/unread status)
* note: trailing whitespace cleanup in some files
mailContent.java
33e176f4919569a9444d641e94034785c10c5562 21-Jun-2009 Marc Blank <mblank@google.com> Remove the bodyId column in the message base for consistency

Foreign keys belong in the child, not the parent, as is done with other
EmailContent classes. Therefore, Body has a messageKey, and Message has
no bodyKey.

Updated MessageView to use the proper query for retrieving a message body.
mailContent.java
mailProvider.java
bcec088320fc56cd5b5e1bbc706e4b7e304b95bf 18-Jun-2009 Andrew Stadler <stadler@android.com> Begin implementation of new master controller

The first thing we'll implement is a function to list remote folders,
and it will call the existing MessagingController to do that for IMAP
and POP3.

Also change default folder type # order to get desired order in UI
mailContent.java
19fd130680ca39e133d24262e425f00263276cb2 17-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 4482

* changes:
Add URI's for updated messages, and Provider support for them
e34525d0f026a7467cee1cb5fddcf25ba6f35207 17-Jun-2009 Marc Blank <mblank@google.com> Add URI's for updated messages, and Provider support for them

Messages that have been updated in the database live in a different table
and therefore can't be accessed in the provider without the added support.
mailContent.java
mailProvider.java
94386cce2ae71c81981b7c6792332d719a1071cf 17-Jun-2009 Mihai Preda <preda@google.com> am aeeefedb: Thumbnail cache file should be deleted when AttachmentProvider is created.

Merge commit 'aeeefedb43c40e887850654ac88270755f5631c1'

* commit 'aeeefedb43c40e887850654ac88270755f5631c1':
Thumbnail cache file should be deleted when AttachmentProvider is created.
1f5a93936bb8a6364f6563d99a4e5a452b25af63 16-Jun-2009 Marc Blank <mblank@google.com> Fix to bug in Message.save
mailContent.java
aeeefedb43c40e887850654ac88270755f5631c1 16-Jun-2009 Mihai Preda <preda@google.com> Thumbnail cache file should be deleted when AttachmentProvider is created.

Integrates CL 149651 from p4 Docomo email.
Bug 1902523.
ttachmentProvider.java
b5903285dd6d2d95ce80016fa192c9ed44a04f25 16-Jun-2009 Andrew Stadler <stadler@android.com> Enable MessageView using provider.

Very primitive, just shows a few headers, and no navigation at all (you
can only go "back" from here.
mailContent.java
a290f503f14432163f74548a5e5d1dc5003ad049 15-Jun-2009 Marc Blank <mblank@google.com> Refactored EmailStore, EmailContent, EmailProvider

EmailStore goes away, replaced by EmailContent
All database activity is moved to EmailProvider
ttachmentProvider.java
mailContent.java
mailProvider.java
mailStore.java
68a9ccfcde85505f06ddba28c22481c80419ddd4 10-Jun-2009 Andrew Stadler <stadler@android.com> final cleanups to get basic message operations working properly.

* Generate compatibility UUID early enough to stick, so our localstore
db's are created correctly and not recreated over and over again.
* Compose menu items working
* Fix single-account mode (go straight to inbox)
* Lightweight Account projections where possible
* Properly show/hide default account checkbox (during new acct screens)

What works:
* All unit tests
* Editing existing accounts
* Create new accounts
* Checking account settings against server
* Mail sync using accounts
* Viewing mailboxes
* Viewing messages
* Composing messages

What breaks (in approx order of planned fixes)
* Some details of account editing
* Import of existing accounts
mailStore.java
d2b0efa2f591f883eaad3d9f8996bbacdcec5c34 09-Jun-2009 Andrew Stadler <stadler@android.com> Cleanup broken unit tests from previous submit. This now works:

What works:
* All unit tests
* Editing existing accounts
* Create new accounts
* Checking account settings against server
* Mail sync using accounts
* Viewing mailboxes

What breaks (in approx order of planned fixes)
* Viewing messages
* Composing messages
* Some details of account editing
* Import of existing accounts
mailStore.java
c0033f24a26a08c47aa38d957f42cf63cfa3c345 09-Jun-2009 Andrew Stadler <stadler@android.com> Convert remainder of app to use provider-based accounts
What works:
* Unit tests, except for com.android.email.activity.setup.*
* Editing existing accounts
* Create new accounts
* Checking account settings against server
* Mail sync using accounts
* Viewing mailboxes

What breaks (in approx order of planned fixes)
* Unit tests in com.android.email.activity.setup.*
* Viewing messages
* Composing messages
* Some details of account editing
* Import of existing accounts
ttachmentProvider.java
mailStore.java
294a4fd0c6b15c1f8f41ca03be66ed95e16e5a6d 06-Jun-2009 Andrew Stadler <stadler@android.com> Enable creation of new accounts using provider-based accounts.

What works:
* Editing existing accounts
* Create new accounts
* Checking account settings against server

What breaks (in approx order of planned fixes)
* Some details of account editing
* Viewing mailboxes & messages
* Mail sync using accounts
* Import of existing accounts
mailStore.java
9019315b2642d58691cf09d32c07c0cf902f0a41 04-Jun-2009 Andrew Stadler <stadler@android.com> Conversion to provider-based Account. What works:
* Editing existing accounts
* Two placeholder accounts are written

What breaks (in approx order of planned fixes)
* Some details of account editing
* New account creation,
* Viewing mailboxes & messages
* Mail sync using accounts
* Import of existing accounts
mailContent.java
mailProvider.java
mailStore.java
361a7225f2aa86ce3bdecdff0f99500417d00e88 03-Jun-2009 Mihai Preda <nobody@android.com> am d64d0e56: Merge branch \'readonly-p4-donut\' into donut

Merge commit 'd64d0e56de58ca3c776f2edae1ebbbafd500d15e'

* commit 'd64d0e56de58ca3c776f2edae1ebbbafd500d15e':
AI 149523: Correctly display inline images in Reply and Forward messages.
7436601fae756e8bc1f916560a1c2d1f8ce576fc 03-Jun-2009 Mihai Preda <nobody@android.com> AI 149523: Correctly display inline images in Reply and Forward messages.
Integrates CL 148436, 148515, 148833 from imode email.
BUG=1814789,1860250

Automated import of CL 149523
ttachmentProvider.java
84969fb580f569c0e3625a3c59a71d2909ae198d 01-Jun-2009 Fred Quintana <fredq@google.com> update to adhere to applyBatch changes
mailProvider.java
mailStore.java
0cb7ddfc27413fa7b2a4228ad9dc148d19c9c14d 02-Jun-2009 Andreas Huber <andih@google.com> Fixing the build. Methods implementing interfaces must not be declared @Override.
mailStore.java
626f3e48a4f14c38a973dd2bea2e2debea7637a5 01-Jun-2009 Andrew Stadler <stadler@android.com> Updates to EmailStore and EmailProvider:
1. Call notifyChange() after all API calls.
2. Make Account & HostAuth parcelable
3. Temporary APIs to create "store URI" strings for the existing mail code
mailProvider.java
mailStore.java
4c27102aea9921a6bbdfec3bc44e32d5d03c47d9 01-Jun-2009 Mihai Preda <nobody@android.com> am fbde900c: Merge branch \'readonly-p4-donut\' into donut

Merge commit 'fbde900c37ae76ec3c6181b3328d4ddf7c46cc7e'

* commit 'fbde900c37ae76ec3c6181b3328d4ddf7c46cc7e':
AI 149442: Integrate CL#140625 (Fix attachment uri and content uri confusion) from imode to donut.
AI 149328: Add extended header support to MimeMessage, MimeBodyPart, and LocalStore.
5182d80674a1ef90586f52355a21a82e8265c10a 01-Jun-2009 Mihai Preda <nobody@android.com> AI 149442: Integrate CL#140625 (Fix attachment uri and content uri confusion) from imode to donut.
BUG=1598754,1860250

Automated import of CL 149442
ttachmentProvider.java
fae4727a911a13cd0bfaaf2f1167d780bafb592b 29-May-2009 Marc Blank <mblank@google.com> Squashed commit of the following:

commit 19beb6f0cc6c0f3f0cbcdcd66cec9f141b470d70
Author: Marc Blank <mblank@google.com>
Date: Fri May 29 14:23:01 2009 -0700

Changes to EmailProvider

commit 84cced7b94bde4688ad986a45a6bf876cde3bdbe
Author: Marc Blank <mblank@google.com>
Date: Fri May 29 14:02:20 2009 -0700

Fix additional formatting issues.

commit 1faeb1763ba8a967fbf79ddbc48822af08c65a15
Author: Marc Blank <mblank@google.com>
Date: Thu May 28 19:26:03 2009 -0700

Changes in EmailStore.Account
- Add isDefault column
- Add status methods setDefaultAccount/getDefaultAccount

Resubmit previous with formatting issues addressed.
mailProvider.java
mailStore.java
ea6b71e0f4b515df378426a703bf3261db2f1306 28-May-2009 Andrew Stadler <stadler@android.com> Per android code style guide, all member variables start with "m"
mailContent.java
mailProvider.java
mailStore.java
bd649fc1fd0f8018b2c2036ed7a1465af6fdfd8a 28-May-2009 Andrew Stadler <stadler@android.com> General changes to generalize account & hostauth classes:
- Remove references to SMTP and use generic "send" and "recv" notation
- Move protocol indication into hostauth
- Add TLS (along with SSL)
mailProvider.java
mailStore.java
2e758791d000ec1648bd2199dd1209d36488b69c 28-May-2009 Andrew Stadler <stadler@android.com> Rename Email to EmailStore to avoid collision with existing Email.java
mail.java
mailProvider.java
mailStore.java
c5f2a7af7679e46ae08bbe399680495b9bc6679a 28-May-2009 Marc Blank <mblank@google.com> I fixed the authority in Email to point to the EmailProvider's authority, and I added the EmailProvider to the manifest.
mail.java
f3d5b202360031979714c3e366c386bcc7e6a40e 27-May-2009 Andrew Stadler <stadler@android.com> Import first versions of Provider from Marc
mail.java
mailContent.java
mailProvider.java
96c5af40d639d629267794f4f0338a267ff94ce5 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
ttachmentProvider.java
8c2158a5ebb88e226c23b66ff95910158a2727df 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
ttachmentProvider.java
687f9962d7095e18ef994cd0e64337f02ed1a5bd 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
ttachmentProvider.java
8978aac1977408b05e386ae846c30920c7faa0a6 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
ttachmentProvider.java