Commit Graph

2824 Commits

Author SHA1 Message Date
Marc Blank
f07d85b5f4 Implement basic EAS 12.1 functionality
* Support required protocol changes
* Handle new security policies based on current device capabilities

Change-Id: Id1d629d41d957911344e6c503d28418f5e7e1386
2010-05-27 16:46:31 -07:00
Marc Blank
fd2872ac78 am 18abfe00: am ff1af297: am 8752159c: Fix critical typo in CalendarSyncAdapter 2010-05-25 14:35:55 -07:00
Marc Blank
18abfe0031 am ff1af297: am 8752159c: Fix critical typo in CalendarSyncAdapter
Merge commit 'ff1af297676c0c86c72c6639785d7773ed9ce486' into kraken

* commit 'ff1af297676c0c86c72c6639785d7773ed9ce486':
  Fix critical typo in CalendarSyncAdapter
2010-05-25 14:32:55 -07:00
Marc Blank
ff1af29767 am 8752159c: Fix critical typo in CalendarSyncAdapter
Merge commit '8752159c7d081e7ea4d870ae29de6e58da7d50be' into froyo-plus-aosp

* commit '8752159c7d081e7ea4d870ae29de6e58da7d50be':
  Fix critical typo in CalendarSyncAdapter
2010-05-25 14:31:18 -07:00
Marc Blank
8752159c7d Fix critical typo in CalendarSyncAdapter
* Used wrong name for column

Bug: 2703075
Change-Id: I8107bd2df4fdc2ee79d126a657383b46317d0495
2010-05-25 14:05:45 -07:00
Marc Blank
838beeb621 am 719d29bd: am 4c8adbc4: am 027a6ddf: Merge "Fix bugs related to TZ handling for all-day events" into froyo 2010-05-25 13:12:34 -07:00
Marc Blank
719d29bdcd am 4c8adbc4: am 027a6ddf: Merge "Fix bugs related to TZ handling for all-day events" into froyo
Merge commit '4c8adbc4aa81308e57ae129e9587ec50483af6a8' into kraken

* commit '4c8adbc4aa81308e57ae129e9587ec50483af6a8':
  Fix bugs related to TZ handling for all-day events
2010-05-25 13:10:35 -07:00
Marc Blank
4c8adbc4aa am 027a6ddf: Merge "Fix bugs related to TZ handling for all-day events" into froyo
Merge commit '027a6ddfaa7228854cb3c4238434f87fc69078b6' into froyo-plus-aosp

* commit '027a6ddfaa7228854cb3c4238434f87fc69078b6':
  Fix bugs related to TZ handling for all-day events
2010-05-25 13:09:05 -07:00
Marc Blank
027a6ddfaa Merge "Fix bugs related to TZ handling for all-day events" into froyo 2010-05-25 13:07:43 -07:00
Marc Blank
3e065170f3 Fix bugs related to TZ handling for all-day events
* In bug 2703075, all-day events from time zones at GMT or later
  appear a day early; this is because the time was calculated from
  the GMT date/time of the event rather than the local date/time of
  the event; this CL correctly changes this to use local date/time
* In bug 2707966, device-edited all-day events disappear in Outlook
  and OWA after upsync; this is due to the fact that we store all-day
  events in UTC on device, whereas we need to upload all-day events
  using the original (local) time zone.  In this CL, we save away
  the original time zone and use it on upsync
* In our decoding of Exchange time zone information, we default to
  local time when we can't find a time zone that matches the bias
  and DST information; we should really default to a time zone with
  the same bias, if one exists; we do that in this CL.
* Add/modify unit tests

Bug: 2703075
Change-Id: Id80c481ecc0eae980b2e91dae7f105f924cfca28
2010-05-25 11:46:44 -07:00
Marc Blank
cdc06645c7 am 019f58c0: am 5c0f3b33: am 6bd7a167: Fix problem w/ sync of large calendars (never syncs) 2010-05-24 22:52:38 -07:00
Marc Blank
019f58c094 am 5c0f3b33: am 6bd7a167: Fix problem w/ sync of large calendars (never syncs)
Merge commit '5c0f3b332f6104d6526d546a470cf7eb9978de47' into kraken

