History log of /packages/apps/Email/src/com/android/email/provider/DBHelper.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7525feb244db87eadf3a95baf3918438b0fbbb75 12-May-2014 Tony Mantler <nicoya@google.com> Move email bodies to files

Change-Id: Icfd0c4ab2ad25cc02b45cf41e7a205c17948ef2c
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
3dd85723a1af5537e23e4b05bdc361cce9cd42be 11-Apr-2014 Tony Mantler <nicoya@google.com> Cleanup in EmailContent

Change-Id: Ifa251eb206779f59ea003f99395d454c7e407bc2
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
6f7c1c824d7c5e31be8fd9878e812f2c0484bae7 01-Apr-2014 Anthony Lee <anthonylee@google.com> b/13734162. Make sure that SmartForward is enabled on EAS accounts.

This is an Algol only fix that needs to be reconsidered for L.
The fix comes in 2 parts. The first addresses existing accounts.
The second addresses new accounts. First we check that the protocol
is EAS and then we check the protocol version to be greater than
12.0 before setting the flags. In the future, the protocol specific
flags should be set in the protocol specific components.

Change-Id: I00a6fa3337d5230801f6de8876332c66deeae2c4
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
5057d6dffb994b4d1d02c05e06f679de8ef05ea5 25-Jan-2014 James Lemieux <jplemieux@google.com> Replying to a Message with an encoded email address shows the encoded address in the to field.

b/11658428

As per Yu Ping's advice, we alter the storage of all email addresses (from, to, cc, bcc and
replyto) to be stored in *decoded* format within our database. This makes them both human
readable when inspecting the database manually and alleviates the need to repeatedly decode
them before they are displayed anywhere in our UI layers.

As part of this bugfix, I resurrected several tests related to the LegacyConversions class out of
LegacyConversionsTests and into a new (not Suppressed) test class: LegacyConversionsTest

Change-Id: Ie2e3264646e25c08c4ba74f60b3e1090c052e6c6
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
eba80c114e87346aeb64bbff91ef11b0ba566fd6 07-Mar-2014 Anthony Lee <anthonylee@google.com> b/9564335. Add support for a maxAttachmentSize column in the Account
table and connect the data to the Settings object in the existing
location (SettingsColumns.MAX_ATTACHMENT_SIZE).

Change-Id: Iaf48995757511e1dfb65aa35ff6d81bbc47187bd

Conflicts:
src/com/android/email/provider/DBHelper.java
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
1fa303478c61e0d703011996e358037eef523176 23-Jan-2014 James Lemieux <jplemieux@google.com> Eliminate redundant methods in Address class

THIS DOES NOT CHANGE ANY EXISTING FUNCTIONALITY.

Address.pack() has been removed and all calls replaced with its synonym Address.toHeader().
Address.unpack() has been renamed to Address.fromHeader() to follow the new naming convention.

In days of yore, pack() and toHeader() used to do different things. Now they are identical and
thus one is superfluous. We have standardized on toHeader() and fromHeader().

Change-Id: Iac91c966eb6c1477f8dba0dd2ae01c84b359e539
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
2bf9590ddd463d39cc4dc73e26aaf5dd590415b2 11-Dec-2013 Jerry Xie <jjx@google.com> Fix SQLite update query

Change-Id: I54a5e2f29e1e171901e7087e27d132256460f0f5
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
0b25179dab10dc7dfb91210cabfe637f3067d777 04-Dec-2013 Martin Hibdon <mhibdon@google.com> Allow database to hold oauth credentials

Change-Id: I127297fd78c7676995f1dcfa59fbbcafe4e72e8e
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
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
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
1a6a3fe797d636ff371c6b7d0f8aae7577aff210 01-Nov-2013 Yu Ping Hu <yph@google.com> Fix off by one error.

Bug: 11475318
Change-Id: I046fc66713c54f355a3dc4e6b7b7b288a1450326
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
7b7d7d5cb57c9f0e589b686511eabf3c73f96f00 25-Oct-2013 Yu Ping Hu <yph@google.com> Fix DB upgrade code.

