Merge "Fix problem w/ sync of large calendars (never syncs)"
am 019f58c0: am 5c0f3b33: am 6bd7a167: Fix problem w/ sync of large calendars (never syncs)
am 719d29bd: am 4c8adbc4: am 027a6ddf: Merge "Fix bugs related to TZ handling for all-day events" into froyo
am 18abfe00: am ff1af297: am 8752159c: Fix critical typo in CalendarSyncAdapter
am 5d8df0fb: am d3951041: am 7f448dcd: Limit the number of attendees in a synced event
am 5e22fef1: am 17c8b338: am b6a08f68: Remember to store modified organizerEmail
Implement basic EAS 12.1 functionality

* Support required protocol changes
* Handle new security policies based on current device capabilities

Change-Id: Id1d629d41d957911344e6c503d28418f5e7e1386
am 930cdbd8: am 77e21615: am 8c742a4c: Handle case of null organizerEmail in changed event
Merge "Implement basic EAS 12.1 functionality"
Fix validation use of FolderSync

* To avoid having to use a mock deviceId with FolderSync in validation, we now
  simply use the real deviceId with the correct SyncKey ("0" for a new account,
  or the actual sync key if the account already exists)
* Rework utility code that finds existing accounts
* Write unit test for findExistingAccount

Bug: 2589243
Change-Id: Ia532b2e209aec3aa01ca06617b4da78c3d986b32
am ae432137: am be611500: am 27e75533: Merge "Fix format string ordering" into froyo
Refactor AccountsAdapter into its own class.

* Extract AccountAdapter from AccountFolderList
* Use callback instead of hardcoded launch of MailboxList
* Unit tests

Change-Id: Icafce1ef73a99fb61985c649620440656f9b51a3
Merge "Refactor AccountsAdapter into its own class."
Split UtilityUnitTests into medium and small test classes

Change-Id: I382bb2bd94ba4d800e907f9c439b4e03f1f20ea4
Merge "Split UtilityUnitTests into medium and small test classes"
New IMAP parser to fix long-lasting problems.

- Almost completely re-wrote ImapResponseParser layer
- We no longer use simple ArrayList and String to represent
  imap response.  We have classes for that.  (Type safe!)
  These classes are also NPE-free.
  (which isn't necessarily a good thing, though)
- A lot of clean-ups and fixes in ImapStore.
- More tests for ImapStore.

Now ImapResponseParser moved to com.android.email.mail.store.imap.parser,
but inside, it's 99% new code.

This CL introduces many new classes, but most of them are small classes
to represent the IMAP response.

Problems that this CL fixes includes:
- Special characters in OK response
- Handling BYE response
- Case sensitivity
- ClassCast/ArrayIndexOutOfBound/NumberFormatException
- Handling NIL/literals at any position

Bug 2480227
Bug 2244049
Bug 2138981
Bug 1351896
Bug 2591435
Bug 2173061
Bug 2370627
Bug 2524881
Bug 2525902
Bug 2538076

Change-Id: I7116f57fba079b8a5ef8d5439a9b3d9a9af8e6ed
Get rid of Handlers and make activities (more) BG thread free.

Part 1: MessageView

- It's an attempt to get rid of Handlers from Activities, and
  reduce the amount of code that runs run a BG thread in them.

- Introduced ResultUiThreadWrapper, which wraps another Controller.Result
  and make callbacks get called on the UI thread.

  - It'll make the logic in ControllerResults cleaner and more straightforward.

  - ResultUiThreadWrapper isn't too memory efficient because it allocates a
    Runnable even if the wrappee's target method is empty.
    However these callbacks don't get called often, and optimizing it would
    make code more complicated, so I don't think it's worth optimizing.

- Now we can assume all the methods in activities except
  AsyncTask.doInBackground runs on the UI thread, with some special exceptions
  like MediaScannerNotifier.
  In my previous abandoned change, I named methods that can run on BG threads
  '*OnUiThread', but now there's no need to do that.

  This also means we can minimize the use of synchronizations.

Change-Id: Ia6d9d2a266ebf5a4b23d712e9eaea3272adbd2a6
Fix ANR in one time initializer and unify BroadccastReceivers.

- Merged all three BroadcastReceivers into one.
  (Changed class name because old ones may have been disabled.)

- Use IntentService to perform the tasks in a worker thread.

Note the new receiver will never be disabled.  We always need to start
exchange.SyncManager.

Bug 2722155
Bug 2416929

Change-Id: I8241880fc1ee38d85dcdca7e1d46fc2f6b2d375b
Merge commit 'f07d85b5f4a377f9a65b75f665c3588681e3b895' into oxygen_1005

* commit 'f07d85b5f4a377f9a65b75f665c3588681e3b895':
  Implement basic EAS 12.1 functionality

Conflicts:
	src/com/android/exchange/adapter/ProvisionParser.java
Merge commit '9d387ff0bb88ad952b53c956b468dcbcec248752' into oxygen_1005

* commit '9d387ff0bb88ad952b53c956b468dcbcec248752':
  Fix validation use of FolderSync

Conflicts:
	src/com/android/exchange/EasSyncService.java