* EAS 12.0/12.1 don't mind these, but EAS 2.5 objects in some cases
(title and prefix, certainly) and the upsync fails
* The error case occurs because the ContentValues provided by
ContactsProvider actually has a value; the value, however, is an
empty string
* Prevent this by checking for empty values before serializing
Bug: 2607778
Change-Id: I853ce711024a414f53861720000cc87a7349d660
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
There're differences between how SMTP and EAS use this callback.
We should eventually unify the behavior, but till then let's not
use sendMailCallback().
Bug 3116377
Change-Id: Ic5ecf16251c11ab2bd2e16e29bd417f1ece67f14
When removing the original, need to clear FLAG_TYPE_REPLY and FLAG_TYPE_FORWARD
flags too.
Bug 3125167
Change-Id: I64be98bc10b5e1a0b9242c1c528ed96bb0a24fc1
* 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.
* Backport of Ifb71ad834530c6232728e1aad31439991f8ed379, fixing
2908737
Bug: 3121146
Change-Id: Ifa3a0ca8d3e34733c937d7f8c60f068984e1f4f2
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
* At this point, there are a lot of toasts shown that relate to
sync failures (e.g. "Unable to connect to server"). To help
find where they're coming from, add the display name of the
account
* UX folks: Please consider what this UI should be
Change-Id: Id9b76cd22178727bedaf67ad0b7450edff99a791
Now deleted drafts are really deleted, rather than getting moved to trash.
Also rewrote the test to avoid creating AsyncTasks on the test thread.
In this case it seems to be running fine, but I've had problems doing this
before.
Bug 3099179
Change-Id: Ice5298bf94312ce764d90aa35c5a6c5262ec5b42
* When any Account is modified, MailService gets a content notification and
runs reconciliation in an AsyncTask. Reconciliation ends up calling the
AccountManager, which also runs asynchronously. The net effect is that,
especially during unit tests, where we create/destroy accounts rapidly,
these calls can "back up", ending in a situation in which the worker pool
for AsyncTask is filled, with a resulting RejectedExecutionException
* We fix this by preventing more than one request for reconciliation to
be queued at a time
* Added a unit test that thrashes the notification handler
Bug: 2937628
Change-Id: Iaf25806efb46831f31704604360df091752d9525
ListView uses the _id column for some operations, including
onSave/RestoreInstanceState, and if the column contains negative values
they don't work as expected. The same assumption seems to be in other places
as well, so let's just avoid using negative IDs.
With this CL we now use two different IDs, one for ListView, which will
never be negative, and the other for us, the actual mailbox ID.
Bug 3049315
Change-Id: I263b4895212b5f8bb80c98acaf5c4eccd0bfef55
* It appears as if our running multiple sync threads can confuse the
mobile sync server during a remote wipe (the server expects the next
client response to be an acknowledgment, whereas it might well be
a command or response from a different thread)
* To avoid this, we first put the account on security hold and then
shut down all other sync threads for the account
* After this, we send the acknowledgment and the remote wipe proceeds
normally.
* NOTE: It's possible that, due to the vagaries of multithreaded
operation, one of the other syncing threads could still send a non-
acknowledgment response to the server before our provisioning thread
gets a chance to send its acknowledgment. However, since the other
syncing threads will terminate (and not restart, because of the hold),
the provision/remote wipe/ack sequence will work on the subsequent
attempt
Bug: 2844888
Backport From: Ib4ffbbc67b681e69176b6c1d5515fa80c7d1e121
Change-Id: Ie9e944bd39f331c2ddc0f0ba303a3d5684f6f033
* Apparently, Exchange 2003 doesn't like to see Visibility set in
Exceptions
* Apparently, Exchange 2003 likes to see Exception Deleted and
ExceptionStartTime prior to other data
* The word "apparently" is used above to indicate that these
findings are not part of any specification, but have been
determined empirically
Bug: 2775885
Backport of: I163f156675f65c494a59d5233b2b6e23b3f1d6a0
Change-Id: I5d32dea5c3903147725b8df87a71e961a4d78c60
The problem is that ths method is called in a worker thread, so
there's nothing to prevent it from running just after/at the same
time as clearContent() (which sets -1 to mMessageIdToOpen).
If it does, it passes -1 to restoreMessageWithId() and crashes.
Also removed a half-obsolete comment which is a bit too obvious for its length.
Bug 3077387
Change-Id: I736d696046e6d8964a16c80515544c582aca3943
Show this when there's no messages, and no "Load more messages" footer.
i.e. Only Outbox, Drafts, and exchange mailboxes can show "No messages".
Also removed an obsolete comment.
Bug 2363624
Change-Id: If483d33cfacb186d0fe54b4f4382333a332be84c
* It appears as if our running multiple sync threads can confuse the
mobile sync server during a remote wipe (the server expects the next
client response to be an acknowledgment, whereas it might well be
a command or response from a different thread)
* To avoid this, we first put the account on security hold and then
shut down all other sync threads for the account
* After this, we send the acknowledgment and the remote wipe proceeds
normally.
* NOTE: It's possible that, due to the vagaries of multithreaded
operation, one of the other syncing threads could still send a non-
acknowledgment response to the server before our provisioning thread
gets a chance to send its acknowledgment. However, since the other
syncing threads will terminate (and not restart, because of the hold),
the provision/remote wipe/ack sequence will work on the subsequent
attempt
Bug: 2844888
Change-Id: Ib4ffbbc67b681e69176b6c1d5515fa80c7d1e121
* Apparently, Exchange 2003 doesn't like to see Visibility set in
Exceptions
* Apparently, Exchange 2003 likes to see Exception Deleted and
ExceptionStartTime prior to other data
* The word "apparently" is used above to indicate that these
findings are not part of any specification, but have been
determined empirically
Bug: 2775885
Change-Id: I163f156675f65c494a59d5233b2b6e23b3f1d6a0
Current implementation ignores callbacks coming from
AccountManager, which should be called everytime
when this Activity finishes its job.
Bug: 3069222
Change-Id: Iea03cf94bdfe8da184e415bf7e759ddeb46ecdd9
Refresh mailbox list when changing the account, if it's been more than
5 minutes since the last refresh.
Change-Id: I5b1400bb881197e117b8863f850c368c2d1ccbc6
I was assuming MailService.resetNewMessageCount cleared notification,
but it didn't.
Doing it in Activity.onResume is clearly wrong because we don't always
have an account ID there. If we don't, we're passing -1, which clears
all notifications for all accounts.
We're now calling resetNewMessageCount() in MessageListFragment,
when we refresh the list, so we can remove it from onResume() for the Phone
UI as well.
Bug 3074056
Change-Id: Ib0bb2fbb0309a0784fb3a525927102f423e930df