Commit Graph

325 Commits

Author SHA1 Message Date
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
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
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
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 4880ab8641 am bf60edcc: am a25b1b03: am 85a63c3c: Fix issues with exception downloads 2010-05-10 09:53:54 -07:00
Marc Blank bf60edcc96 am a25b1b03: am 85a63c3c: Fix issues with exception downloads
Merge commit 'a25b1b03626c6c27c877671f1b6622b4ab022bbc' into kraken

* commit 'a25b1b03626c6c27c877671f1b6622b4ab022bbc':
  Fix issues with exception downloads
2010-05-10 09:49:54 -07:00
Marc Blank a25b1b0362 am 85a63c3c: Fix issues with exception downloads
Merge commit '85a63c3c2f2d00210e9f7957f3d217b7fd028dad' into froyo-plus-aosp

* commit '85a63c3c2f2d00210e9f7957f3d217b7fd028dad':
  Fix issues with exception downloads
2010-05-10 09:43:40 -07:00
Marc Blank 85a63c3c2f Fix issues with exception downloads
* It turns out that, in addition to other requirements of the
  CalendarProvider, there is another - that the ORIGINAL_INSTANCE_TIME
  also be set with hour, minute, and second as zero (in UTC)
* Change setTimes() to properly modify ORIGINAL_INSTANCE_TIME
* Also, there was a regression due to an incorrect validity test
  for events; this regression caused all exception downsyncs to fail
* Changed isValidEventValues() to be correct for both exceptions
  and original events
* Update tests for setTimes and isValidEventValues()
* This CL also fixes 2658988

