Commit Graph

2547 Commits

Author SHA1 Message Date
Marc Blank
4b4e00e4ce Fix #2548436 (Use EVENT_TIMEZONE rather than TIMEZONE)
* Prior fix used the wrong column when adding time zone information
  to downloaded exceptions

Bug: 2548436
Change-Id: Idc1001fd58d2fba51823624a15862fe439c9ff6a
2010-03-26 12:49:07 -07:00
Marc Blank
41d17202f5 Make sure we only upload exceptions for the correct event
* We weren't checking calendar id along with original event id when
  uploading (original event id isn't unique)
* Fix the query selection to ensure finding the correct exception(s)

Bug: 2545659
Change-Id: I276dd10e2be171bd9d4f3300cdc8843bb28f2781
2010-03-26 12:06:07 -07:00
Makoto Onuki
a942858f0d Properly handle old style (<= 1.6) account shortcuts.
A desktop shortcut to an account created on donut or before points at
com.android.email/.activity.FolderMessageList, which we've already removed.

- Added a dummy FolderMessageList to receive it and redirect to MessageList.
- Removed FolderMessageListUnitTests, which was left unremoved.

Bug 2535335

Change-Id: Ie5ffa158882633a4929c4c47a3d9625fd1626863
2010-03-26 11:02:18 -07:00
Marc Blank
e3bb5a8be4 Merge "When syncing, put time zone into exception events" 2010-03-25 20:43:16 -07:00
Marc Blank
802a7d69b5 Format cleanup for CalendarUtilities
Change-Id: I6633435cbe0ee55f58da76658d2ccb12f421e326
2010-03-25 17:43:24 -07:00
Marc Blank
82b2453b97 Clean up EAS -> TimeZone determination code
* Use one minute before/after for transition checking, instead of the
  sloppier early version
* Add tests for additional known time zones
* Change most methods in CalendarUtilities to package private (for use
  with unit tests)
* Clean up a little bad formatting

Change-Id: I9e5be5e1c859f2294adf06874459f7db15fb8c22
2010-03-25 17:26:30 -07:00
Marc Blank
249c6f77c1 When syncing, put time zone into exception events
Bug: 2545885
Change-Id: I41d504f16e9fc4776d2d8d7bbd2682b5940cf1d1
2010-03-25 17:23:01 -07:00
Marc Blank
812983a341 Merge "Don't send bare line feeds to EAS 2.5" 2010-03-25 17:22:25 -07:00
Marc Blank
eba33f8b5a Don't send bare line feeds to EAS 2.5
* EAS 2.5 doesn't like seeing bare LF's in Calendar location
  and description, and Events including them won't sync back to
  the server
* Create a utility to replace bare LF's with CRLF and write
  unit test for the utility
* Fix the bug by using this utility

Bug: 2542220
Change-Id: I2c72d23f15e3a922ebe3585e063abe9fa9e2366f
2010-03-25 17:16:46 -07:00
Marc Blank
a2bb14bd27 Run AccountObserver's onChange in a background thread
* AccountObservers do a fair amount of database access, and all of
  this should be done in a background thread, so we'll move it there

Bug: 2545753
Change-Id: I5a38677213a923d44eadade75ae32e151e9100da
2010-03-25 15:22:52 -07:00
Makoto Onuki
fe61f358ab Moved fromUtf8 from TestUtils to Utility.
And cleaned up SimpleIcsWriter.toString().

Change-Id: I383d91256c48be5263c695c8e8dd151d0e95d0a6
2010-03-24 12:07:32 -07:00
Marc Blank
e5be03d497 Move calendar observer code into background thread
* Calendar observer code does database access (sometimes quite a
  lot), so it shouldn't be run in the UI thread

Change-Id: Ib6ec5ac3105df6d3fc45004dc2b09be4e33a11ac
2010-03-23 11:57:08 -07:00
Makoto Onuki
95492af7a1 Merge "Show a calendar invitation icon on message list." 2010-03-23 10:50:37 -07:00
Makoto Onuki
79b006a08b Merge "Fix failing unit tests." 2010-03-22 15:56:10 -07:00
Makoto Onuki
0fdcac8028 Fix failing unit tests.
Bug 2534698
Bug 2534665

Change-Id: If07fc7113b517059bee937d019d464e9c1bc600f
2010-03-22 15:01:33 -07:00
Makoto Onuki
20c067c67c Show a calendar invitation icon on message list.
Bug 2522928

Change-Id: Ib29c7ee187cb0d864849b83693906b0a3b490734
2010-03-22 13:46:35 -07:00
Marc Blank
d5822018fb Clean up VCALENDAR/TIME_ZONE_INFORMATION code
* Fix the transition times so that they occur at the hour
* Remove an unused variable
* Fix a reference to Calendar.HOUR that should have been
  Calendar.HOUR_OF_DAY
* Confirm that unit tests work properly

Change-Id: I3eaf31d160e97b5f3ba59c83878359085aea960d
2010-03-22 11:28:40 -07:00
Marc Blank
a0b4907ca5 Fix race condition that results in incomplete accounts
* Remove some very old code that updated the Account in the database
  when finishing an EAS FolderSync.  The old code saved away the entire
  Account structure using getContentValues(), which has long been recognized
  as dangerous, since the data being saved might be stale.
* In this case, we were clearing the INCOMPLETE flag in another thread, but
  FolderSync was saving away the old value (with INCOMPLETE set) along with
  all of the other columns.
* Ironically, the old code is entirely obsolete, so the solution is to
  simply remove the update call.

Bug: 2501574
Change-Id: I9eccbde40e05c83ec5f0ab1d3387289286acc5f3
2010-03-20 22:07:55 -07:00
Marc Blank
fe82454847 Merge "Don't send null/empty values in SimpleIcsWriter" 2010-03-20 20:29:55 -07:00
Makoto Onuki
ba5b6bad8a Merge "Add unit test for VCALENDAR generation from TimeZone" 2010-03-20 20:02:28 -07:00
Marc Blank
d673da2868 Don't send null/empty values in SimpleIcsWriter
* Previously, we would send "0", which is just wrong.  Better to
  send nothing
* Make sure that all tests pass

Bug: 2531679
Change-Id: I01412c6c6f7a2570fafadede75671012b917d25b
2010-03-20 19:02:06 -07:00
Marc Blank
a3b7559404 Handle other validation errors more appropriately
* Previously, we handled the error case for security related errors
* Add code to fail on ANY error, and in particular to recognize the
  error in which an OWA server address is used instead of an EAS
  server address

Bug: 2494110
Change-Id: Iab7df56e82f5ff73b1f58d386ec6f844db26a312
2010-03-20 18:55:11 -07:00
Marc Blank
aec526f141 Add unit test for VCALENDAR generation from TimeZone
* Sanity check runs through every TimeZone and makes sure that there
  are no exceptions thrown
* Also, that we find at least 10x as many TimeZone's with RRULEs as
  those without (empirical)

Change-Id: I2f266ac9d2a839f053bb5fda10a5b77dc8dd2c04
2010-03-20 18:48:55 -07:00
Makoto Onuki
22d29c67da Fix potential NPE with restoreMailboxWithId().
There are a few places where we don't do the check in restoreMailboxWithId,
but they don't look trivial enough for me to fix.

Bug 2530534

Change-Id: I77b37a87ef108048077f14c1e8a3457ee494100a
2010-03-19 14:58:53 -07:00
Marc Blank
e3fbaf56e8 Merge "Handle EAS versions better" 2010-03-19 14:56:45 -07:00
Makoto Onuki
caba6df302 Removing litter.
Change-Id: I96bc07a6af1de57334e936879febadb51e3c125d
2010-03-19 14:14:47 -07:00
Marc Blank
e4cd885ec4 Handle EAS versions better
* Properly parse the server's supported versions
* Choose the highest server version that we support
* Fail with MessagingException if we don't support any server
  versions

Bug: 2527408
Change-Id: I0a2822c8fab31a65c8fea9b78b4a8c23df1804a3
2010-03-19 12:01:44 -07:00
Marc Blank
a4049ccbdb Merge "Do alert work in background thread" 2010-03-19 10:19:46 -07:00
Marc Blank
0aa0cd12eb Merge "Send appropriate ics message for cancellations" 2010-03-19 10:18:05 -07:00
Marc Blank
39ea302126 Send appropriate ics message for cancellations
* We were sending cancellations with a request for reply, which is
  incorrect
* Send the correct dats in the ics attachment
* Update unit test to reflect this

Bug: 2527606
Change-Id: I4cea0bb8f1c29a3cad8d09fd6a4750f7ab067229
2010-03-19 10:17:25 -07:00
Marc Blank
bb2f25a23a Do alert work in background thread
* An ANR was reported in MailboxAlarmReceiver
* The reciever calls into SyncManager, which does some database
  operations, and may abort an I/O operation in a sync service
  thread
* Move this potentially long-running code into a background
  thread

Bug: 2215045
Change-Id: Id65c51f706b212d6b50af3921f3ba3dc2d014ce0
2010-03-19 09:59:33 -07:00
satok
7cda118d35 Extract delete acount function from UI thread to async task
BUG: 2474078
BUG: 2438333
Change-Id: Id9aac4c73064f05aa666cda26005b61c04fc262e
2010-03-19 17:59:32 +09:00
Marc Blank
ad33c5acf4 Merge "Send cancellation mail to removed attendees" 2010-03-18 19:35:01 -07:00
Jim Shuma
f7da371234 Merge "Add "vibrate when silent" mode to notifications" 2010-03-18 16:30:33 -07:00
Marc Blank
020af43452 Fix bugs related to disabling Exchange calendar from UI
* There was a TODO for this... :-)
* First, I added some logging to help debug this kind of situation
  in the future