* commit '5c0f3b332f6104d6526d546a470cf7eb9978de47':
  Fix problem w/ sync of large calendars (never syncs)
2010-05-24 22:50:02 -07:00
Marc Blank
5c0f3b332f am 6bd7a167: Fix problem w/ sync of large calendars (never syncs)
Merge commit '6bd7a167249727f4b7d4d4cfe713be421f400e51' into froyo-plus-aosp

* commit '6bd7a167249727f4b7d4d4cfe713be421f400e51':
  Fix problem w/ sync of large calendars (never syncs)
2010-05-24 22:48:41 -07:00
Marc Blank
6bd7a16724 Fix problem w/ sync of large calendars (never syncs)
* While working w/ Microsoft on this issue, we determined that Windows
  Mobile 6.0 does not suffer from this issue; when we compared our
  logs with those from the WM client, we noticed a difference in the
  commands being sent to the server on initial  sync (we send some extra
  options whereas WM doesnot)
* As an experiment, I removed these options from the initial
  sync, and this change solved the problem with a persistently unsyncable
  account (time to receive: 60-70 seconds vs. > 240 seconds).
* The fix is to remove all "options" from the initial sync for a given
  collection (i.e. with SyncKey=0)
* Note that Microsoft's documentation does not generally address the issue
  of what should/should not be sent in an initial sync command

Bug: 2569162
Change-Id: Ib20ea56fb380ee8c9a01b139f7fa98b7ff505e7a
2010-05-22 14:38:03 -07:00
Marc Blank
164c5004e7 Merge "Fix problem w/ sync of large calendars (never syncs)" 2010-05-21 14:53:23 -07:00
Marc Blank
a12fc1e976 Fix problem w/ sync of large calendars (never syncs)
* While working w/ Microsoft on this issue, we determined that Windows
  Mobile 6.0 does not suffer from this issue; when we compared our
  logs with those from the WM client, we noticed a difference in the
  commands being sent to the server on initial  sync (we send some extra
  options whereas WM doesnot)
* As an experiment, I removed these options from the initial
  sync, and this change solved the problem with a persistently unsyncable
  account (time to receive: 60-70 seconds vs. > 240 seconds).
* The fix is to remove all "options" from the initial sync for a given
  collection (i.e. with SyncKey=0)
* Note that Microsoft's documentation does not generally address the issue
  of what should/should not be sent in an initial sync command

Bug: 2569162
Change-Id: I69642cc0097296956029485abb85ac750303c865
2010-05-21 13:11:02 -07:00
Makoto Onuki
32f8a49e01 Two new tests for the bottom half of ImapFolder.append().
They cover the cases:
- when OK response doesn't have APPENDUID.
- when APPEND fails.

Change-Id: I13a0fb8aaf2e1cbb5a1f055c9ce56e2891373ea0
2010-05-20 18:23:16 -07:00
Makoto Onuki
968be441b4 Don't store arbitrary Context in singletons, which causes memory leak.
We have singletons that store a Context passed to getInstance().
The problem is that when we call them, we casually pass any Context at hand.
If it's an activity (which is often the case), it'll never be GCed.

This CL make them store the application context insteaed.

Change-Id: I1abcc2c08d3f8201416d6c14720f041693823b4e
2010-05-20 16:21:06 -07:00
Makoto Onuki
12e64b09d8 Merge "Clean up ImapStore and related classes." 2010-05-20 15:17:57 -07:00
Makoto Onuki
4f0186c608 Clean up ImapStore and related classes.
- Introduce Fetchable
- Made static some methods/nested classes in ImapStore
- Removed ImapBodyPart
- Fixed lien breaks

Change-Id: Iec1aff2771faa28717753d6e2d9db96d940233a9
2010-05-20 15:12:37 -07:00
Marc Blank
9ae5e10bb3 am ee1d2c02: am d0ee1de1: am 274492db: Allow limited looping requests in sync 2010-05-19 16:34:38 -07:00
Marc Blank
ee1d2c024f am d0ee1de1: am 274492db: Allow limited looping requests in sync
Merge commit 'd0ee1de12c322138d2db2f79a276ce5ddd20d22d' into kraken

