Commit Graph

1736 Commits

Author SHA1 Message Date
Makoto Onuki
bf58053406 Follow-up to the new IMAP parser.
- Replace string literals in ImapStore with constants.
- Simplifies ImapStore.en/decodeFolderName
- Mix cases in the test data to test for case-insensitivity

Change-Id: I88424357227bcf78528df5e6a1c4ba45d54cc65b
2010-06-01 10:50:15 -07:00
Makoto Onuki
3cc80998ba Merge "Fix ANR in one time initializer and unify BroadccastReceivers." 2010-05-28 16:31:18 -07:00
Makoto Onuki
898283b6fa Fix ANR in one time initializer and unify BroadccastReceivers.
- Merged all three BroadcastReceivers into one.
  (Changed class name because old ones may have been disabled.)

- Use IntentService to perform the tasks in a worker thread.

Note the new receiver will never be disabled.  We always need to start
exchange.SyncManager.

Bug 2722155
Bug 2416929

Change-Id: I8241880fc1ee38d85dcdca7e1d46fc2f6b2d375b
2010-05-28 16:28:01 -07:00
Makoto Onuki
7e24c6c6f9 Get rid of Handlers and make activities (more) BG thread free.
Part 1: MessageView

- It's an attempt to get rid of Handlers from Activities, and
  reduce the amount of code that runs run a BG thread in them.

- Introduced ResultUiThreadWrapper, which wraps another Controller.Result
  and make callbacks get called on the UI thread.

  - It'll make the logic in ControllerResults cleaner and more straightforward.

  - ResultUiThreadWrapper isn't too memory efficient because it allocates a
    Runnable even if the wrappee's target method is empty.
    However these callbacks don't get called often, and optimizing it would
    make code more complicated, so I don't think it's worth optimizing.

- Now we can assume all the methods in activities except
  AsyncTask.doInBackground runs on the UI thread, with some special exceptions
  like MediaScannerNotifier.
  In my previous abandoned change, I named methods that can run on BG threads
  '*OnUiThread', but now there's no need to do that.

  This also means we can minimize the use of synchronizations.

