update default calendar values for new columns

Change-Id: I3d98754c2b6e8fc80bb313abe9f0b9aea11ac797
During validation, handle 403 as ACCESS_DENIED

* This is more correct than handling as a provisioning error, and
  will allow Exchange 2007 servers to deny access by device type
* Also, never return an empty array in unsupported policy list;
  this leads to garbage text being presented to the user

Bug: 5533200
Change-Id: I23e6aa70970404ac986fd4a40ef4bf41cf410155
Fix missed case related to old CalendarProvider change

* We missed a case in which we needed to add asSyncAdapter when
  writing ExtendedProperties to CalendarProvider2
* This breaks any attempt to upload changes to attendee status
* Finding this at the last moment is Yet another indication of
  how our Exchange testing is painfully  broken
* The fix is extremely safe, and recommended for all branches

Bug: 5576733
Change-Id: Ibe28b82e329ed81f59b1a4db04e9b09ea7854198
Make sure that account mailbox is always "syncable"

* The test isMailboxSyncable in ExchangeService lumps the account
  mailbox in with regular email mailboxes; this means that the
  account mailbox won't sync if "Sync Email" isn't checked in the
  settings
* Fix this by always allowing the account mailbox to sync
* Also, make sure we're upgrading account flags properly for ICS

Bug: 5582884
Bug: 5532630
Bug: 5577486

Change-Id: Iee93eab31adf7a844260a0abc490280b08977a61
Add a bit of logging for HTTP errors in folder sync

Bug: 5605472
Change-Id: I1b0a62548b1703c9c3574d8799770c2dd08e9d01
Return proper code for auth failure during autodiscover

* Regression from HC in handling bad username/password from the
  autodiscover screen

Bug: 5612276
Change-Id: I9ab5881b38225919a6d82536fd387af717dd44d7
Attempt to better handle screwy MSFT time zone information

* Exchange appears to send time zond data that doesn't really match
  any time zone in our database; in these cases, we have been
  returning a random one with the same bias (base offset w/o DST)
* In this CL, we try to do better by giving the time zone information
  a bit more slack when the regular determination fails (we allow
  the hour of change to be up to 4 hours different from expected,
  rather than one minute).  This is certainly better, though I do
  not have an explanation from MSFT about the reason for the
  erroneous data.
* Updated unit tests to confirm that we don't break any existing
  code and do, in fact, handle the case reported below as a P1/S1
  bug.

Bug: 5605219
Change-Id: I8c17a687404204aff4feb1c3009adde279110cab

Conflicts:

	tests/src/com/android/exchange/utility/CalendarUtilitiesTests.java
Handle provision request during ping loop

Bug: 5699760
Change-Id: Ib014d769e6b09b0e40f58e7d99adf65504b27eb9
Messages in trash should be permanently deleted upon deletion

* We were always using "DeletesAsMoves", which is wrong for the
  trash folder
* Handle difference in the use of "DeletesAsMoves" in Exchange 2003
  and later versions (sigh; reversed defaults, etc.)

Bug: 5703706
Change-Id: Id0f567f5d48a0976b0ce2226b8c1a87debc25cc4
Have EasSyncService use same connectivity test as ExchangeService

* This will prevent looping behavior due to any inconsistency in
  result of the test.

Bug: 5707530

Change-Id: I0d3cd6888b370a6f8a2d044192a909c830e6cada
Merge "Fix inefficient EAS server deletes" into ics-mr1
Merge "Fix folder sync parsing and parent initialization" into ics-mr1
Conflicts:

	tests/src/com/android/exchange/adapter/FolderSyncParserTests.java

Change-Id: If9008a225cd206211eeaa4790f1c3abb22f35de8
Merge "Don't rely on "chunked" mode for sending EAS 14 email" into ics-mr1
Merge "DO NOT MERGE: Always allow max calendar age policy" into ics-mr1
DO NOT MERGE: Support email lookback policy

* Requires related CL in Email app
* Clean backport from master I007a022bfec4871ecfde76779e24d26246b651bc

Bug: 5792217
Change-Id: I8a6fb7b46090ee1f2276254e601438c4b36e6306
Reopen message filestream before retrying w/o SmartReply/Forward

* If the original message being replied to/forwarded has been
  deleted before the reply/forward is sent, we get a 150 status
  from EAS 14 and retry without the "smart" feature
* However, we weren't resetting the message file stream before
  the retry, causing the send to fail
* Trivial fix, moving the file stream opening into the loop

Bug: 5832490
Change-Id: I522eff5c0b0478dc1c288e54a978eddb529e848a
Handle empty tag for EAS 14 event reminder

* EAS < 14 doesn't send a tag when there's no reminder; EAS 14
  sends an empty tag, which we interpret as 0 minutes
* Fix is to detect the empty tag and not create a reminder in this
  case

Bug: 5848662
Change-Id: Id7a8e1d4b4c72e1456e15a1a209cbf60586f9f84
Handle case of duplicate messages when using Fetch (EAS 2.5)

* It turns out that it's possible to have two messages with the
  same server id and mailbox; this causes our HTML-loading code
  for EAS 2.5 to loop indefinitely.
* It's unclear whether the cause is ours or Hotmail's, but the
  fix simply deletes the duplicate when it's detected

Bug: 5789201

Change-Id: I42e7cd9a4b3b3693dae38ac93941bb69f31b0051
DO NOT MERGE: Fix binder transaction failures in CalendarSync

* Created a facility for handling the newly implemented
  TransactionTooLargeException that the framework can throw if
  we send a too-large batch of data to a content provider.
* For now, we're just using this with CalendarSyncAdapter,
  which is where we've seen problems in the past, and in
  the referenced bug.
* The test account hits the exception, and then appars to
  successfully finish syncing the calendar
* Clean backport of I3c7ce3ada940464d1ee1f69bd6192640ebbd8fa3

Bug: 5516422
Change-Id: If9e94be0c5f6a65775a20879b301cc8245060809

Conflicts:

	src/com/elbenj/exchange/adapter/AbstractSyncAdapter.java
	tests/src/com/android/exchange/adapter/CalendarSyncAdapterTests.java
Handle HTTP redirect (451) in OPTIONS and FolderSync

Bug: 5926621
Change-Id: I400277c9f60f6527acf361da1c863e93327eb948

Conflicts:

	src/com/elbenj/exchange/EasSyncService.java