* commit 'd0ee1de12c322138d2db2f79a276ce5ddd20d22d':
  Allow limited looping requests in sync
2010-05-19 16:32:18 -07:00
Marc Blank
d0ee1de12c am 274492db: Allow limited looping requests in sync
Merge commit '274492db09d464879903debf6645443b9be9a957' into froyo-plus-aosp

* commit '274492db09d464879903debf6645443b9be9a957':
  Allow limited looping requests in sync
2010-05-19 16:30:49 -07:00
Makoto Onuki
5503e3cf7b Merge "More tests for IMAP, clean up, and a few bug fixes." 2010-05-19 13:35:41 -07:00
Marc Blank
c8a235e1f9 Merge "Allow limited looping requests in sync" 2010-05-19 13:29:02 -07:00
Makoto Onuki
cbe4ae9291 More tests for IMAP, clean up, and a few bug fixes.
- A few new tests in ImapStoreUnitTests.
- Added TODOs to ImapStoreUnitTests (for mainly NO response handling)
- Renamed ImapStore.releaseConnection to poolConnection.
- Fixed a bug in getConnection where it'd return a closed connection.
- Now getConnection() hanles BYE response for NOOP correctly and treat the
  connection as closed.

Change-Id: I48e5b89049338f7d4f1ac77cd7ac7243945a9575
2010-05-19 13:13:18 -07:00
Marc Blank
e034a5e366 Allow limited looping requests in sync
* Microsoft has documented cases in which the server can continue to
  send MoreAvailable=true even when no new data is received.  This
  can cause looping behavior, which we stop when we recognize it.
* This workaround, however, can prevent the situation from resolving
  itself, and lead to delayed sync (up to a few hours has been noticed)
* In this limited CL, we allow the sync to loop up to a maximum number
  of times before stopping it forcibly.

Bug: 2685984
Change-Id: I85981b85b71c4e7d53e69da2520543e8ef04c889
2010-05-19 12:09:17 -07:00
Marc Blank
274492db09 Allow limited looping requests in sync
* Microsoft has documented cases in which the server can continue to
  send MoreAvailable=true even when no new data is received.  This
  can cause looping behavior, which we stop when we recognize it.
* This workaround, however, can prevent the situation from resolving
  itself, and lead to delayed sync (up to a few hours has been noticed)
* In this limited CL, we allow the sync to loop up to a maximum number
  of times before stopping it forcibly.

Bug: 2685984
Change-Id: I2913b7e3438f6180c3c440508fab892176a06540
2010-05-19 10:38:39 -07:00
Makoto Onuki
19903ce5ee am 0f0757ba: am 839c6d08: am e98fc403: Remove STOPSHIP 2010-05-18 18:28:15 -07:00
Makoto Onuki
2552b7b705 More test for ImapStore/ImapFolder.
- Also, fixed a potential crash in getMessages().
  It could happen when a client is gettign a message list while
  another client is removing messages.

Change-Id: I04b1de6bc384cffb7a5286bcec0a349a3d62a623
2010-05-18 17:14:30 -07:00
Makoto Onuki
0f0757ba72 am 839c6d08: am e98fc403: Remove STOPSHIP
Merge commit '839c6d08b61588cf5ea40f7c82cdfaf530460276' into kraken

* commit '839c6d08b61588cf5ea40f7c82cdfaf530460276':
  Remove STOPSHIP
2010-05-18 16:19:23 -07:00
Makoto Onuki
839c6d08b6 am e98fc403: Remove STOPSHIP
Merge commit 'e98fc403ac8b63836e055a2fffd024e495b7bd8e' into froyo-plus-aosp

* commit 'e98fc403ac8b63836e055a2fffd024e495b7bd8e':
  Remove STOPSHIP
2010-05-18 16:18:06 -07:00
Makoto Onuki
e98fc403ac Remove STOPSHIP
Bug 2694636