Change-Id: Ia6d9d2a266ebf5a4b23d712e9eaea3272adbd2a6
2010-05-28 16:02:21 -07:00
Makoto Onuki
7e5ba0e1ea New IMAP parser to fix long-lasting problems.
- Almost completely re-wrote ImapResponseParser layer
- We no longer use simple ArrayList and String to represent
  imap response.  We have classes for that.  (Type safe!)
  These classes are also NPE-free.
  (which isn't necessarily a good thing, though)
- A lot of clean-ups and fixes in ImapStore.
- More tests for ImapStore.

Now ImapResponseParser moved to com.android.email.mail.store.imap.parser,
but inside, it's 99% new code.

This CL introduces many new classes, but most of them are small classes
to represent the IMAP response.

Problems that this CL fixes includes:
- Special characters in OK response
- Handling BYE response
- Case sensitivity
- ClassCast/ArrayIndexOutOfBound/NumberFormatException
- Handling NIL/literals at any position

Bug 2480227
Bug 2244049
Bug 2138981
Bug 1351896
Bug 2591435
Bug 2173061
Bug 2370627
Bug 2524881
Bug 2525902
Bug 2538076

Change-Id: I7116f57fba079b8a5ef8d5439a9b3d9a9af8e6ed
2010-05-28 15:59:09 -07:00
Andrew Stadler
50adf5369c Merge "Refactor AccountsAdapter into its own class." 2010-05-28 13:26:46 -07:00
Andrew Stadler
f3c285d4a3 Refactor AccountsAdapter into its own class.
* Extract AccountAdapter from AccountFolderList
* Use callback instead of hardcoded launch of MailboxList
* Unit tests

Change-Id: Icafce1ef73a99fb61985c649620440656f9b51a3
2010-05-28 12:54:56 -07:00
Marc Blank
9d387ff0bb Fix validation use of FolderSync
* To avoid having to use a mock deviceId with FolderSync in validation, we now
  simply use the real deviceId with the correct SyncKey ("0" for a new account,
  or the actual sync key if the account already exists)
* Rework utility code that finds existing accounts
* Write unit test for findExistingAccount

Bug: 2589243
Change-Id: Ia532b2e209aec3aa01ca06617b4da78c3d986b32
2010-05-28 10:48:17 -07:00
Marc Blank
86f122e4ce Merge "Implement basic EAS 12.1 functionality" 2010-05-28 09:24:42 -07:00
Marc Blank
c1840b2c9d am 930cdbd8: am 77e21615: am 8c742a4c: Handle case of null organizerEmail in changed event 2010-05-27 23:05:10 -07:00
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
930cdbd8ba am 77e21615: am 8c742a4c: Handle case of null organizerEmail in changed event
Merge commit '77e2161559467ac94ffdbaa2d51716354741ae17' into kraken

* commit '77e2161559467ac94ffdbaa2d51716354741ae17':
  Handle case of null organizerEmail in changed event
2010-05-27 10:01:19 -07:00
Marc Blank
77e2161559 am 8c742a4c: Handle case of null organizerEmail in changed event
Merge commit '8c742a4c65e1ff2618e1005803edb65a42994fb6' into froyo-plus-aosp

* commit '8c742a4c65e1ff2618e1005803edb65a42994fb6':
  Handle case of null organizerEmail in changed event
2010-05-27 09:59:33 -07:00
Marc Blank
8c742a4c65 Handle case of null organizerEmail in changed event
* A recent change assumed that organizerEmail couldn't be null while
  an event was being added.  However, there is an unusual case in
  which it CAN be null, and this CL handles that case
* Regression caused by: SHA 7f448dcd47
Bug: 2719254
Change-Id: Idb8fc79c898bcd2e53fcc8b3e42d0ba67ba762fa
2010-05-27 09:50:31 -07:00
Marc Blank
d77977fb80 am 5e22fef1: am 17c8b338: am b6a08f68: Remember to store modified organizerEmail 2010-05-26 11:43:07 -07:00
Marc Blank
4da72702cf am 5d8df0fb: am d3951041: am 7f448dcd: Limit the number of attendees in a synced event 2010-05-26 11:42:54 -07:00
Marc Blank
5e22fef1c7 am 17c8b338: am b6a08f68: Remember to store modified organizerEmail
Merge commit '17c8b3388c1aceb5a4886f7d783e1db1913d9d05' into kraken

* commit '17c8b3388c1aceb5a4886f7d783e1db1913d9d05':
  Remember to store modified organizerEmail
2010-05-26 09:31:59 -07:00
Marc Blank
17c8b3388c am b6a08f68: Remember to store modified organizerEmail
Merge commit 'b6a08f68d7c49835fffed0719e99c13b50fa525c' into froyo-plus-aosp

* commit 'b6a08f68d7c49835fffed0719e99c13b50fa525c':
  Remember to store modified organizerEmail
2010-05-26 09:28:15 -07:00
Marc Blank
b6a08f68d7 Remember to store modified organizerEmail
Bug: 2709816
Change-Id: Ib26536c127857fa8a1fdf805469872419931f21c
2010-05-26 07:33:06 -07:00
Marc Blank
5d8df0fbc3 am d3951041: am 7f448dcd: Limit the number of attendees in a synced event
Merge commit 'd3951041f613008dcbd3cd4b3ddebdad5ccab806' into kraken

* commit 'd3951041f613008dcbd3cd4b3ddebdad5ccab806':
  Limit the number of attendees in a synced event
2010-05-25 20:13:30 -07:00
Marc Blank
d3951041f6 am 7f448dcd: Limit the number of attendees in a synced event
Merge commit '7f448dcd470ac509a85368a84f5a55c346ae7e70' into froyo-plus-aosp

* commit '7f448dcd470ac509a85368a84f5a55c346ae7e70':
  Limit the number of attendees in a synced event
2010-05-25 20:12:15 -07:00
Marc Blank
7f448dcd47 Limit the number of attendees in a synced event
* If there are over 50 attendees in an event, we only store the
  organizer as an attendee (the rest are redacted) and we set
  the hasAttendeeData flag to 0
* If the user is the organizer, we reset the owner of the event
  to a bogus address, which causes the UI to prevent edits to
  the event (we can't upload without losing all of the attendee
  information on the server). We also prevent the event from ever
  being uploaded (belt & suspenders)
* If the user is an attendee, we allow changes to be uploaded
  (this would be attendee status and free/busy), but the list of
  attendees on the server is removed.
* We also mark events with redacted attendees, even though we don't
  use that information currently.  In a future version, however,
  we could use this to indicate the redacted state to the user.

Bug: 2709816
Change-Id: I2b44af59c598cedf906af12bf9b4eaf7484b9d20
2010-05-25 19:35:05 -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
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
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
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
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
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
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
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
c98be369ec am a2496548: am c901810f: Start sync ASAP when calendar is re-enabled
Merge commit 'a2496548c6ed07cb6cb3820c9922a0e96ca2b8a4' into kraken

* commit 'a2496548c6ed07cb6cb3820c9922a0e96ca2b8a4':
  Start sync ASAP when calendar is re-enabled
2010-05-10 09:49:51 -07:00
Marc Blank
3a07d70b69 am d1e00e8a: Fix NPE resulting from attendees-only update from server
Merge commit 'd1e00e8aa69ccad3de61ed638b70bf5a9e5bd937' into froyo-plus-aosp

* commit 'd1e00e8aa69ccad3de61ed638b70bf5a9e5bd937':
  Fix NPE resulting from attendees-only update from server
2010-05-10 09:45:47 -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
a2496548c6 am c901810f: Start sync ASAP when calendar is re-enabled
Merge commit 'c901810f84754c80aa3988b26f5ff620373f9a46' into froyo-plus-aosp

* commit 'c901810f84754c80aa3988b26f5ff620373f9a46':
  Start sync ASAP when calendar is re-enabled
2010-05-10 09:43:19 -07:00
Marc Blank
d1e00e8aa6 Fix NPE resulting from attendees-only update from server
* Code for updating attendees in CalendarProvider2 wasn't taking
  an attendees-only update into consideration
* Fix code to allow for this, including proper updates for our
  selfAttendeeStatus and attendees ExtendedProperty values

Bug: 2668682
Change-Id: I8c7deb971cd0b6846c09ee3cd603f6fc762a9407
2010-05-10 09:39:20 -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
Makoto Onuki
1f2caa8095 Fix 3 problems that FindBugs found.
Bug 2666278 [findbugs] broken double-lock pettern in Utility.FolderProperties.getInstance()
Bug 2666207 [findbugs] potential NPE in MessagingController.processPendingDeletesSynchronous()
Bug 2666195 [findbugs] Potential NPE in AccountSetupNames.onCreate()

Change-Id: I2ee5bd5b7c80f8bdd32b3c45abb655a3d3fb8c9e
2010-05-07 14:04:50 -07:00
Marc Blank
c901810f84 Start sync ASAP when calendar is re-enabled
Bug: 2664421
Change-Id: Id3c08a5ca8abc5ad0f483408f38371dcc5f2d840
2010-05-06 20:36:36 -07:00
Marc Blank
3517816edb am d58a050d: am 630758ef: am 3558e5f2: Shut down Email process when sync is totally blocked 2010-05-06 16:35:02 -07:00
Marc Blank
d58a050dff am 630758ef: am 3558e5f2: Shut down Email process when sync is totally blocked
Merge commit '630758ef898964814072467454bea615d31fc4ff' into kraken

* commit '630758ef898964814072467454bea615d31fc4ff':
  Shut down Email process when sync is totally blocked
2010-05-06 16:31:10 -07:00
Marc Blank
3558e5f227 Shut down Email process when sync is totally blocked
* When sync threads get blocked by SSL/Socket code, we detect this
  and shutdown the ClientConnectionManager, hoping this will solve
  the problem.
* Apparently, this doesn't always work.  The result is that syncs
  are frozen until the device is rebooted (certainly) or until the
  Email process is stopped and restarted (hopefully)
* This CL kills the Email process after an unsuccessful attempt to
  clear blocked threads using ClientConnectionManager.shutdown()

Bug: 2615293
Change-Id: I8445b278817e508a855adeb88d6b2f969d28858b
2010-05-06 15:03:33 -07:00
Marc Blank
fcd18d94d5 am 801368ac: am 9e8fef57: am 2b3bbb69: Fix NPE in SyncManager 2010-05-06 12:45:52 -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
801368ac4b am 9e8fef57: am 2b3bbb69: Fix NPE in SyncManager
Merge commit '9e8fef57a5967a0056100921a294f464669c394d' into kraken

* commit '9e8fef57a5967a0056100921a294f464669c394d':
  Fix NPE in SyncManager
2010-05-06 12:37:50 -07:00
Marc Blank
8f255ddeee Merge "Add checks for Event validity before commit" into froyo 2010-05-06 08:49:48 -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
2b3bbb6948 Fix NPE in SyncManager
Bug: 2660742
Change-Id: I80ec62a0e128b3f20873a718d951e41f3fa2eb90
2010-05-06 07:05:26 -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
Andy Stadler
2c4e1a0c9c am 3ed0674a: am 8fd23c5b: am 48d2621b: Merge "Fix GAL lookup issue" into froyo 2010-05-03 09:36:30 -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
Makoto Onuki
9d2b44d473 am eaf1139c: am a094cc25: am cf362a48: Collectly preserve the service start-id. 2010-05-03 09:36:26 -07:00
Andy Stadler
3ed0674ace am 8fd23c5b: am 48d2621b: Merge "Fix GAL lookup issue" into froyo
Merge commit '8fd23c5b49325766620ba78f79ca708c7649bf7f' into kraken

* commit '8fd23c5b49325766620ba78f79ca708c7649bf7f':
  Fix GAL lookup issue
2010-05-03 09:34:05 -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
Makoto Onuki
eaf1139c6c am a094cc25: am cf362a48: Collectly preserve the service start-id.
Merge commit 'a094cc259da268ad6f78f50afe5cbbf674418b86' into kraken

* commit 'a094cc259da268ad6f78f50afe5cbbf674418b86':
  Collectly preserve the service start-id.
2010-05-03 09:33:56 -07:00
Andy Stadler
48d2621b45 Merge "Fix GAL lookup issue" into froyo 2010-05-03 07:25:15 -07:00
Andrew Stadler
a7628f3bc0 Merge "Better handling for untyped attachments" into froyo 2010-05-03 07:22:00 -07:00
Marc Blank
cb7ac76f0b Fix GAL lookup issue
Bug: 2646410
Change-Id: I52b0ddf4b7c6b56b3ad060d8d42a6080efa3662b
2010-05-02 13:51:35 -07:00
Andrew Stadler
e82438b6bd am 683812e1: am 01cc30c9: am 14812a50: Workaround for IllegalArgumentException in SyncManager 2010-04-30 15:08:06 -07:00
Marc Blank
a0cc4cd01a am 6f6c082d: am 3f0d3a43: am 47a59d88: Merge "Fix issues with incorrect email replies to event organizer" into froyo 2010-04-30 15:07:51 -07:00
Marc Blank
7d5986aa04 am 017aeb6d: am c9f92395: am 468fe91d: Prevent account reconcile from running when service is down 2010-04-30 15:07:48 -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
Makoto Onuki
cf362a48c1 Collectly preserve the service start-id.
We were passing the wrong arguments, which caused the service left running.

Bug 2646212

Change-Id: Ie5aeaeb80635c8e805fc2e9c6f4aec3b21942740
2010-04-30 14:41:47 -07:00
Andrew Stadler
683812e1ff am 01cc30c9: am 14812a50: Workaround for IllegalArgumentException in SyncManager
Merge commit '01cc30c9d8327c6172036c1e15455d305423c718' into kraken

* commit '01cc30c9d8327c6172036c1e15455d305423c718':
  Workaround for IllegalArgumentException in SyncManager
2010-04-30 12:46:00 -07:00
Andrew Stadler
14812a50a8 Workaround for IllegalArgumentException in SyncManager
* There is a race condition in which the AccountManager listener
  isn't properly unregistered when SyncManager is shut down
* In this case, SyncManager tries to register a new listener
  (i.e. registering again), which causes an IllegalArgumentException
* The quick workaround is simply to catch and ignore this exception,
  as it's really more of a warning than a true error
* A bug will be filed for the underlying issue

Bug: 2631561
Change-Id: I139d24ae045d402d4d8cb006406ef96ccc768566
2010-04-30 12:39:08 -07:00
Marc Blank
6f6c082d97 am 3f0d3a43: am 47a59d88: Merge "Fix issues with incorrect email replies to event organizer" into froyo
Merge commit '3f0d3a437d10bd63c0f9260a853d5b43d973c8df' into kraken

* commit '3f0d3a437d10bd63c0f9260a853d5b43d973c8df':
  Fix issues with incorrect email replies to event organizer
2010-04-30 12:07:24 -07:00
Marc Blank
47a59d883f Merge "Fix issues with incorrect email replies to event organizer" into froyo 2010-04-30 12:04:34 -07:00
Marc Blank
017aeb6dc1 am c9f92395: am 468fe91d: Prevent account reconcile from running when service is down
Merge commit 'c9f923959eb7987db4f12dc7e2a1103e600d9eeb' into kraken

* commit 'c9f923959eb7987db4f12dc7e2a1103e600d9eeb':
  Prevent account reconcile from running when service is down
2010-04-30 11:55:44 -07:00
Marc Blank
468fe91dd8 Prevent account reconcile from running when service is down
Bug: 2644142
Change-Id: Ia6ccf7371bc08b3b67ab3d0871f3618c5e5bd107
2010-04-30 11:43:40 -07:00
Marc Blank
92cb5d1dbe am 475b37f4: am 79ace451: am 09f0ab04: Merge "Fix NPE in SyncManager" into froyo 2010-04-30 11:33:33 -07:00
Makoto Onuki
7446a41fbd am 0a06a1a6: am 4a1565fd: am 5ab7ec71: Move a bare string to a resource. 2010-04-30 11:33:31 -07:00
Marc Blank
475b37f49d am 79ace451: am 09f0ab04: Merge "Fix NPE in SyncManager" into froyo
Merge commit '79ace45187236afc736c60bc0a0e70f284bce36b' into kraken

* commit '79ace45187236afc736c60bc0a0e70f284bce36b':
  Fix NPE in SyncManager
2010-04-30 11:29:35 -07:00
Makoto Onuki
0a06a1a683 am 4a1565fd: am 5ab7ec71: Move a bare string to a resource.
Merge commit '4a1565fd7ec426ba4615aedeb3f2ddcb03ecac22' into kraken

* commit '4a1565fd7ec426ba4615aedeb3f2ddcb03ecac22':
  Move a bare string to a resource.
2010-04-30 11:29:32 -07:00
Marc Blank
d2c773a806 Fix issues with incorrect email replies to event organizer
* We were previously storing the user's attendee status in the
  SYNC_ADAPTER_DATA column of the Event, but it turns out that
  this data isn't available in the Entity we retrieve when
  uploading changes to the server
* The result is that we often thought the user's status had
  changed when in fact it had not; in these cases, we sent email
  to the organizer, often with the wrong information.
* As of this CL, we store the user's attendee status in an
  ExtendedProperties row (these values are already exposed in event
  entities)
* The logic otherwise remains the same; we now get correct data,
  however

Bug: 2638762
Change-Id: Ibe8db90c16b4ca06203f77fd010aa26dde89a556
2010-04-30 10:52:18 -07:00
Marc Blank
09f0ab0454 Merge "Fix NPE in SyncManager" into froyo 2010-04-30 10:39:30 -07:00
Makoto Onuki
5ab7ec7123 Move a bare string to a resource.
Bug 2637666

Change-Id: I59cf5d2b30846604049d3f988b1003dd7d91ad6f
2010-04-30 09:21:04 -07:00
Marc Blank
3139d43ee2 Fix NPE in SyncManager
Bug: 2644142
Change-Id: I4336aef65669b7a4a32e43e8068edd4dd9772b03
2010-04-29 20:41:07 -07:00
Marc Blank
617eef466b am ba8dfde0: am 220d9107: am 8ba07285: Use timezone in exception ics files 2010-04-29 11:03:32 -07:00
Marc Blank
ba8dfde0c1 am 220d9107: am 8ba07285: Use timezone in exception ics files
Merge commit '220d9107535360b842f1a8ff872b2d22296d98b3' into kraken

* commit '220d9107535360b842f1a8ff872b2d22296d98b3':
  Use timezone in exception ics files
2010-04-29 10:51:25 -07:00
Marc Blank
8ba0728533 Use timezone in exception ics files
* Exchange seems to require time zone information in ics files containing
  event exceptions, although this is NOT the case for iCalendar, and appears
  not to conform to VCALENDAR specifications
* This causes exceptions to be placed on the wrong date or perhaps even
  ignored, depending on the circumstance
* This CL simply adds time zone information to all exception ics files

Bug: 2640878
Change-Id: Ibc614eb7a2c45e9e782b10be979d9892bbfc0029
2010-04-29 10:16:58 -07:00
Marc Blank
3630a70902 am 59c9add4: am 0d46f9f8: am 39e6d3ae: Fix concurrent modification exception 2010-04-29 09:45:46 -07:00
Marc Blank
59c9add49e am 0d46f9f8: am 39e6d3ae: Fix concurrent modification exception
Merge commit '0d46f9f87cb7540113c9a4f9903127cacb70d395' into kraken

* commit '0d46f9f87cb7540113c9a4f9903127cacb70d395':
  Fix concurrent modification exception
2010-04-29 09:38:47 -07:00
Marc Blank
39e6d3aed0 Fix concurrent modification exception
* Synchronize recently added call to releaseMailbox on sSyncLock

Bug: 2639210
Change-Id: Iaa1f2ed7cdc9cc0c306363487095ac5ccd02f9a3
2010-04-28 22:49:23 -07:00
Marc Blank
2ee98bee7b am 230dc853: am 8048f0fe: am 8917e52d: Fix regression that prevents calendar sync w/ new accounts 2010-04-28 18:39:41 -07:00
Marc Blank
230dc85390 am 8048f0fe: am 8917e52d: Fix regression that prevents calendar sync w/ new accounts
Merge commit '8048f0fef89c6d0cda8538cd5fe5103bf11cc2a9' into kraken

* commit '8048f0fef89c6d0cda8538cd5fe5103bf11cc2a9':
  Fix regression that prevents calendar sync w/ new accounts
2010-04-28 18:34:29 -07:00
Marc Blank
8917e52db0 Fix regression that prevents calendar sync w/ new accounts
* The regression is caused by a check on whether the calendar is
  syncable, as determined by the status of the Calendar (via
  CalendarProvider2).
* Unfortunately, if there IS no calendar, we were disallowing sync,
  which prevents the calendar from being created in the first place

Bug: 2619755
Change-Id: I1e94a129413bdbe9bc9bfb3608d3ca95f23d8dfb
2010-04-28 15:27:11 -07:00
Marc Blank
caa65ed0de am 5a957fc9: am 7e8315c0: am b7f57f25: Remove STOPSHIP debug code 2010-04-28 10:08:10 -07:00
Marc Blank
5a957fc91a am 7e8315c0: am b7f57f25: Remove STOPSHIP debug code
Merge commit '7e8315c018edd545cc7ed1ef560a03e623a71a5d' into kraken

* commit '7e8315c018edd545cc7ed1ef560a03e623a71a5d':
  Remove STOPSHIP debug code
2010-04-28 10:03:04 -07:00
Marc Blank
77cc5f3383 am 7aa9e1e0: am 773dc43c: am b5bf09a5: Merge "Allow more time for HttpPost watchdog timeout" into froyo 2010-04-28 09:52:17 -07:00
Marc Blank
5e7ddbf584 am 504bd426: am 8ed23be0: am f7369ad5: Merge "Shutdown all connections when sync service is hung" into froyo 2010-04-28 09:52:16 -07:00
Andy Stadler
1bfe167734 am 656d89d6: am 78d3c602: am b915c3c0: Merge "Skip security check when account id is unknown." into froyo 2010-04-28 09:52:13 -07:00
Marc Blank
b7f57f25ea Remove STOPSHIP debug code
Bug: 2638014
Change-Id: I10a7ac89cce68ae1db146eb9bed574c00386ba62
2010-04-28 09:48:40 -07:00
Marc Blank
7aa9e1e0ac am 773dc43c: am b5bf09a5: Merge "Allow more time for HttpPost watchdog timeout" into froyo
Merge commit '773dc43cc2caf7638c610ac85711eed89a06efa5' into kraken

* commit '773dc43cc2caf7638c610ac85711eed89a06efa5':
  Allow more time for HttpPost watchdog timeout
2010-04-28 09:43:23 -07:00
Marc Blank
504bd426c8 am 8ed23be0: am f7369ad5: Merge "Shutdown all connections when sync service is hung" into froyo
Merge commit '8ed23be08f34ba11e5bf0acd98d1419df893a0bc' into kraken

* commit '8ed23be08f34ba11e5bf0acd98d1419df893a0bc':
  Shutdown all connections when sync service is hung
2010-04-28 09:43:21 -07:00
Andy Stadler
656d89d67f am 78d3c602: am b915c3c0: Merge "Skip security check when account id is unknown." into froyo
Merge commit '78d3c6022ccf87566261faf694ff506a68ec6b6f' into kraken

* commit '78d3c6022ccf87566261faf694ff506a68ec6b6f':
  Skip security check when account id is unknown.
2010-04-28 09:43:18 -07:00
Marc Blank
b5bf09a56d Merge "Allow more time for HttpPost watchdog timeout" into froyo 2010-04-27 23:25:15 -07:00
Marc Blank
f7369ad51f Merge "Shutdown all connections when sync service is hung" into froyo 2010-04-27 23:17:41 -07:00
Marc Blank
8f9e872eaf Allow more time for HttpPost watchdog timeout
* The current timeout is triggering more often than it should, which
  causes delays and inefficiency.  Increase it from 10 to 30 seconds.

Bug: 2615293
Change-Id: I54b74cc7ad9f1c8286af49b957584670c071640c
2010-04-27 23:13:32 -07:00
Marc Blank
2341e096e6 Shutdown all connections when sync service is hung
* When a sync thread receives an alarm due to a missed socket timeout
  on an HttpPost, we try to abort the HttpPost.
* At times, however, the HttpPost cannot be aborted and the thread
  hangs indefinitely.
* In this CL, we try to break this vicious cycle by shutting down our
  ClientConnectionManager when this case is detected.  This should, in
  turn, close all of our socket connections, causing the sync threads
  to generate IOExceptions and terminate.
* After appropriate IOException waits, new sync threads should then be
  able to run normally.

Bug: 2615293
Change-Id: Idea6c3653cd60822d6260e0c5a7dad790ee25858
2010-04-27 22:49:50 -07:00
Marc Blank
7c6975e168 am f0ef73dd: am 29270f38: am 422ceb0e: Merge "Don\'t enable calendar sync if sync_events is disabled" into froyo 2010-04-27 18:56:07 -07:00
Makoto Onuki
e333b68c9e Skip security check when account id is unknown.
Doing the check caused:
   IllegalArgumentException: Unknown URI content://com.android.email.provider/account/-1
       at com.android.email.provider.EmailProvider.query(EmailProvider.java:1092)
       at android.content.ContentProvider$Transport.query(ContentProvider.java:163)
       at android.content.ContentResolver.query(ContentResolver.java:245)
       at com.android.email.activity.MessageList.isSecurityHold(MessageList.java:1146)

Bug 2635060

Change-Id: I80e7c00ef2dd74ceae24a88daf43a0681124a9d4
2010-04-27 17:28:39 -07:00
Marc Blank
f0ef73dd82 am 29270f38: am 422ceb0e: Merge "Don\'t enable calendar sync if sync_events is disabled" into froyo
Merge commit '29270f382389b8370f56941ca2209bfe11c5c6f3' into kraken

* commit '29270f382389b8370f56941ca2209bfe11c5c6f3':
  Don't enable calendar sync if sync_events is disabled
2010-04-27 12:06:24 -07:00
Marc Blank
422ceb0efd Merge "Don't enable calendar sync if sync_events is disabled" into froyo 2010-04-27 11:59:33 -07:00
Marc Blank
f62f4afff1 Don't enable calendar sync if sync_events is disabled
* When SyncManager starts up, it reconciles the AccountManager sync settings
  with its own
* This works for Contacts, but Calendar has a second setting that needs to be
  checked - the sync_events column in the Calendar table (in CalendarProvider2)
* Before turning on Calendar sync, we now check this second setting; if
  sync_events is 0, we won't re-enable Calendar sync

Bug: 2619755
Change-Id: Iea6c99dce228d2c111a529a6c9b865ed1577b19e
2010-04-26 13:25:48 -07:00
Marc Blank
6b594cc97b am a238577c: am d718abd3: am b62cbc7e: Increase service call timeout to 45 seconds 2010-04-26 11:20:02 -07:00
Marc Blank
3c39402e4a am f714fcc9: am cebb801a: am da71abeb: Improve sync thread alerting mechanism 2010-04-26 11:19:59 -07:00
Marc Blank
abd581582c am 7d1f082c: am 17733f22: am 0f686768: Merge "Fix upsync of DAILY rrule with UNTIL" into froyo 2010-04-26 11:19:55 -07:00
Marc Blank
90e69be84a am c5fb4298: am aaa9c6a4: am d8d3719f: Tweak NAT timeout behavior 2010-04-26 11:19:53 -07:00
Marc Blank
a238577cb7 am d718abd3: am b62cbc7e: Increase service call timeout to 45 seconds
Merge commit 'd718abd38c12a902b85ba6341c4eda1c778d68b7' into kraken

* commit 'd718abd38c12a902b85ba6341c4eda1c778d68b7':
  Increase service call timeout to 45 seconds
2010-04-26 11:10:23 -07:00
Marc Blank
f714fcc952 am cebb801a: am da71abeb: Improve sync thread alerting mechanism
Merge commit 'cebb801ace0f2622430df88758485e6509f5fbf6' into kraken

* commit 'cebb801ace0f2622430df88758485e6509f5fbf6':
  Improve sync thread alerting mechanism
2010-04-26 11:10:21 -07:00
Marc Blank
7d1f082c5a am 17733f22: am 0f686768: Merge "Fix upsync of DAILY rrule with UNTIL" into froyo
Merge commit '17733f228ec131900acd7e5ff883bb0150025c42' into kraken

* commit '17733f228ec131900acd7e5ff883bb0150025c42':
  Fix upsync of DAILY rrule with UNTIL
2010-04-26 11:10:19 -07:00
Marc Blank
c5fb42984e am aaa9c6a4: am d8d3719f: Tweak NAT timeout behavior
Merge commit 'aaa9c6a4d18c07bd36cb259bc6031b360586baba' into kraken

* commit 'aaa9c6a4d18c07bd36cb259bc6031b360586baba':
  Tweak NAT timeout behavior
2010-04-26 11:10:16 -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
9d0fa303c8 am 5b25478b: am b11ea045: am 7cb5e144: Merge "Add checks for null in SyncManager" into froyo 2010-04-26 10:11:43 -07:00
Marc Blank
b62cbc7e7b Increase service call timeout to 45 seconds
Bug: 2627273
Change-Id: I971aa271cfc03e669e72f7871856cb9cfc10aa14
2010-04-26 08:14:01 -07:00
Marc Blank
da71abeb8f Improve sync thread alerting mechanism
* When a sync thread triggers an alarm by failing to return from
  an HttpPost beyond the socket timeout, we call abort() on the
  HttpPost to force it to stop
* It appears that there are cases in which this is insufficient,
  and the thread remains hung in a blocked state
* The result of this failure is to prevent the syncing mailbox from
  ever syncing again, and is typically seen by a failure to receive
  new mail (as reported in the referenced bug)
* In this CL, we add code to wait for 10 seconds after calling the
  abort() method.  If the HttpPost is still hung, we interrupt() the
  thread, and have SyncManager release the Mailbox, so that another
  thread can be started.

Bug: 2615293
Change-Id: I6a48195fc68bb950126006326a5b30448d3bbb63
2010-04-26 07:06:56 -07:00
Marc Blank
0f68676828 Merge "Fix upsync of DAILY rrule with UNTIL" into froyo 2010-04-25 20:27:54 -07:00
Marc Blank
47d124e4a1 Fix upsync of DAILY rrule with UNTIL
* Make sure we send UNTIL with FREQ=DAILY as appropriate
* Also to help debug this in the future...
    Add logging capability to utilities via SyncManager
    Add public log methods so that CalendarUtilities can log properly
    Change Log.d's to SyncManager.log in CalendarUtilities

Bug: 2623787
Change-Id: I3d651f00a3f7522e25c8d6e389469770c733953f
2010-04-24 13:05:16 -07:00
Marc Blank
d8d3719f34 Tweak NAT timeout behavior
* Change "broken pipe" behavior to simply run through the ping loop
  again, rather than be treated as a NAT timeout

Bug: 2615293
Change-Id: I67c3200f148a8c2beda58f812c29af8a726a4b9c
2010-04-24 10:39:06 -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
5b25478b0c am b11ea045: am 7cb5e144: Merge "Add checks for null in SyncManager" into froyo
Merge commit 'b11ea045e994d80c49d0a80ca08582554a1c5823' into kraken

* commit 'b11ea045e994d80c49d0a80ca08582554a1c5823':
  Add checks for null in SyncManager
2010-04-23 17:24:37 -07:00
Marc Blank
2f1ce56fc8 Merge "Fix upload/download of attendee status" into froyo 2010-04-23 17:21:41 -07:00
Marc Blank
7cb5e144e7 Merge "Add checks for null in SyncManager" into froyo 2010-04-23 17:19:32 -07:00
Andrew Stadler
5f1fdc2111 am f6e5f6e3: am da0fb178: am 5ac8a35c: Merge "Fix uncommanded exit from MessageList with 2+ accounts" into froyo 2010-04-23 13:41:34 -07:00
Andrew Stadler
f6e5f6e395 am da0fb178: am 5ac8a35c: Merge "Fix uncommanded exit from MessageList with 2+ accounts" into froyo
Merge commit 'da0fb1784c7675841cd64cb7c19020491667872f' into kraken

* commit 'da0fb1784c7675841cd64cb7c19020491667872f':
  Fix uncommanded exit from MessageList with 2+ accounts
2010-04-23 13:36:09 -07:00
Andrew Stadler
5ac8a35c42 Merge "Fix uncommanded exit from MessageList with 2+ accounts" into froyo 2010-04-23 13:30:48 -07:00
Marc Blank
e06a6dae37 am 169e3378: am 819de68b: am de3ae172: Merge "Add additional test for likely NAT timeout" into froyo 2010-04-23 12:56:17 -07:00
Marc Blank
169e33789b am 819de68b: am de3ae172: Merge "Add additional test for likely NAT timeout" into froyo
Merge commit '819de68b01ec9f8d44e4fa1e16bf4900abf90b16' into kraken

* commit '819de68b01ec9f8d44e4fa1e16bf4900abf90b16':
  Add additional test for likely NAT timeout
2010-04-23 12:49:23 -07:00
Marc Blank
de3ae17246 Merge "Add additional test for likely NAT timeout" into froyo 2010-04-23 12:42:30 -07:00
Andrew Stadler
88fb7f7cd0 Fix uncommanded exit from MessageList with 2+ accounts
* When you have 2 or more accounts configured, MessageList gets confused.
* If you are viewing a mailbox from account A, and account B does a
  background sync, MessageList gets confused by the reports coming back
  from the Controller.  It gives up and returns to the Accounts list.
* This change adds a check for the current account and ignores the
  MessageList updates if we weren't actually waiting for them.
* To test the positive case for this code (make sure we didn't break it),
  verify that the inbox on an IMAP account is displayed properly
  immediately after you add it.

Bug: 2619513
Change-Id: Ib31254b4099ba6b7922b06d42e2b7928551e4fb2
2010-04-23 12:17:43 -07:00
Marc Blank
bc27894815 Add additional test for likely NAT timeout
* This prevents unnecessary delays in receiving push mail
* At present, there is a likely 5 minute delay on receiving new pushed
  mail on the network displaying the behavior we're testing for

Bug: 2615293
Change-Id: Ic42e576fa683790f96434fcbad5ee873d0730f6d
2010-04-23 10:53:21 -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
Marc Blank
f44b9440d8 Add checks for null in SyncManager
Bug: 2619723
Change-Id: Iea3c3258274bdf86784e232922290841ad0d9d36
2010-04-22 17:43:30 -07:00
Makoto Onuki
92db71e440 Merge "Send local IP address with EHLO instead of "localhost"." 2010-04-22 14:23:46 -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
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
Andrew Stadler
d729ff891a am 151b9aa8: am 5d5d7854: Harden UpgradeAccounts against runtime errors (e.g. NPE)
Merge commit '151b9aa8dff6350c9e247579599bf70e1c55eea1' into kraken

* commit '151b9aa8dff6350c9e247579599bf70e1c55eea1':
  Harden UpgradeAccounts against runtime errors (e.g. NPE)
2010-04-21 18:19:27 -07:00
Andrew Stadler
5d5d7854c2 Harden UpgradeAccounts against runtime errors (e.g. NPE)
* Harden each of the major upgrade steps so any errors (e.g. NPE) are
  caught and that account goes into error state.
* Make sure that any account in error state is abandoned properly - all
  steps skipped except the final delete/cleanup.
* Bugfix: The variable that indicates that an account has gone into an
  error state (upgrade failed) state was being set in the UI thread and
  tested in the worker thread, so it was not properly stopping the
  upgrade of any given account.  Split that variable into two, one for the
  UI thread (set/read by the handler) and one for the worker thread.
* Bugfix: Report errors against the correct account, when 2+ accounts are
  being upgraded.

Bug: 2608483
Change-Id: I571078ae7123b601b53096104c4c5f4ef20da031
2010-04-21 16:27:09 -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
21c04fe31c Merge "Further harden getListOrNull" into froyo 2010-04-21 08:10:14 -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
7fef3f620d am 9c85a39b: am bb11c911: Fix NPE sending mail on servers without Outbox folders
Merge commit '9c85a39b82d0691f3c057dc00dbab87a2b68452e' into kraken

* commit '9c85a39b82d0691f3c057dc00dbab87a2b68452e':
  Fix NPE sending mail on servers without Outbox folders
2010-04-20 11:56:37 -07:00
Marc Blank
bb11c91175 Fix NPE sending mail on servers without Outbox folders
* stopPing (in SyncManager) assumes that every mailbox has a serverId
  but this is not the case on some servers, in which case we hit an
  NPE during a check for the account mailbox
* Check for a null serverId when testing for the account mailbox

Bug: 2606385
Change-Id: Idfa8abd8ef9e2c0a2ac01d0b168a21c934f6fdf3
2010-04-19 21:19:49 -07:00
Marc Blank
36d6817cb5 am 51a54f84: am 075d3494: Add admin check before trying a remote wipe
Merge commit '51a54f84f158cd9c18960170197f74a56b54fcd1' into kraken

* commit '51a54f84f158cd9c18960170197f74a56b54fcd1':
  Add admin check before trying a remote wipe
2010-04-19 11:43:21 -07:00
Marc Blank
075d34947f Add admin check before trying a remote wipe
* The code assumed that if we asked for a remote wipe, that it would
  be executed.  This isn't the case, however, if we're not a device
  admin at that time
* Test for Email app as device administrator before trying remote wipe

Bug: 2603931
Change-Id: I09dcff00e77bcf1e40c742c9dee923e6e07eecae
2010-04-18 23:08:28 -07:00
Marc Blank
6c1971f825 am 5e80b90e: am a90bb03c: Merge "Use METHOD_ALERT instead of METHOD_DEFAULT for reminders" into froyo
Merge commit '5e80b90e399b70c6dd93ddd7f5b66279277cf861' into kraken

* commit '5e80b90e399b70c6dd93ddd7f5b66279277cf861':
  Use METHOD_ALERT instead of METHOD_DEFAULT for reminders
2010-04-17 15:00:56 -07:00
Marc Blank
a90bb03c25 Merge "Use METHOD_ALERT instead of METHOD_DEFAULT for reminders" into froyo 2010-04-17 14:54:55 -07:00
Marc Blank
f749f77a81 am 6d09bd24: am 17e8ba7e: Merge "Speed up provision notification after security failure" into froyo
Merge commit '6d09bd247b0b5bf48a88bafc2ef28e25d0148bb7' into kraken

* commit '6d09bd247b0b5bf48a88bafc2ef28e25d0148bb7':
  Speed up provision notification after security failure
2010-04-16 18:23:33 -07:00
Marc Blank
17e8ba7eda Merge "Speed up provision notification after security failure" into froyo 2010-04-16 18:16:17 -07:00
Marc Blank
849ba0285c Use METHOD_ALERT instead of METHOD_DEFAULT for reminders
* Exchange has been using METHOD_DEFAULT for reminders, but it turns out
  that this doesn't work.
* Changed to use METHOD_ALERT

Bug: 2604156
Change-Id: Ia76bb2fc150202de9c49af9ab8caf86c9bda775f
2010-04-16 17:48:14 -07:00
Marc Blank
64bd62f46f am 401ae927: am a8f7b3e1: Store all day events w/ UTC timezone
Merge commit '401ae927e62a237f76c7dd1dde83f4ff8f27be91' into kraken

* commit '401ae927e62a237f76c7dd1dde83f4ff8f27be91':
  Store all day events w/ UTC timezone
2010-04-16 16:37:09 -07:00
Marc Blank
a8f7b3e16e Store all day events w/ UTC timezone
* All day events are supposed to be stored w/ UTC as the time zone
* We already zero out hour, minute, and day
* Use DTEND for non-recurring and DURATION for recurring all day events

Bug: 2440161
Change-Id: I31f2e5a355b721c06b4022b57ccc8a29b288a5d9
2010-04-16 15:11:43 -07:00
Marc Blank
23a88a8044 Speed up provision notification after security failure
Bug: 2591899
Change-Id: I038e0b96f03c7dd24e11ee36f3c9464c84fb2930
2010-04-16 14:36:55 -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
Andrew Stadler
901c23032b am a126a168: am ce592f32: Merge "Remove incorrect error reporting in MessageList" into froyo
Merge commit 'a126a168b6d70143e6cc94531f20ff889b15357b' into kraken

* commit 'a126a168b6d70143e6cc94531f20ff889b15357b':
  Remove incorrect error reporting in MessageList
2010-04-15 15:14:20 -07:00
Andrew Stadler
ce592f32f9 Merge "Remove incorrect error reporting in MessageList" into froyo 2010-04-15 15:08:12 -07:00
Andrew Stadler
54607e872d Remove incorrect error reporting in MessageList
* Previously I added a call to updateBanner() during the sequence where
    we update the mailboxlist (searching for the requested mailbox to
    display.)  This was an attempt to provide some error information
    for certain corner case security configuration problems.
* This was misfiring during legitimate connections (specifically, initial
    sync of valid EAS accounts) and causing a Connection Error message
    when none was intended.
* Rather than continue hacking, I'm simply removing the error banner
    from updateMailboxList.
* This is essentially a direct rollback of change
    c98b64c801, although I've added
    a bit more commentary than there was originally.
* The long-term solution, rather than continue band-aiding this, is to
    move most of this logic into a service independent of the UI, and
    provide more organized error reporting.

Bug: 2585159
Bug: 2599377
Change-Id: I99b7b1c8a7cfaa3fd3ff9b578d5721f05133d88a
2010-04-15 14:53:56 -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
Andrew Stadler
fa6d2b7b61 am 1bf66bb8: am 186aa619: Cleanup probable causes of close cursor access
Merge commit '1bf66bb8fcb4fcb74706d8e0917b7ac9f62d6710' into kraken

* commit '1bf66bb8fcb4fcb74706d8e0917b7ac9f62d6710':
  Cleanup probable causes of close cursor access
2010-04-15 00:22:49 -07:00
Andrew Stadler
186aa619dc Cleanup probable causes of close cursor access
* Monkey is hitting this fairly often
* Multiple fixes that are all good
  * We were launching LoadAccountsTask twice
  * Don't use a managed cursor for the inner accounts cursor - always
      close it manually by calling changeCursor(null) and letting the
      MergeCursor handle its sub-cursors.
  * Add isCancelled() check
  * When replacing adapter, be sure to close cursor

Bug: 2524465
Change-Id: I2309e033d65430810f2856285c1fa9bf2f8fb5e3
2010-04-14 23:51:35 -07:00
Andrew Stadler
0b589c403a am a55d27ba: am 3b3b5b0f: Run the account reconciler every time we start SyncManager
Merge commit 'a55d27bae112429348090be7fa262d7acc1b69e8' into kraken

* commit 'a55d27bae112429348090be7fa262d7acc1b69e8':
  Run the account reconciler every time we start SyncManager
2010-04-14 22:53:17 -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
Andrew Stadler
3b3b5b0f2b Run the account reconciler every time we start SyncManager
* This takes care of *some* of the race conditions where the
  account DB is blown away but the Email app is not running, so we
  don't get any notification of a change;  We have to try and
  sort this out early.
* SyncManager is started by Welcome, so this catches many cases of
  entering the email app.

Bug: 2567986
Change-Id: I76bea5b636802ba5c1677d8b1825fb3c61f7b2d9
2010-04-14 22:18:14 -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
Andrew Stadler
16fa3af652 am bd9f4ab3: am 79ef52cf: Improve handling of UI reset cases
Merge commit 'bd9f4ab329b4d01493c84b3d93d678c9d5a594fe' into kraken

* commit 'bd9f4ab329b4d01493c84b3d93d678c9d5a594fe':
  Improve handling of UI reset cases
2010-04-14 20:36:26 -07:00
Andrew Stadler
79ef52cfb3 Improve handling of UI reset cases
* When account disappears (e.g. delete from Accounts & Sync) the Welcome
   activity should launch with FLAG_ACTIVITY_CLEAR_TOP to remove any
   stacked activities as well.
* When account disappears entering AccountSetupNames, don't fall out
   of Eas Flow Mode.
* Followup to 5e354cd1db

Bug: 2563998
Change-Id: Ifbe086e26205bb28c2514f84cb28e839888b1eb0
2010-04-14 19:16:46 -07:00
Andrew Stadler
8249155e42 am 1ec609e9: am 694fe3b0: Merge "Safer error handling in AccountNames" into froyo
Merge commit '1ec609e99e00957788f4cb5d1965b9d4659f46ff' into kraken

* commit '1ec609e99e00957788f4cb5d1965b9d4659f46ff':
  Safer error handling in AccountNames
2010-04-14 17:50:25 -07:00
Andrew Stadler
694fe3b0c7 Merge "Safer error handling in AccountNames" into froyo 2010-04-14 17:42:55 -07:00
Andrew Stadler
fa669234be Safer error handling in AccountNames
The error handling for (mAccount == null) would crash.  Use a simpler
path here and just abandon the setup process.

The root cause of this (the account being null) is probably solved
by 3ae84b247d, but still a good idea to
clean this up.

Bug: 2558344
Change-Id: I3167234f99e9d39844f2b56a4d94f25465c7c269
2010-04-14 17:41:28 -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
Marc Blank
dd18cfa62a am 82e43ff2: am d8a4e4d2: Merge "Don\'t allow Exchange logger to recurse on failure" into froyo
Merge commit '82e43ff284eac3767f38e81bf15188021581a8e1' into kraken

* commit '82e43ff284eac3767f38e81bf15188021581a8e1':
  Don't allow Exchange logger to recurse on failure
2010-04-14 16:30:25 -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
Marc Blank
d8a4e4d25d Merge "Don't allow Exchange logger to recurse on failure" into froyo 2010-04-14 14:29:21 -07:00
Andrew Stadler
f14da10df8 am dc283b1b: am 5e354cd1: Exit most activities when accounts are deleted
Merge commit 'dc283b1b399da1543d57b8eae8ffcbc72f1deca0' into kraken

* commit 'dc283b1b399da1543d57b8eae8ffcbc72f1deca0':
  Exit most activities when accounts are deleted
2010-04-14 12:10:17 -07:00
Andrew Stadler
e2be72d390 am f9890942: am 383b7dd2: Merge "Final cleanup for account provisioning failures" into froyo
Merge commit 'f9890942bc4a61d14d65f38a16a8bb53bc979880' into kraken

* commit 'f9890942bc4a61d14d65f38a16a8bb53bc979880':
  Final cleanup for account provisioning failures
2010-04-14 12:10:15 -07:00
Marc Blank
da86f04c77 am 595ebceb: am 3fdaa329: Only set ORIGINAL_INSTANCE_TIME in exceptions
Merge commit '595ebcebfaf937434dd797f0423819dae147b0d6' into kraken

* commit '595ebcebfaf937434dd797f0423819dae147b0d6':
  Only set ORIGINAL_INSTANCE_TIME in exceptions
2010-04-14 12:10:12 -07:00
Andrew Stadler
5e354cd1db Exit most activities when accounts are deleted
This resolves cases like this:  You are in the inbox of an Exchange
account.  You click home, settings, accounts & sync, and you delete
the account.  Now re-enter the Email app.  You'll be left in a strangely
empty inbox, for an account that no longer exists.

* Set a flag any time the reconciler deletes an account
* Check that flag in onResume of any activity that depends on the account
    list and could be left in an "empty" state if account(s) are deleted.
* The Activities in which we check it are:
  * AccountFolderList
  * AccountSettings
  * MailboxList
  * MessageCompose
  * MessageList
  * MessageView
* Clear the flag any time we come in through Welcome, which will dispatch
    to other activities properly based on the number of accounts found.

Bug: 2563998
Change-Id: I00fc542581c2bed92d744a4c2e48a88f83737f11
2010-04-14 09:28:04 -07:00
Andrew Stadler
383b7dd29d Merge "Final cleanup for account provisioning failures" into froyo 2010-04-14 09:14:33 -07:00
Marc Blank
3fdaa32969 Only set ORIGINAL_INSTANCE_TIME in exceptions
* We were setting this for all events, but apparently CalendarProvider
  does not approve, and generates warnings
* Only set this for exceptions

Bug: 2550631
Change-Id: I8a7152eb0d4233432b1a5b5664da964d5433fbae
2010-04-14 08:41:38 -07:00
Marc Blank
3180ada550 am 1205deec: am 627006a8: Fix issue with deleted recurrence
Merge commit '1205deececdb99a23b45434568fac71fe3d50b8f' into kraken

* commit '1205deececdb99a23b45434568fac71fe3d50b8f':
  Fix issue with deleted recurrence
2010-04-14 08:39:13 -07:00
Andrew Stadler
c98b64c801 Final cleanup for account provisioning failures
* Now that we get proper callbacks on updateMailboxListCallback(),
    show the error banner if there's a problem
* Follow-on to 63186a5442

Bug: 2585159
Change-Id: I2b4f365d02b639bc3ceff9f8938333185d5ba693
2010-04-13 23:49:24 -07:00
Marc Blank
c89e1a8616 Don't allow Exchange logger to recurse on failure
Bug: 2594331
Change-Id: Ie5de4ac11259e5be30d4bf9812164823b9ca46ae
2010-04-13 20:34:13 -07:00
Marc Blank
e49a1e4b8b am 58f7daac: am c07cd159: Merge "Try a longer timeout for initial sync" into froyo
Merge commit '58f7daac64a105f0607bf0cf64dba9d2ad523b31' into kraken

* commit '58f7daac64a105f0607bf0cf64dba9d2ad523b31':
  Try a longer timeout for initial sync
2010-04-13 20:27:02 -07:00
Marc Blank
627006a8e3 Fix issue with deleted recurrence
* It turns out that this bug is due to a bad rebase/merge for a previous CL
  in which the changed code appears in its new form AND old form
* Fixes change SHA c3aa318200 (CL 48406)
* Don't say it.

Bug: 2587775
Change-Id: I3f70a97e498db30345452b942909448049680fdf
2010-04-13 19:50:51 -07:00
Marc Blank
c07cd159d4 Merge "Try a longer timeout for initial sync" into froyo 2010-04-13 19:35:19 -07:00
Marc Blank
3093b61668 Try a longer timeout for initial sync
* We are still seeing an issue with at least one user on initial
  calendar sync.
* Increase the read timeout a great deal for initial sync, as it
  can a very long time for the server to respond

Bug: 2569162
Change-Id: I495c38dc58d9a80c5a21e40b6fc5d165d10a3c1a
2010-04-13 18:27:58 -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
0f3d36010d Merge "Show device id on the exchange setting screen." into froyo 2010-04-13 17:28:02 -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
Marc Blank
b19fd96eb2 am 77f820dc: am 0005eba7: Fix cancellation messages for deleted attendee
Merge commit '77f820dc0d120cfe28fc8a26bdc69ade92d68e5a' into kraken

* commit '77f820dc0d120cfe28fc8a26bdc69ade92d68e5a':
  Fix cancellation messages for deleted attendee
2010-04-13 15:11:12 -07:00
Marc Blank
0005eba750 Fix cancellation messages for deleted attendee
* We weren't sending a proper ics file for the deleted attendee, and
  this caused Exchange to send a message to the wrong people (the
  referenced bug)
* Split out code that adds attendees to outgoing mail
* Changed the optional last argument to createMessageForX to be a specified
  attendee, i.e. the only addressee to be used for the message

Bug: 2548465
Change-Id: I629fcfaffe621408ea460d42c9c7c283929f7e79
2010-04-13 13:37:51 -07:00
Marc Blank
4621489f99 am 14495c05: am 63186a54: Send callback if reloadFolderList fails w/ uninit\'ed account
Merge commit '14495c05f69db71311002b077280782ed4154fc4' into kraken

* commit '14495c05f69db71311002b077280782ed4154fc4':
  Send callback if reloadFolderList fails w/ uninit'ed account
2010-04-13 11:54:26 -07:00
Andrew Stadler
f02238ed2e am cccfb846: am a87f8d8b: Changes to improve security policy setup
Merge commit 'cccfb8464ed8c2221b70b61151ecd77945299d06' into kraken

* commit 'cccfb8464ed8c2221b70b61151ecd77945299d06':
  Changes to improve security policy setup
2010-04-13 11:53:44 -07:00
Marc Blank
63186a5442 Send callback if reloadFolderList fails w/ uninit'ed account
Bug: 2585159
Change-Id: I12d9dd84090d10675e3d403124e28dbb6bede3d8
2010-04-13 10:44:00 -07:00
Andrew Stadler
a87f8d8bbc Changes to improve security policy setup
* SecurityPolicy:  Fix bug that prevents any notifications after the
    user hits "cancel all" from the notification pane.
* AccountSecurity: If the user cancels the device admin acceptance
    activity, repost the notification.
* MesageList:  Catch security hold condition when entering a mailbox, and
    launch security setup activity.

Bug: 2585159
Change-Id: I60d5d8c693cc5f00fe98a9cc69265802f5bee813
2010-04-13 02:15:37 -07:00
Marc Blank
cdc53cc4b2 am 1c9a47a4: am 0cd062eb: Merge "Fix acknowledgment of Exchange remote wipe" into froyo
Merge commit '1c9a47a424698ae899975afa1e0fe724545038f6' into kraken

* commit '1c9a47a424698ae899975afa1e0fe724545038f6':
  Fix acknowledgment of Exchange remote wipe
2010-04-12 18:03:48 -07:00
Marc Blank
0cd062ebd0 Merge "Fix acknowledgment of Exchange remote wipe" into froyo 2010-04-12 17:59:40 -07:00
Marc Blank
2f194cefbb Fix acknowledgment of Exchange remote wipe
* The XML acknowledging the wipe was malformed

Bug: 2589695
Change-Id: I24428a21ce5b08f32c372dcbb50b24d6e6c42645
2010-04-12 17:48:17 -07:00
Marc Blank
a29e5e60da am 9edec647: am de302226: Always check serverId AND calendarId in queries
Merge commit '9edec6478cbb3cd3720077acfaaa950160eea128' into kraken

* commit '9edec6478cbb3cd3720077acfaaa950160eea128':
  Always check serverId AND calendarId in queries
2010-04-12 16:53:33 -07:00
Marc Blank
de30222689 Always check serverId AND calendarId in queries
* With multiple accounts, serverId's are not guaranteed to be unique
  (indeed, they rarely are)
* There were two queries in CalendarSyncAdapter that checked only
  serverId and this has caused the referenced bug PLUS others that
  would have turned up later on
* This is a critical fix

Bug: 2589815
Change-Id: I49bc6cb5bb4708f4bf4ca60a891ff78f0b25e989
2010-04-12 16:37:50 -07:00
Marc Blank
61ea18298e am c388bf66: am b5253606: Merge "Sync description with exceptions" into froyo
Merge commit 'c388bf66775e7979a1fd372964ef9ee7908e3b0d' into kraken

* commit 'c388bf66775e7979a1fd372964ef9ee7908e3b0d':
  Sync description with exceptions
2010-04-12 15:57:53 -07:00
Marc Blank
b5253606ee Merge "Sync description with exceptions" into froyo 2010-04-12 15:53:50 -07:00
Marc Blank
d1c1b505f4 am 95c071bc: am 1e3f86df: Merge "Increase timeouts for Exchange sync; prevent early upload sync" into froyo
Merge commit '95c071bc6322a0ddd0491099b57ec8224d894f2f' into kraken

* commit '95c071bc6322a0ddd0491099b57ec8224d894f2f':
  Increase timeouts for Exchange sync; prevent early upload sync
2010-04-12 14:50:19 -07:00
Marc Blank
1e3f86dfd4 Merge "Increase timeouts for Exchange sync; prevent early upload sync" into froyo 2010-04-12 14:42:44 -07:00
Marc Blank
e3df9f95ea Sync description with exceptions
* We weren't sending up the event description with exceptions, so
  changes to description were being lost on upload
* Move the code uploading description so that it happens with
  exceptions as well as top-level events

Bug: 2590020
Change-Id: Ifab556bed68671f3ee8cab02b657adbd8ba9c50c
2010-04-12 14:22:11 -07:00
Marc Blank
2e22263777 Increase timeouts for Exchange sync; prevent early upload sync
* It's reported that 50% of third party users have issues syncing
  Calendar in Exchange
* In testing, it was determined that the server takes > 30 seconds
  to respond to a sync request initially, which is beyond our timeout
  limit
* Also, I found that the system SyncManager was trying to trigger an
  upload sync at the same time (i.e. before the sync session was
  established with the server)
* There are four changes here:
  1) Prevent upload syncs while the sync key is null or "0" ("0"
     is the initial state)
  2) Increase timeout for connection; at worst, this will
     cause a short extra delay in syncs with a bad connection, but this
     will be unnoticable to users
  3) Increase the read timeout for initial sync to twice that of
     regular syncs (the initial sync always seems to take longer)
  3) Reduce the lookback for calendar to two weeks (from one month);
     this is a better default anyway, and it probably reduces the server
     and client load a great deal
