Commit Graph

3001 Commits

Author SHA1 Message Date
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
Makoto Onuki
dbbd2ba22c Simplify MessageRetrievalListener.
Main motivation: not to make the new IMAP parser too complecated.

- Removed messageRetrieved.
  Motivation:
  - It's not easy to call messageRetrieved() at the proper timing
    from the new IMAP parser, and this method wasn't used anyway.

- Renamed messageFinished to messageRetrieved.
  And removed the "number" and "ofTotal" arguments.
  Motivation:
  - They weren't used.  Also there was inconsistency about
    what to pass as "numebr".  (i.e. 0-based or 1-based?)  There was
    even a bug that caused passing a wrong number.

Change-Id: If92dbfe681b78a0eea8125188ede63a8f00dcf49
2010-05-14 10:44:37 -07:00
Makoto Onuki
feec136ee2 Merge "Add static method to get temp dir in Email." 2010-05-14 10:31:18 -07:00
Marc Blank
837056ebc2 am 19025fda: am c7931b07: am e0ebcd8e: Test for NPE in EasSyncService during alarm() call 2010-05-14 09:55:42 -07:00
Marc Blank
19025fda24 am c7931b07: am e0ebcd8e: Test for NPE in EasSyncService during alarm() call
Merge commit 'c7931b07e605bca3b59f295877fea7f163001a66' into kraken

* commit 'c7931b07e605bca3b59f295877fea7f163001a66':
  Test for NPE in EasSyncService during alarm() call
2010-05-14 09:53:09 -07:00
Marc Blank
c7931b07e6 am e0ebcd8e: Test for NPE in EasSyncService during alarm() call
Merge commit 'e0ebcd8e6c04fc3d39844722bce74abe540bfe3c' into froyo-plus-aosp

* commit 'e0ebcd8e6c04fc3d39844722bce74abe540bfe3c':
  Test for NPE in EasSyncService during alarm() call
2010-05-14 09:51:10 -07:00
Marc Blank
e0ebcd8e6c Test for NPE in EasSyncService during alarm() call
Bug: 2681197
Change-Id: I1795f81ef5a41440fa6fa17f278562fc076dff3f
2010-05-14 09:47:26 -07:00
Andrew Stadler
c4c1ae7cd3 am 019f14cb: am 1a9ea35b: am 3778b3ed: Try autodiscover with bare name if we get 401 with address 2010-05-14 00:13:50 -07:00
Andrew Stadler
019f14cb03 am 1a9ea35b: am 3778b3ed: Try autodiscover with bare name if we get 401 with address
Merge commit '1a9ea35b93f29c589d3e31d70567f076b2bbb26b' into kraken

* commit '1a9ea35b93f29c589d3e31d70567f076b2bbb26b':
  Try autodiscover with bare name if we get 401 with address
2010-05-14 00:10:20 -07:00
Andrew Stadler
1a9ea35b93 am 3778b3ed: Try autodiscover with bare name if we get 401 with address
Merge commit '3778b3ed7ee505c00fa7cd3b1af37cbe54de244a' into froyo-plus-aosp

* commit '3778b3ed7ee505c00fa7cd3b1af37cbe54de244a':
  Try autodiscover with bare name if we get 401 with address
2010-05-14 00:08:57 -07:00
Andrew Stadler
3778b3ed7e Try autodiscover with bare name if we get 401 with address
* Some autodiscover servers appear to require the bare user name
  for authentication rather than the user's email address.  This
  is apparently common for complex organizations maintaining a
  group of email domains
* If we get a 401 when trying to connect to an autodiscover server
  using the email address, we try again using just the bare name

Bug: 2682833
Change-Id: Ia07ca336e189069d4f3539e2245b3d53c82e3324
2010-05-14 00:05:28 -07:00
Makoto Onuki
9c9e757917 Add static method to get temp dir in Email.
I need to be able to get the temp dir from anywhere without Context
for the new IMAP parser.

Change-Id: I3bf7d34059399a8253c0760ebc392804ea434412
2010-05-13 18:27:34 -07:00
Marc Blank
0c85694182 am 1c78324f: am d40977d1: am 8100a2dc: Server sending unsupported policies will cause NPE 2010-05-13 15:40:43 -07:00
Marc Blank
1c78324f49 am d40977d1: am 8100a2dc: Server sending unsupported policies will cause NPE
Merge commit 'd40977d14a355fc4d610f4fd8bcbb6196f5cfc96' into kraken

* commit 'd40977d14a355fc4d610f4fd8bcbb6196f5cfc96':
  Server sending unsupported policies will cause NPE
2010-05-13 15:36:30 -07:00
Marc Blank
d40977d14a am 8100a2dc: Server sending unsupported policies will cause NPE
Merge commit '8100a2dc5510d0449921895e2af8472d3666fda3' into froyo-plus-aosp

* commit '8100a2dc5510d0449921895e2af8472d3666fda3':
  Server sending unsupported policies will cause NPE
2010-05-13 15:35:06 -07:00
Marc Blank
8100a2dc55 Server sending unsupported policies will cause NPE
* Add null check after trying to create a PolicySet during
  provisioning.

Bug: 2683220
Change-Id: If20adbd4287b291e6470591fd2c3ac1f69ad2355
2010-05-13 13:42:06 -07:00
Makoto Onuki
b3f7dd0169 Clean up member variables.
- Fix misnomered fields.  (e.g. static mMember -> static sMember)
- Reduce visibility.  (e.g. mark as private)
- Mark final / static if possible.

Note it's on master.

There's a lot more cleanup oppotunities in the activities, but they're going
to go through a major overhaul, so I didn't bother.

Change-Id: I3fde73ba5f1f9ff675fff07c510e1e49521dde42
2010-05-11 17:06:37 -07:00
Makoto Onuki
31fa0172cf am d93f323f: am 29491840: Merge "Cleanup: Add @Override" into froyo-plus-aosp 2010-05-10 11:34:28 -07:00
Makoto Onuki
d93f323faa am 29491840: Merge "Cleanup: Add @Override" into froyo-plus-aosp
Merge commit '29491840e62a3a21a9b8e4a0889450d2d0875255' into kraken

* commit '29491840e62a3a21a9b8e4a0889450d2d0875255':
  Cleanup: Add @Override
2010-05-10 11:30:36 -07:00
Makoto Onuki
29491840e6 Merge "Cleanup: Add @Override" into froyo-plus-aosp 2010-05-10 11:29:51 -07:00
Marc Blank
fa96780309 am 5bd74e72: am 3a07d70b: am d1e00e8a: Fix NPE resulting from attendees-only update from server 2010-05-10 09:53:57 -07:00
Marc Blank
4880ab8641 am bf60edcc: am a25b1b03: am 85a63c3c: Fix issues with exception downloads 2010-05-10 09:53:54 -07:00
Marc Blank
658cd0e9fc am c98be369: am a2496548: am c901810f: Start sync ASAP when calendar is re-enabled 2010-05-10 09:53:52 -07:00
Marc Blank
5bd74e72b1 am 3a07d70b: am d1e00e8a: Fix NPE resulting from attendees-only update from server
Merge commit '3a07d70b69a579ef839faba3b85171b983bec312' into kraken

* commit '3a07d70b69a579ef839faba3b85171b983bec312':
  Fix NPE resulting from attendees-only update from server
2010-05-10 09:50:11 -07:00