Change-Id: Ief270c69d202c4ff2bbe3b49cd3b9e4a52655e4b
2010-05-18 16:07:51 -07:00
Makoto Onuki
19aeefd532 Merge "Tests for IMAP FETCH" 2010-05-18 11:28:13 -07:00
Makoto Onuki
7d3519151a Tests for IMAP FETCH
Adding regression test for the new IMAP parser.

Change-Id: Iac7f5c022e44ca5f06f735e145af15cc459eb61f
2010-05-18 10:48:11 -07:00
Marc Blank
2ac2c224d6 Merge "Fix issue found by FindBugs" 2010-05-18 09:12:05 -07:00
Kenny Root
1c4abf20d3 am 79d1eb55: am f6981df3: am df9722f8: Import revised translations 2010-05-17 14:58:35 -07:00
Makoto Onuki
825abb1ec4 Merge "Relax MIME date parser." 2010-05-17 14:45:19 -07:00
Makoto Onuki
b1151244ca Merge "Added a label to Exchange device ID." 2010-05-17 14:37:25 -07:00
Makoto Onuki
cfe95a8333 Added a label to Exchange device ID.
Bug 2610257

Change-Id: Ie065514e942a01dc5ae3c81bc79a2501f67390e1
2010-05-17 14:30:15 -07:00
Makoto Onuki
128fb393e8 Relax MIME date parser.
Make the date parser accept invalid dates like
"Thu, 10 Dec 09 15:08:08 GMT-0700" which was observed in an email from eBay.

Per RFC, timezone must be either obs-zone (e.g. "GMT") or +/- with 4 digits.
The GMT+/-digits format is not permitted.

Bug 2367124

Change-Id: I59968274160aeadea70223208b463ee692660056
2010-05-17 14:14:08 -07:00
Makoto Onuki
0a8030562a Fix flaky tests
Follow up to I3bf7d340.  Make sure temp directory is set before running tests.

Turned out Application.onCreate doesn't seem to be guaranteed to be run
before unit tests.

Without this, some tests may fail saying: "TempDirectory not set.
Application hasn't started??", if onCreate runs too late.

Change-Id: Ic5aee939a2c21f9579a643d0729dd0e9ba81022e
2010-05-17 14:07:34 -07:00
Kenny Root
79d1eb55fe am f6981df3: am df9722f8: Import revised translations
Merge commit 'f6981df323f4d1326e0a52a209c491b0988750dd' into kraken

* commit 'f6981df323f4d1326e0a52a209c491b0988750dd':
  Import revised translations
2010-05-17 13:53:47 -07:00
Kenny Root
f6981df323 am df9722f8: Import revised translations
Merge commit 'df9722f8942adc00383f83bd61a55dc5b4a8280c' into froyo-plus-aosp

* commit 'df9722f8942adc00383f83bd61a55dc5b4a8280c':
  Import revised translations
2010-05-17 11:37:41 -07:00
Kenny Root
df9722f894 Import revised translations
Change-Id: Idf95a5cc69832bbb96459e341b1d700670889026
2010-05-17 11:33:01 -07:00
Marc Blank
5a69403c03 Fix issue found by FindBugs
Bug: 2664472
Change-Id: I861d1a1a3f8f6af4cb62c67b6acfb2c03bcba721
2010-05-17 09:17:17 -07:00
Marc Blank
2ca4383fad Fix build break caused by wonky imports
Change-Id: Ib12a70222ac3fd9e65bec3834c0aae061858776c
2010-05-16 17:14:03 -07:00
Marc Blank
2b0375b379 Reorganize startup/shutdown code in SyncManager
* Move all thread-related startup code into run()
* Move all thread-related shutdown code into new method shutdown()
* Add appropriate synchronization during startup/shutdown
* Add thread names to worker threads

Bug; 2645835

Change-Id: Idbd35892cea3de5fbd365102a62103b2f0bdf6c9
2010-05-14 17:09:59 -07:00
Makoto Onuki
9580f6175d Don't sync when the background data system setting is off.
Bug 2494703

Change-Id: Ia6f4c9fc86cdcb5ca3276141cb84b4effb6ee87c
2010-05-14 13:59:11 -07:00
Makoto Onuki
6bdd7998c3 Merge "Simplify MessageRetrievalListener." 2010-05-14 10:45:43 -07:00