* Empirically, this solves the bug for a known completely repeatable
  case.

Bug: 2569162
Change-Id: I36b1c3e1e0b65f50d42e05f1830fed912191651f
2010-04-12 13:59:04 -07:00
Makoto Onuki
9c88c1ff3c am b0690302: am 1fe0aa19: Merge "Set CLEAR_WHEN_TASK_RESET flag when launching Calendar" into froyo
Merge commit 'b0690302bfc486ae76002179de11df0537090c30' into kraken

* commit 'b0690302bfc486ae76002179de11df0537090c30':
  Set CLEAR_WHEN_TASK_RESET flag when launching Calendar
2010-04-12 13:31:43 -07:00
Makoto Onuki
1fe0aa19bf Merge "Set CLEAR_WHEN_TASK_RESET flag when launching Calendar" into froyo 2010-04-12 13:27:15 -07:00
Makoto Onuki
f793cd93b9 Set CLEAR_WHEN_TASK_RESET flag when launching Calendar
and Contacts, so that when you relaunch Email from Home, you always see
the Email app, not Calendar/Contacts.

Note as stated in the corresponding bug, this CL itself won't fix the issue,
because CLEAR_WHEN_TASK_RESET will be lost when Contacts/Calendar apps handle
the intent.
There's a feature request against the framework (bug 2586404) which should fix
this losing flag problem.

