History log of /packages/apps/Email/src/com/android/email/provider/DBHelper.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5b323a3d1504411f1e88ba6621ebc0673a586e3f 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