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
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
b/11081520
This improves perceived performance, the inbox
messages will come in before contacts and calendar
Change-Id: Icd9630d9cd2fb79a54d0ed2c11702a1a3091ed7e
Some changes that allow a notification to open Account Settings for a specific
account
Bug: 10930585
Change-Id: Ib329e339b405ccbc0631d5ce6a23bf8fa6d62b83
Deletes all messages in a mailbox, resets the sync key and requests a sync.
Only supports Mail mailboxes for now.
Change-Id: Iab8c051631f38687c02a22cb80ce4f50c2d9c6f1
Also ignore messages without server ids for moves and
state changes.
Also cleanup to match needs of EAS upsync.
Bug: 10678136
Change-Id: Id4d5229b8479e61bd718b707b0d2bc77a9e68046
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
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
These settings need to be migrated from the database, not the
SharedPreferences file that likely shouldn't even exist.
Everything added to Account.java was removed in
Ie6ec389b5b5d2e7ab1b299d0877811ae716526e2
when it was believed to be unnecessary.
Bug: 10211615
Change-Id: If6193758febda8a3272d82792492503549a44e32
This will better handle the case where the Email package name
changes from the "orignal package name"
Bug: 9763397
Change-Id: I8e01620551ce473e389e6a13963caaf685aea221
If two threads call EmailContent.init(), one of them may use
uninitialized EmailContent contstants
Bug: 10355491
Change-Id: Iedcad01345989df62baf755bf4d63c123e307b7c
This isn't a great situation -- it suggests the PolicyService
is having some sort of RemoteException -- but when it happens
we should just treat it the same as if the policy is not
enforced.
Bug: 10315113
Change-Id: If2fbe1648a5c6f3df13cef02c8dc5bc6e858f2d9
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
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
I'm formalizing the concept of folders that must exist,
and the list of such folders should be accessible to all
sync adapters.
Change-Id: I9e4d2d51aa495d211eab2d1e36c3fa197a1ac00d
- 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
The old callback mechanism is deprecated, in favor of making
calls on the ContentProvider.
Bug: 9842867
Change-Id: I65f559e593cda24456c4ffb96f785e054626dd0b
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
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
This was unused, and I want to write a query in Exchange
that wants to get a message's mailbox key, so I'm taking
this over.
Change-Id: I142394bfd30df8c88c5e1b48347a8532a4758857
This is part of moving away from the explicit setCallback,
which either has race conditions or is very noisy, or both.
(Each IEmailService call that wants callbacks should just
pass the callback explicitly.)
I'm not yet changing how the services actually handle the
call. Each protocol will need to fix this on their own.
Bug: 9735207
Bug: 9842867
Change-Id: If8cf69ffe82f3544ace9e58b1db5a183f38d038a