Bug 2584792

Change-Id: I34ac3707b99926fc07529ea2229f2a6b3c4f93e4
2010-04-12 13:09:56 -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
9cc6f46b05 Merge "Try TOP even on POP servers that fail to report CAPA" into froyo 2010-04-12 11:27:25 -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
Marc Blank
8f76feabe2 am ab99976d: am c3aa3182: Send email to organizer if attendee deletes event/exception
Merge commit 'ab99976d18de5b2ac57d26808296ba5d966cea8d' into kraken

* commit 'ab99976d18de5b2ac57d26808296ba5d966cea8d':
  Send email to organizer if attendee deletes event/exception
2010-04-12 10:29:34 -07:00
Marc Blank
c3aa318200 Send email to organizer if attendee deletes event/exception
* There are two cases, event and exception and both are fixed in this CL

Bug: 2587775
Change-Id: Id325c4877a77074ca6edd4d7fbeb54971d4cf984
2010-04-12 10:12:46 -07:00
Marc Blank
f362d0357c am dc0f9ee7: am 536a3655: Merge "Always add changed exceptions to the upload list" into froyo
Merge commit 'dc0f9ee7ed36947414b37bb8d303f6ca0b768a8a' into kraken

* commit 'dc0f9ee7ed36947414b37bb8d303f6ca0b768a8a':
  Always add changed exceptions to the upload list