Bug: 2664229
Change-Id: I9c8aea08e606ff58e5be37ca81a2d86a181c46f6
2010-05-07 15:47:57 -07:00
Makoto Onuki 165e8bfe7a Cleanup: Add @Override
(Note it's for froyo-plus-asop)

Change-Id: Ic4211c08586e33c44d5d6267c0c9d37f8c7cdc85
2010-05-07 15:28:26 -07:00
Makoto Onuki c563ce1b80 am b8970dab: am e46ac1a6: Cleanup imports. 2010-05-07 15:20:47 -07:00
Makoto Onuki b8970dabb6 am e46ac1a6: Cleanup imports.
Merge commit 'e46ac1a61f32bd762a879457b1850087a1ad3a8c' into kraken

* commit 'e46ac1a61f32bd762a879457b1850087a1ad3a8c':
  Cleanup imports.
2010-05-07 15:17:35 -07:00
Makoto Onuki e46ac1a61f Cleanup imports.
(Note it's for froyo-plus-asop)

Change-Id: Ia5b771cd41099ab486ba2e556b441fc7c0affe5f
2010-05-07 14:33:44 -07:00
Marc Blank a32e063036 am ab4daabd: am 8f255dde: Merge "Add checks for Event validity before commit" into froyo
Merge commit 'ab4daabd5ec99da549407ce87d46e24be261c4a6' into kraken

* commit 'ab4daabd5ec99da549407ce87d46e24be261c4a6':
  Add checks for Event validity before commit
2010-05-06 12:43:16 -07:00
Marc Blank 33f07963eb Add checks for Event validity before commit
* Enforce CalendarProvider2's requirements for valid Events
* Add unit tests for the new code
* Backport of change I42ad7acb from master
Bug: 2658149

Change-Id: I8151d035247a7dbb1fda3eae163b24ccfe055299
2010-05-06 08:28:34 -07:00
Marc Blank bc1a4753b1 Add checks for Event validity before committing
* Enforce CalendarProvider2's requirements for valid Events
* Add unit tests for the new code

Bug: 2658149
Change-Id: I42ad7acbcee3b6b831f805c59436017a32651f3a
2010-05-05 18:16:16 -07:00
Andrew Stadler b0c37bd8c0 am 1e037acd: am 7cdd6899: am a7628f3b: Merge "Better handling for untyped attachments" into froyo 2010-05-03 09:36:28 -07:00
Andrew Stadler 1e037acda7 am 7cdd6899: am a7628f3b: Merge "Better handling for untyped attachments" into froyo
Merge commit '7cdd6899fbe820af852974cd0b7025b72bfe242a' into kraken

* commit '7cdd6899fbe820af852974cd0b7025b72bfe242a':
  Better handling for untyped attachments
2010-05-03 09:34:02 -07:00
Andrew Stadler 80ebde2897 Better handling for untyped attachments
* IMAP/POP rely on sender to set mime type of attachments
* Which doesn't always work, because senders don't always provide it
* Remap using filename extensions, when needed
* This is applied as late as possible - in the MessageView, and in
  the content provider getType().  No changes to how we write databases,
  and no change to existing attachment rows.

Bug: 2356638
Change-Id: Ie69e3fd12f406aac803583f9d1299a8af4fba010
2010-04-30 15:01:10 -07:00
Marc Blank 34d94723b6 am 25fa6124: am 44ae6d2f: am f2d43c39: Merge "Update unit tests for invitation creation" into froyo 2010-04-29 20:33:10 -07:00
Marc Blank 25fa612444 am 44ae6d2f: am f2d43c39: Merge "Update unit tests for invitation creation" into froyo
Merge commit '44ae6d2fa2e79de533ceb1fdf50c578a4ed84a3f' into kraken

* commit '44ae6d2fa2e79de533ceb1fdf50c578a4ed84a3f':
  Update unit tests for invitation creation
2010-04-29 20:30:11 -07:00
Marc Blank 9294d8c030 Update unit tests for invitation creation
* Tests changed/added for exception/recurrence changes in CL50201

Bug: 2640878
Change-Id: I97e5557c198aa686d1705158f2c9087c1683590e
2010-04-29 11:03:37 -07:00
Marc Blank 52ab04a805 am ad7060ae: am f1fa44bd: am 2f1ce56f: Merge "Fix upload/download of attendee status" into froyo 2010-04-26 10:11:52 -07:00
Marc Blank ad7060ae18 am f1fa44bd: am 2f1ce56f: Merge "Fix upload/download of attendee status" into froyo
Merge commit 'f1fa44bdc064a6c01813c5380839b90bd0290d46' into kraken

* commit 'f1fa44bdc064a6c01813c5380839b90bd0290d46':
  Fix upload/download of attendee status
2010-04-23 17:27:10 -07:00
Marc Blank 8a19af3739 Fix upload/download of attendee status
* It turns out that the UI uses selfAttendeeStatus and the attendee's status
  from the Attendees table in confusing and undocumented ways
* selfAttendeeStatus is used in the UI, but only in certain cases. Generally speaking,
  the Attendees table status is definitive.  However, when the user sets his status
  from the UI, this data is reflected in the event's selfAttendeeStatus, since for EAS,
  the user is always the owner of his calendar
* On downsync,  we'll put the user's busy status into the Attendees table
* On upsync, we'll send busy status based on the user's attendee status in the
  Attendees table
* We'll use selfAttendeeStatus only to determine whether the user has manually changed
  his status via the UI (as before)

Bug: 2615586
Change-Id: I3a82474cfd07cbf5aa595e5214807cb55005cefa
2010-04-23 09:07:53 -07:00
Makoto Onuki 92db71e440 Merge "Send local IP address with EHLO instead of "localhost"." 2010-04-22 14:23:46 -07:00
Makoto Onuki 3844bbcaaf am 2ca8d734: am 6cfa8001: Merge "Fix failing unit tests" into froyo
Merge commit '2ca8d7347db3975746ad87347de57fd5800bf5d4' into kraken

* commit '2ca8d7347db3975746ad87347de57fd5800bf5d4':
  Fix failing unit tests
2010-04-22 13:24:40 -07:00
Marc Blank 0acd7e9c77 am d764ce7e: am 1880ad6a: Send correct busy status information in upsyncs to EAS
Merge commit 'd764ce7e4442b0027a891582cbdd728487a49f97' into kraken

* commit 'd764ce7e4442b0027a891582cbdd728487a49f97':
  Send correct busy status information in upsyncs to EAS
2010-04-22 13:23:55 -07:00
Makoto Onuki f4dac9f266 Send local IP address with EHLO instead of "localhost".
Bug 1515345

Change-Id: I181c9f0d79fbdf62f7df77f72a1ec9653797b6dd
2010-04-22 11:23:08 -07:00
Makoto Onuki 6cfa8001a8 Merge "Fix failing unit tests" into froyo 2010-04-22 09:51:21 -07:00
Makoto Onuki 25d55ed266 Fix failing unit tests
Bug 2614782

Change-Id: I7ed7bf61a567429017f64d9049577ec076331bb2
2010-04-22 09:18:42 -07:00
Marc Blank 1880ad6a83 Send correct busy status information in upsyncs to EAS
* Fix unit test that was failing

Bug: 2615382
Change-Id: I54c7bdd982d57528f55ce4f4c6804c9f532293fb
2010-04-21 18:25:16 -07:00
Marc Blank fc08120213 am a0c71419: am 21c04fe3: Merge "Further harden getListOrNull" into froyo
Merge commit 'a0c71419cedaa0f84d12da61e415642b79cc0a9c' into kraken

* commit 'a0c71419cedaa0f84d12da61e415642b79cc0a9c':
  Further harden getListOrNull
2010-04-21 08:18:04 -07:00
Marc Blank 07fb9f8bea Further harden getListOrNull
* Add a bounds check
* Add a test for ImapList

Bug: 2611022
Change-Id: I3ad88fbc8d3145298731ab19ef7ff68d4011bb00
2010-04-20 19:31:29 -07:00
Marc Blank 5ff98ba1ec am 825999f8: am 095eee41: Set selfAttendeeStatus and busyStatus properly on downsync/upsync
Merge commit '825999f815979519d8d80334a8c1ce0223a89ef2' into kraken

* commit '825999f815979519d8d80334a8c1ce0223a89ef2':
  Set selfAttendeeStatus and busyStatus properly on downsync/upsync
2010-04-16 13:55:04 -07:00
Marc Blank 095eee4156 Set selfAttendeeStatus and busyStatus properly on downsync/upsync
* Set selfAttendeeStatus on download from busy status
* Set busyStatus on upload from selfAttendeeStatus

Bug: 2587076

Change-Id: I34eaa0d3861bcec0cbfd51761b31965e44f5162b
2010-04-16 13:39:51 -07:00
Marc Blank ce2e1260bc am b8ef8a2c: am a97d8501: Merge "Properly decode a uid from the globalObjId in invites" into froyo
Merge commit 'b8ef8a2c1d18421a7d537dbc8d1ea88ffca95898' into kraken

* commit 'b8ef8a2c1d18421a7d537dbc8d1ea88ffca95898':
  Properly decode a uid from the globalObjId in invites
2010-04-15 13:48:03 -07:00
Marc Blank a97d85014f Merge "Properly decode a uid from the globalObjId in invites" into froyo 2010-04-15 13:41:04 -07:00
Marc Blank 7e30b2e22f Properly decode a uid from the globalObjId in invites
* Meeting invitations in EAS include a globalObjId.  It turns out
  that this id is EITHER the actual uid (if Exchange created it)
  or a wrapper for the actual uid (if some other client created it)
* To find out which case we're dealing with, we have to look at
  the base64 decoded string for the magic "vCal-Uid" substring
* If it's there, we pull the real uid out of the decoded string
* Otherwise, we build a hex strong from the decoded bytes
* Write unit test for this process

Bug: 2598201
Change-Id: I1cc40af6d1e45be44c19465eb8a4c31851ec8157
2010-04-15 13:12:40 -07:00
Makoto Onuki 6f83fe6317 am ad383ff1: am d2a0d233: Use consistent device-id even the device is wiped.
Merge commit 'ad383ff1231319c6ded4077b0d1415bf77bec70b' into kraken

* commit 'ad383ff1231319c6ded4077b0d1415bf77bec70b':
  Use consistent device-id even the device is wiped.
2010-04-14 22:22:18 -07:00
Makoto Onuki d2a0d23380 Use consistent device-id even the device is wiped.
Use hash of device id (TelephonyManager.getDeviceId()) instead of a random
value.

Bug 2596537

Change-Id: I22303f7287ee6e9edccec349d03f14adbd33f6f7
2010-04-14 21:39:18 -07:00
Makoto Onuki cda014c16e am 8dffa087: am 162b0171: Change account colors to what aren\'t used in Calendar.
Merge commit '8dffa087db44e27e5f0e5672b19fdb6975e614a7' into kraken

* commit '8dffa087db44e27e5f0e5672b19fdb6975e614a7':
  Change account colors to what aren't used in Calendar.
2010-04-14 16:30:27 -07:00
Makoto Onuki 162b017140 Change account colors to what aren't used in Calendar.
Bug 2535090

Change-Id: I252e04afa402303d226a56f1d7852f50dc26e2ec
2010-04-14 15:18:12 -07:00
Makoto Onuki 040f0e3c48 am 77275817: am 0f3d3601: Merge "Show device id on the exchange setting screen." into froyo
Merge commit '772758177e3dd4fcb1c9d534afec3007b59c8bf7' into kraken

* commit '772758177e3dd4fcb1c9d534afec3007b59c8bf7':
  Show device id on the exchange setting screen.
2010-04-13 17:32:00 -07:00
Makoto Onuki 12b4bc9e80 Show device id on the exchange setting screen.
I've attached a screenshot on the referenced bug.

Also fixed a bug in SyncManager.getDeviceId() where sDeviceId cache wasn't
working.

Bug 2591124

Change-Id: I4b58517c095a96d47fb57179d70091b2c7af5249
2010-04-13 17:10:26 -07:00
Andrew Stadler ead786d9b5 am ef01261a: am 9cc6f46b: Merge "Try TOP even on POP servers that fail to report CAPA" into froyo
Merge commit 'ef01261a8909ea3fe3e40b06cc537e0032d47898' into kraken

* commit 'ef01261a8909ea3fe3e40b06cc537e0032d47898':
  Try TOP even on POP servers that fail to report CAPA
2010-04-12 11:33:04 -07:00
Andrew Stadler 645fc28301 Try TOP even on POP servers that fail to report CAPA
* Ignore the results of CAPA and always try TOP
* If TOP returns -ERR simply fall back to (bad old slow) RETR
* Unit tests for positive & failure cases

Bug: 2588432
Change-Id: Ife4b551217de1025e14efc46074f16ef4ae99c6f
2010-04-12 10:56:55 -07:00
Andrew Stadler 5f95d68288 am 3839dc98: Merge "Improve MIME & SMTP compliance on outbound messages" into froyo
Merge commit '3839dc981f15bb7da5e7500ee175485dc85a6f6a' into kraken

* commit '3839dc981f15bb7da5e7500ee175485dc85a6f6a':
  Improve MIME & SMTP compliance on outbound messages
2010-04-08 10:03:11 -07:00