Bug: 11294681
Change-Id: I7333aabbdb9e45154d83386b85398e6d108e5bf2
/packages/apps/Email/src/com/android/email/provider/DBHelper.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
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
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
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
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
/packages/apps/Email/src/com/android/email/provider/DBHelper.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
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
e3a4a1b25dd20dfd69793ca953f3299bcf6f0501 17-Sep-2013 Yu Ping Hu <yph@google.com> Remove dupes before syncing new messages.

Bug: 10440557
Change-Id: I4ade38a8bb15cbc22b6c10a5f270274fef6f1fca
/packages/apps/Email/src/com/android/email/provider/DBHelper.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
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
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
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
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
/packages/apps/Email/src/com/android/email/provider/DBHelper.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
/packages/apps/Email/src/com/android/email/provider/DBHelper.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
/packages/apps/Email/src/com/android/email/provider/DBHelper.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
/packages/apps/Email/src/com/android/email/provider/DBHelper.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
/packages/apps/Email/src/com/android/email/provider/DBHelper.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
/packages/apps/Email/src/com/android/email/provider/DBHelper.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
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
0c06a7cf995c0d3e5dcccae97349891a46c3320f 10-Apr-2013 Paul Westbrook <pwestbro@google.com> Fixed mis-located cleanup code

Bug: 8565783
Change-Id: Iab06411cc85cd4958db574ec52eeebb7457c980f
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
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
/packages/apps/Email/src/com/android/email/provider/DBHelper.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
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
32881e8dd375f16e6059452166503f7136f14ae5 05-Mar-2013 Paul Westbrook <pwestbro@google.com> Fix NPE after migrating older account

Change-Id: Ifeb3b1853ce3efd725227941103d29a00bc14fc2
/packages/apps/Email/src/com/android/email/provider/DBHelper.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
/packages/apps/Email/src/com/android/email/provider/DBHelper.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
/packages/apps/Email/src/com/android/email/provider/DBHelper.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
/packages/apps/Email/src/com/android/email/provider/DBHelper.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
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
cee9881650e01da155b3d7117357a15f49a7a4a1 03-Aug-2012 Marc Blank <mblank@google.com> Fix typo in DBHelper

Bug: 6930157
Change-Id: Id98cb1772b3d2d58dcd3098566f1096b10ea66f2
/packages/apps/Email/src/com/android/email/provider/DBHelper.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
/packages/apps/Email/src/com/android/email/provider/DBHelper.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
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
c5afb16430a145f20d7c887e45f47b38687054da 28-Jun-2012 Marc Blank <mblank@google.com> Add a bunch of stuff missed earlier

Change-Id: I7f707446a963912fe5786dacb5569e68db572d1c
/packages/apps/Email/src/com/android/email/provider/DBHelper.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
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
e2166f75486da0a1b70b804ea34f11f600f11cfd 11-Mar-2012 Marc Blank <mblank@google.com> Add totalCount to Mailbox; send to UIProvider

Change-Id: If01868eb27a97540683f25148f32b8c41ae59c17
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
70bbe5ec3cabfc711cf4486318a04bb18e34ebf3 07-Mar-2012 Marc Blank <mblank@google.com> Add columns to Attachment for UIProvider use

Change-Id: I7f85431f409dbd6a5bd6d111b18d1fc89c00b9b2
/packages/apps/Email/src/com/android/email/provider/DBHelper.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
/packages/apps/Email/src/com/android/email/provider/DBHelper.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
/packages/apps/Email/src/com/android/email/provider/DBHelper.java
63d60d9eb182d583d08e6d4b6dc11b392dede6f1 03-Feb-2012 Marc Blank <mblank@google.com> Split EmailProvider into two classes (and about time)

Change-Id: Ia72e8c83ea16718077ffe8b8d284d18b6f9f0786
/packages/apps/Email/src/com/android/email/provider/DBHelper.java