2010-04-12 10:04:19 -07:00
Marc Blank
536a36555b Merge "Always add changed exceptions to the upload list" into froyo 2010-04-12 09:57:57 -07:00
Marc Blank
c5c5bf7da7 Always add changed exceptions to the upload list
* We were adding deleted exceptions to the "deleted" list; this is bad,
  because the exception then gets deleted from the database after the
  sync.  The symptom is that the deleted exception reappears on the
  calendar.

Bug: 2587837
Change-Id: If497f82ba0b2b817d1cef6165ded23d19876528f
2010-04-11 15:33:39 -07:00
Marc Blank
4b07f049b3 am 605433f7: am 3b19278a: Only allow the account mailbox to attempt provisioning
Merge commit '605433f78dfacc6c634c6313832c9e1f475bcd99' into kraken

* commit '605433f78dfacc6c634c6313832c9e1f475bcd99':
  Only allow the account mailbox to attempt provisioning
2010-04-11 11:58:53 -07:00
Marc Blank
65ff1aeb60 am 6155bc2b: am 6a4eae5f: Fix upload of multi-day all day events
Merge commit '6155bc2b10316b5257692b2e4c540c24f5f49836' into kraken

* commit '6155bc2b10316b5257692b2e4c540c24f5f49836':
  Fix upload of multi-day all day events
