Commit Graph

1034 Commits

Author SHA1 Message Date
Marc Blank
b5dce15068 Upload cancellation exceptions properly
* This was an omission in the code that is now handled

Bug: 2501136
Change-Id: Ib4615e04a1ef61cf07cd356eb3038da3e74a5470
2010-03-09 13:01:40 -08:00
Mihai Preda
8b8145ebd3 Merge "MessageCompose: when loading message, wait for save to finish." 2010-03-09 02:44:31 -08:00
Andrew Stadler
fd249f61dd More work on account migration
* Split account copy loop to do POP3 accounts first, then IMAP
* After upgrading accounts, upgrade folders
* Upgrade messages in those folders
* Preserve attachments on outgoing messages (e.g. drafts)
* Enable composer and start syncing after upgrade
* Fix latent bug in LocalStore (which was not used in Eclair)
* Add tests for upgrade workers in LegacyConversions

Bug: 2065528
2010-03-08 13:53:01 -08:00
Marc Blank
5b69eb3e4b Make sure that Ping success removes mailbox from error list
* We keep track of sync errors and have an increasing backoff for
  failures.
* Make sure that a successful Ping (i.e. one that received a response
  at the specified timeout) clears the sync error state for the
  pinging mailbox

Change-Id: I35d188aa04618e7604bf6a7905e2ce6992ee3c54
2010-03-08 12:00:21 -08:00
Marc Blank
0453de3e5e Have FileLogger handle errors better
Change-Id: I2c7796495905c484e74e629b881c6f80e7271f5c
2010-03-08 11:54:14 -08:00
Marc Blank
4b7779fb17 Enforce system sync settings for Exchange sync
* Only Outbox runs if background data is off
* Calendar/Contacts won't sync automatically if masterSyncAutomatically
  is off
* Manual syncs will still operate as usual

Bug: 2099511
Change-Id: I07cd88394caffdd6f2ec475df405058c193116ef
2010-03-08 10:37:38 -08:00
Mihai Preda
c556b6bfe5 MessageCompose: when loading message, wait for save to finish.
Bug 2465675

Change-Id: I3290c676bbe63db8441a8f6d320d798abc2fcde5
2010-03-07 15:52:28 +01:00
Marc Blank
b00a660c0a Partially fix #2455341 (Exception adding event w/o DTSTART)
* Apparently, the Exchange server can send event changes that have
  incomplete data.  This is not documented, and the result is very
  bad in that an exception is thrown by CP2, and the sync (and
  future syncs) is prevented from finishing
* Wrote some defensive code to detect bad events and simply not
  add them
* Open a new bug to track trying to determine why the Exchange
  server is sending this kind of data.