* I also now forcibly stop any ongoing sync of the calendar being
  disabled; this appears related to the problem of Events not
  reappearing
* Added a kick() after the calendar is re-enabled to make sure it
  starts resyncing immediately.

Bug: 2526924
Change-Id: Ib18f4c3c4e016f5cb5205fea5f3f12c0782b5e54
2010-03-18 14:09:06 -07:00
Jim Shuma
9e2ddca59d Add "vibrate when silent" mode to notifications
* Add "vibrate when silent" choice in UI
* Add storage for it in Email's provider.  Existing accounts default to
  their current settings (always vibrate / never vibrate).
* Respect new mode when notifications are posted
* Updated existing unit tests

Bug: 2457183
Change-Id: I5c933ac39dbef8b2028255f330e0b084a445421a
2010-03-18 13:57:25 -07:00
Marc Blank
92ef20a5c3 Send cancellation mail to removed attendees
* We now keep track of attendees in the Event's extended properties
* When a message is updated, we compare current attendees with the
  original list, and send cancellations to those who have been removed

Bug: 25623726
Change-Id: I7b3df99e62fb3d4a1482bd6d4612647f5bdb756a
2010-03-18 13:35:25 -07:00
Eric Fischer
e5815a81f3 Merge "Import revised translations" 2010-03-18 10:53:01 -07:00
Andrew Stadler
aadee36a34 Merge "Eliminate duplication in Yahoo! sent mailbox" 2010-03-18 10:18:30 -07:00
Andrew Stadler
c4fcd852ba Eliminate duplication in Yahoo! sent mailbox
* Yahoo! is not supporting search by UID so I can't identify the new
  the UID after I upload.  This inability to correlate the local and
  remote messages means that we wind up syncing the same message back
  down, in a loop, which spawns more messages.