2010-04-11 09:49:06 -07:00
Marc Blank
3b19278a24 Only allow the account mailbox to attempt provisioning
* We were allowing all sync services to attempt provisioning, but this
  could potentially lead to a race condition in which two different
  policy keys are created on the server (this is speculative)
* Change to allow only the account mailbox to attempt provisioning
* Log policy keys when verbose exchange logging is enabled
* We'll see if this solves the referenced bug

Bug: 2569162
Change-Id: I36c60098a4866882a8f9f4c288da54ea378d9aee
2010-04-11 09:45:49 -07:00
Marc Blank
6a4eae5f41 Fix upload of multi-day all day events
* We were assuming a single day for all-day events
* Use the actual end date
* Make sure we send date/time back to server in local TZ
* Also fixes #2500863

Bug: 2578776
Change-Id: I58767a574248935b9840ce93e634a24e54abe62f
2010-04-10 18:03:39 -07:00
Andrew Stadler
459199c93d am ddc5dd3f: am 80bd83fd: Upsync appropriate organizer name/email
Merge commit 'ddc5dd3fe0cde3e03a053e1d2b6a06822a4b30b7' into kraken

* commit 'ddc5dd3fe0cde3e03a053e1d2b6a06822a4b30b7':
  Upsync appropriate organizer name/email