Bug: 2455341
Change-Id: Ibcfd412382164351c96f368dc043f38c7b481154
2010-03-06 22:07:22 -08:00
Marc Blank
850e9fdda9 Use watchdog alarms with mailbox syncs
* There are cases in which an HTTP POST can hang indefinitely; this
  will eventually be caught, but it could be a long time until this
  happens (I've seen hours)
* Set a watchdog alarm for all HTTP POSTs (rather than just PING)

Bug: 2492860
Change-Id: Ifccbb54c191c4164bb3188e0291490276bce25fb
2010-03-06 17:09:58 -08:00
Marc Blank
136d3b96bb Revert code unintentionally checked in; remove unused code
Change-Id: I18160855280173a7599ee7e9252f4dcb2daf7143
2010-03-06 14:56:02 -08:00
Marc Blank
b581afdfc1 Clean up references to INSTANCE in SyncManager
* Help prevent NPEs, especially during testing where the service
  is constantly brought up and down
* Generally harden the code and make it clearer

Change-Id: If6c1c74d3fe9a89f67f71c9362a15bfecd70fa58
2010-03-06 11:00:59 -08:00
Marc Blank
54181220e2 Fix #2492864 (Upsync failures in Exchange 2003)
* Of all crazy things, Exchange 2003 doesn't like uploading the organizer's
  email/name in changes.  This isn't documented anywhere.
* Don't send up organizer name/email on changes.

Bug: 2492864
Change-Id: I1f2aefb6f9020025578325c5c7b3cf869f17e27f
2010-03-06 09:51:05 -08:00
Marc Blank
99feed44ec Stop pings when other syncs in the same account start
* When a mailbox syncs, pings should be aborted, or they appear to
  end up timing out with a stale connection (observation from logs)
* The result of timing out is lack of push until the heartbeat time
  has elapsed and our alarm triggers
* Also refactor code; some of the names of methods was unfortunate
  and these methods were being used in this CL

Bug: 2492848
Change-Id: Ib626a5d3cf6d2c61e3b11f4886a3fedbf9727bfa
2010-03-05 17:33:22 -08:00
Marc Blank
e8377ae7d4 Merge "Persist pingHeartbeat after pingLoop finishes" 2010-03-05 16:15:46 -08:00
Marc Blank
a567edb515 Persist pingHeartbeat after pingLoop finishes
* We weren't persisting the current heartbeat after the loop finishes,
  so we'd end up starting next time with the default start heartbeat
* The new code is a bit more efficient, as we'd start the next pingLoop
  with the heartbeat previously in effect

Bug: 2492854
Change-Id: I1d488e3eb05530c452605b25108b35af582e692f
2010-03-05 15:19:38 -08:00
Makoto Onuki
92032cb75c Merge "Fix for Account.isValidId() crash when getting -1." 2010-03-05 15:14:32 -08:00
Makoto Onuki
c133e6f185 Fix for Account.isValidId() crash when getting -1.
Bug 2493026
2010-03-05 15:06:12 -08:00
Marc Blank
db9f3d2441 Fix #2490068 (Exchange 2003 won't upload)
* It turns out that Events don't store null for empty fields like location
  and description, but rather an empty string.
* Exchange 2003 doesn't like seeing empty values, so check for this before
  uploading.

Bug: 2490068

Change-Id: Ib208f9d6ec116a99adf798939dfbc4d4bdd15edf
2010-03-04 21:25:05 -08:00
Marc Blank
08ea24ff99 Merge "Remove some logging related to alarms/wakelocks" 2010-03-04 08:43:37 -08:00
Marc Blank
178888f770 Remove some logging related to alarms/wakelocks
* These logging statements haven't been useful in quite a while
* Leave them in the source, commented out, in case we want to
  restore them

Change-Id: Ie8bc6497bc2ea3aa3437f9b2aec8c2b12af907bf
2010-03-04 08:42:35 -08:00
Mihai Preda
989552c107 Move parseDateTimeToMillis() to com.android.email.Utility. 2010-03-04 12:45:37 +01:00
Andrew Stadler
a3cfdd2f3c Merge "Continuing work on account migration" 2010-03-03 22:33:59 -08:00
Andrew Stadler
9f73249031 Continuing work on account migration
* Prune all folders, messages & attachments that won't migrate
* Clean up SSL/TLS values for better connection results & security
* Move account setup lookup code to AccountSettingsUtils to share it
* Cleanup config/auto-rotation settings to prevent relaunch of
  auto-discover or account check (from exchange).
* A couple of other very small fixes

Bug: 2065528
2010-03-03 22:19:41 -08:00
Makoto Onuki
652be6fb3d MessageList: Go to Welcome if account not found.
If the account specified with an Intent doesn't exist, show the Welcome
activity instead, which will navigate the user to the appropriate activity.
(e.g. account list if there're more than one account)

Bug 2479609
2010-03-03 17:07:29 -08:00
Makoto Onuki
678ab2c780 Merge "Store UUID instead of _id in desktop shortcuts." 2010-03-03 15:46:37 -08:00
Makoto Onuki
e37881aac5 Store UUID instead of _id in desktop shortcuts.
- Because AccountBackupRestore won't preserve _id.
- Now MessageList accepts both Donut(1.6)-style URIs and Eclair(2.0-2.1)-style
  URIs.

Bug 2479609
2010-03-03 15:41:10 -08:00
Marc Blank
bf6f237e21 Merge "Harden SyncManager against CalendarProvider query results" 2010-03-03 10:48:12 -08:00
Marc Blank
5bf193844c Harden SyncManager against CalendarProvider query results
* Unlike EmailProvider, CalendarProvider can return null from queries.
* Put checks for null around code using the result of query to
  prevent NPE's

Change-Id: Ia9e8e2f44406dce07dcb2ffa40c22933ec2d4f07
2010-03-03 10:17:57 -08:00
Mihai Preda
a597b59f46 MessageView: invoke calendar for EAS meeting invitation. 2010-03-03 13:42:24 +01:00
Marc Blank
4476b2a1da Fix #2478711
* We needed to check that clientId wasn't null before sending it back
  to the server
* Exceptions don't have a clientId

Bug: 2478711
Change-Id: Ic0d42bb699605a7bb77535b050a4d03b4b6b8b09
2010-03-02 14:54:11 -08:00
Marc Blank
d05cc9196a Merge "Add logging when an NPE is imminent when writing WBXML data" 2010-03-02 14:23:11 -08:00
Marc Blank
1e474a41ba Add logging when an NPE is imminent when writing WBXML data
* We want an NPE to be thrown, since we need to locate/fix errors
  of this kind.
* Add logging to help isolate the error

Change-Id: I0f4336b42cbdb88c72459bdeca9c9fc236d9299f
2010-03-02 14:21:32 -08:00
Marc Blank
4577f71f76 Refine meeting invitation emails; include VTIMEZONE
* VTIMEZONE blocks must be sent in our ics files for meeting
  invitations that are recurring, as the originator's time zone
  is critical in making attendee's calendars accurate
* Created a utility to convert TimeZone to VTIMEZONE data; the
  utility successfully generates data (including recurrence rules)
  for the entire tzinfo database (the source of TimeZone).
* Updated our ics files to include VTIMEZONE when appropriate and
  send DTSTART/DTEND in local time in that case
* Wrote some unit tests, but more are needed

Change-Id: Iccbdd00cd3b2be2da058b344ebacd17ed6fb0e3d
2010-03-02 11:38:01 -08:00
Mihai Preda
777dbe5999 MessageView: use WebView setBlockNetworkLoads().
Instead of setBlockNetworkImage, for security reasons.
Bug 2440315.
2010-03-02 15:13:18 +01:00
Marc Blank
0ed64fbb3d Fix #2450322 (ANR's in email)
* My Calendar observer registration code was storing the wrong id
  in the hash map.  Because of this, the code could be called again
  and again, generating lots of extraneous queries and generally
  creating a lot of havoc, including ANR's

Bug: 2450322
Change-Id: I03db8156ee99a0c7243a9188558dffc6a843a65a
2010-03-01 20:50:05 -08:00
Marc Blank
29c38d2c84 Send cancellation email when user-created event is deleted
Bug: 2465496
Change-Id: I49bf9951e816a4500b7622cbca84fb75edfdb76c
2010-03-01 18:58:47 -08:00
Marc Blank
ec2f181b2c Fix build break (Calendar field changed name)
Change-Id: I9532c459f3cf624fa88269370fa36d191481e500
2010-03-01 16:56:40 -08:00
Makoto Onuki
726a9fcef3 Ignore FETCH responses that don't have UID.
We've observed that the secure.emailsrvr.com email server returns an excess
FETCH response for a UID FETCH command.  Excess responses don't have the
UID field, even though we request, which led the response parser to crash.

This patch fixes it by making the parser ignore response lines that don't
have UID.

Bug: 2441065
2010-03-01 16:00:05 -08:00
Makoto Onuki
642219502c Merge "Launch Calendar app when notification is touched." 2010-03-01 11:09:59 -08:00
Makoto Onuki
49491da570 Launch Calendar app when notification is touched.
Launch Calendar app when the "Exchange calendar added" notification is touched.

Bug 2428718
2010-03-01 11:06:42 -08:00
Marc Blank
361c2ed0eb Merge "Stop calendar/contacts sync in progress when sync setting is turned off" 2010-03-01 11:06:21 -08:00
Marc Blank
f8b45d934b Stop calendar/contacts sync in progress when sync setting is turned off
* Syncs in progress weren't checking the getSyncAutomatically setting in
  the account; therefore, a long sync would continue running even though the
  user unchecked the "Sync Calendar/Contacts" box in the settings
* Make the adapters check the flag each time through its sync loop (which
  is currently 5 items); this should cause in-progress syncs to stop within
  a few seconds

Bug: 2185319
Change-Id: Ie181f6de4219ecf27fff58ed59a277ae285622c5
2010-03-01 11:00:20 -08:00
Makoto Onuki
82ad035422 Merge "Remove TODO, now that SYNC_OBSERVER_TYPE_SETTINGS is in SDK" 2010-03-01 09:43:51 -08:00
Marc Blank
3e69a168b3 Fix meeting invitation email parsing error
Change-Id: Ieaf786f6e466ee57404c6e32ab11c31e35ccc340
2010-02-28 18:52:21 -08:00
Marc Blank
63a411e9fa Merge "Fix #2474554 (After meeting policy req's, no sync)" 2010-02-28 11:13:40 -08:00
Marc Blank
0d0f094de8 Fix #2474554 (After meeting policy req's, no sync)
* We weren't retrying the initial account sync after policies are
  successfully enabled.  This results in failure to sync, as we
  go right into a ping loop.
* Retry account sync after provisioning is first successful

Bug: 2474554
Change-Id: I20165a5941626b690710f82088d8d861679084b2
2010-02-28 11:06:21 -08:00
Dianne Hackborn
6d0016229a Move DeviceAdmin APIs to android.app.admin. 2010-02-26 23:31:37 -08:00
Makoto Onuki
97c06c9131 Remove TODO, now that SYNC_OBSERVER_TYPE_SETTINGS is in SDK 2010-02-26 14:00:26 -08:00
Makoto Onuki
c18f8f615f Enable calendar sync for Exchange accounts when upgrading.
On the first boot after upgrade from Eclair, enable calendar sync for all the
existing Exchange accounts, if any, and show notification.

Note on this version, nothing happens when you click on the "Calendar added"
notification.  We're waiting for an API (action or something) to launch
calendar.

Bug 2428718
2010-02-26 13:28:59 -08:00
Mihai Preda
0574a37b4e Merge "MessageView: EAS calendar meeting invite answer buttons." 2010-02-26 12:34:21 -08:00