* Yahoo! has partial support for UIDPLUS, and reports the new UID when
  I append (upload) messages.
* Modify IMAP parser to parse response lists
* When APPENDUID is reported, use it (and skip the search)
* Modify the few other existing users of response lists to use the
  parsed versions instead.  Provided a couple of lightweight utilities
  to make it easier to work with ImapList.
* Unit tests for most of it.
* Optimization: share a static date/time parser for all IMAP connections

Bug: 2448220
Change-Id: Ic10fc1a195ccf4671a498188cc8b17848c8d9df7
2010-03-18 10:11:08 -07:00
Kenny Root
1323a8de1f Import revised translations
Change-Id: Ifc983fd154d2cf3fb6cd86c45b5e7ff9736cd2d8
2010-03-17 22:13:52 -07:00
Marc Blank
ca8cdab2d1 Merge "Don't show attendee status for Exchange events" 2010-03-17 20:32:42 -07:00
Marc Blank
4655cee65a Don't show attendee status for Exchange events
* There are serious issues with showing consistent and accurate attendee
  status for Exchange 2007 events
* Unless and until these can be resolved, it is better to simply not show
  the user the supposed attendee status (since it might well be wrong)
* In this CL, I never set the attendee status; therefore, it will appear
  "unknown" and be shown simply as "Guest" when viewing the Event in the
  Calendar app.
* Will create tracking bug for this, so that we can revisit for a later
  release.

Bug: 2524410
Change-Id: I97fdd26750c68ff25bbb102547071c728e4124a9
2010-03-17 20:13:42 -07:00
Andrew Stadler
f223af1392 Merge "Clear notifications when deleting accounts" 2010-03-17 19:49:44 -07:00
Andrew Stadler
6d55bb08fd Merge "Fix cases of attachments with no name" 2010-03-17 18:16:33 -07:00
Andrew Stadler
7d738cb7e8 Fix cases of attachments with no name
* Most clients send name= in the content-type, but a few clients
  send only filename= in content-disposition.
* There was code to handle both cases, but due to two typos, it didn't
  work.
* Most easily reproduced by sending from hotmail/live web client.

Bug: 2366961
Change-Id: I1d9a00b9b5fd1094cfb8566c3248d94286a8ae91
2010-03-17 17:59:09 -07:00
Andrew Stadler
cb98193f85 Clear notifications when deleting accounts
* Quick fix for the bug that notifications may be stale after
  and account is deleted.

Bug: 2202317
Change-Id: I950d173d20dee443b03b40ee04618afb98a95f38
2010-03-17 16:14:17 -07:00
Makoto Onuki
a29495c03c Merge "Add a flag to dump email messages." 2010-03-17 15:46:00 -07:00
Makoto Onuki
dfeb1184eb Add a flag to dump email messages.
It's useful to debug MIME related problems.

- New MimeStreamParser.LOG_MESSAGE flag
- Cleaned up LoggingInputStream, which now supports all InputStream methods
  (e.g. close, available, etc.) properly.
- LoggingInputStream now dumps non-printable ascii chars as '\xXX'.

Change-Id: I4391e125abd418defc1dc21e4f35cf6ef8448acb
2010-03-17 15:44:56 -07:00
Makoto Onuki
0d91d886a9 Merge "Send log from mime4j to logcat." 2010-03-17 11:33:28 -07:00