2010-04-10 17:42:59 -07:00
Andrew Stadler
80bd83fd85 Upsync appropriate organizer name/email
* We need to send name & email for Exchange 2007
* For Exchange 2003, only name & email if the event is new

Bug: 2586661
Change-Id: Ia35c2c7a645a3d20b7031e9a43b8b5044a40f005
2010-04-10 17:35:34 -07:00
Andrew Stadler
e588bec8c9 am 13cc0023: am 06699c0d: Send meeting status with all upsynced changes
Merge commit '13cc00239e958647312b26deae7e62e3c4b27fdf' into kraken

* commit '13cc00239e958647312b26deae7e62e3c4b27fdf':
  Send meeting status with all upsynced changes
2010-04-10 17:31:18 -07:00
Andy Stadler
51c864d56c am 6445efb6: am 7d32ec27: Merge "Check for active device admin before each ping loop" into froyo
Merge commit '6445efb6497348f4fc0b2c7ca5c78634626dfa3f' into kraken

* commit '6445efb6497348f4fc0b2c7ca5c78634626dfa3f':
  Check for active device admin before each ping loop
2010-04-10 17:26:43 -07:00
Andy Stadler
4929b7fdaa am 66473998: am 69757c66: Merge "Synchronize getAccountById on sAccountList" into froyo
Merge commit '66473998027f5d93c652653f58dc4ea73e462a55' into kraken

* commit '66473998027f5d93c652653f58dc4ea73e462a55':
  Synchronize getAccountById on sAccountList
2010-04-10 17:26:41 -07:00
Marc Blank
114dfb269d am 7ac1a975: am 0cd9cbf0: Add organizer to Attendees before handling exceptions
Merge commit '7ac1a975c470f1a41e589e2a223467bf564fafc9' into kraken

* commit '7ac1a975c470f1a41e589e2a223467bf564fafc9':
  Add organizer to Attendees before handling exceptions
2010-04-10 17:26:38 -07:00
Andrew Stadler
06699c0d91 Send meeting status with all upsynced changes
* Meeting status differentiates between appointments and meetings,
  which is important in Outlook and OWA
* Fix older, completely incorrect code for upsyncing categories

Bug: 2586071
Change-Id: I277252ef2c31e5b8ec7ceda69c229f5fd100ecdb
2010-04-10 17:24:23 -07:00
Andy Stadler
7d32ec27ec Merge "Check for active device admin before each ping loop" into froyo 2010-04-10 17:18:35 -07:00
Andy Stadler
69757c6670 Merge "Synchronize getAccountById on sAccountList" into froyo 2010-04-10 17:17:56 -07:00
Marc Blank
2769c06b3d Check for active device admin before each ping loop
* Accounts that require security need to check that the Email app
  is still an active device admin from time to time
* Add a check for this before each run of the ping loop

Bug: 2583282
Change-Id: I1491821b7d0c1a341b1fe7ef1002c8b21aed12c2
2010-04-10 16:59:15 -07:00
Marc Blank
ff958286f1 am c89e3462: am 232b2dd9: Merge "Handle exception deletion properly" into froyo
Merge commit 'c89e34624492e43fb8d403e0321df648248d9fcc' into kraken

* commit 'c89e34624492e43fb8d403e0321df648248d9fcc':
  Handle exception deletion properly
2010-04-10 11:41:54 -07:00
Makoto Onuki
bd9444b0c2 am aab0d339: am 17a18d64: Merge "Fix NPE caused by I34451000" into froyo
Merge commit 'aab0d339da9605339695c85da2bc81cdc2d6bb08' into kraken

* commit 'aab0d339da9605339695c85da2bc81cdc2d6bb08':
  Fix NPE caused by I34451000
2010-04-10 11:41:52 -07:00
Marc Blank
3ab4a99679 Synchronize getAccountById on sAccountList
* This fixes a ConcurrentModificationException seen in monkey
  testing

Bug: 2586524
Change-Id: I3634678218827d5cffeef20c154b3826f9e5f36f
2010-04-10 10:30:41 -07:00
Marc Blank
0cd9cbf088 Add organizer to Attendees before handling exceptions
* Exceptions take a copy of Attendees when they are created, but
  we weren't adding the organizer to Attendees before exceptions
  were parsed
* Fix this by adding the organizer just before exception parsing
* If there aren't any exceptions, we add the organizer as before

Bug: 2585817
Change-Id: Ie894682977e38a55d975135c8fc2fd8f2d4b1365
2010-04-10 09:58:50 -07:00
Marc Blank
232b2dd9dc Merge "Handle exception deletion properly" into froyo 2010-04-09 16:08:22 -07:00
Marc Blank
1b2ed80da7 Handle exception deletion properly
* First, make sure we catch the cases of DELETED=1 and eventStatus=cancelled
* Second, only send email updates if the user is the organizer

Bug: 2583054
Change-Id: I886efa0f28931dc815bc31d4d6adb3d700f83c6b
2010-04-09 14:02:35 -07:00
Makoto Onuki
17a18d644a Merge "Fix NPE caused by I34451000" into froyo 2010-04-09 10:32:23 -07:00
Marc Blank
00ea1390ec am ce3aabde: am 66bbd95a: Merge "Fix GAL lookup for provisioned EAS accounts" into froyo
Merge commit 'ce3aabde3a590345e2e6f29d419455432966c643' into kraken

* commit 'ce3aabde3a590345e2e6f29d419455432966c643':
  Fix GAL lookup for provisioned EAS accounts
2010-04-08 22:41:41 -07:00