Commit Graph

2511 Commits

Author SHA1 Message Date
Marc Blank
8ed23be08f am f7369ad5: Merge "Shutdown all connections when sync service is hung" into froyo
Merge commit 'f7369ad51f0eb2c231715975de13e4af37c58eb4' into froyo-plus-aosp

* commit 'f7369ad51f0eb2c231715975de13e4af37c58eb4':
  Shutdown all connections when sync service is hung
2010-04-28 09:32:21 -07:00
Andy Stadler
78d3c6022c am b915c3c0: Merge "Skip security check when account id is unknown." into froyo
Merge commit 'b915c3c018c8c4ba063514c3bd9ce05d3f08aa93' into froyo-plus-aosp

* commit 'b915c3c018c8c4ba063514c3bd9ce05d3f08aa93':
  Skip security check when account id is unknown.
2010-04-28 09:32:10 -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
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
Andy Stadler
b915c3c018 Merge "Skip security check when account id is unknown." into froyo 2010-04-27 22:21:00 -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
Kenny Root
5a705d632a am 4713110b: Merge "Import revised translations" into froyo
Merge commit '4713110b02195dbe5cba41d012a0a432f8460c55' into froyo-plus-aosp

* commit '4713110b02195dbe5cba41d012a0a432f8460c55':
  Import revised translations
2010-04-27 15:26:15 -07:00
Kenny Root
4713110b02 Merge "Import revised translations" into froyo 2010-04-27 15:23:51 -07:00
Kenny Root
178e51fcd8 Import revised translations
Change-Id: Ic6ff953da67dceea3631416546fa44e9b0949ae6
2010-04-27 13:35:56 -07:00
Marc Blank
29270f3823 am 422ceb0e: Merge "Don\'t enable calendar sync if sync_events is disabled" into froyo
Merge commit '422ceb0efd3d1605e6a9d8b25f408cbdd85bfc15' into froyo-plus-aosp

* commit '422ceb0efd3d1605e6a9d8b25f408cbdd85bfc15':
  Don't enable calendar sync if sync_events is disabled
2010-04-27 12:03:02 -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
d718abd38c am b62cbc7e: Increase service call timeout to 45 seconds
Merge commit 'b62cbc7e7b82739c307b5cb3175bbfff5f549295' into froyo-plus-aosp

* commit 'b62cbc7e7b82739c307b5cb3175bbfff5f549295':
  Increase service call timeout to 45 seconds
2010-04-26 10:08:21 -07:00
Marc Blank
cebb801ace am da71abeb: Improve sync thread alerting mechanism
Merge commit 'da71abeb8f0b0bce9de837d6614bcbc8ad7a39c6' into froyo-plus-aosp

* commit 'da71abeb8f0b0bce9de837d6614bcbc8ad7a39c6':
  Improve sync thread alerting mechanism
2010-04-26 10:08:12 -07:00
Marc Blank
17733f228e am 0f686768: Merge "Fix upsync of DAILY rrule with UNTIL" into froyo
Merge commit '0f68676828d1f66c7997a0457f1c6536e661658f' into froyo-plus-aosp

* commit '0f68676828d1f66c7997a0457f1c6536e661658f':
  Fix upsync of DAILY rrule with UNTIL
2010-04-26 10:08:10 -07:00
Marc Blank
aaa9c6a4d1 am d8d3719f: Tweak NAT timeout behavior
Merge commit 'd8d3719f34fa2dde9312d3156f7eccfe0fef0584' into froyo-plus-aosp

* commit 'd8d3719f34fa2dde9312d3156f7eccfe0fef0584':
  Tweak NAT timeout behavior
2010-04-26 10:08:00 -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
f1fa44bdc0 am 2f1ce56f: Merge "Fix upload/download of attendee status" into froyo
Merge commit '2f1ce56fc85e8dc7052dc16f58d00bf19b2a9bee' into froyo-plus-aosp

* commit '2f1ce56fc85e8dc7052dc16f58d00bf19b2a9bee':
  Fix upload/download of attendee status
2010-04-23 17:24:20 -07:00
Marc Blank
b11ea045e9 am 7cb5e144: Merge "Add checks for null in SyncManager" into froyo
Merge commit '7cb5e144e746b5310d8f9facc24ab992f1a2a67c' into froyo-plus-aosp

* commit '7cb5e144e746b5310d8f9facc24ab992f1a2a67c':
  Add checks for null in SyncManager
2010-04-23 17:21:46 -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
da0fb1784c am 5ac8a35c: Merge "Fix uncommanded exit from MessageList with 2+ accounts" into froyo
Merge commit '5ac8a35c4290d9e3ce22eb28341214189a40fc6c' into froyo-plus-aosp

* commit '5ac8a35c4290d9e3ce22eb28341214189a40fc6c':
  Fix uncommanded exit from MessageList with 2+ accounts
2010-04-23 13:34:23 -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
819de68b01 am de3ae172: Merge "Add additional test for likely NAT timeout" into froyo
Merge commit 'de3ae17246bc011eff61e18ee1013e146ec53a3d' into froyo-plus-aosp

* commit 'de3ae17246bc011eff61e18ee1013e146ec53a3d':
  Add additional test for likely NAT timeout
2010-04-23 12:45:55 -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
2ca8d7347d am 6cfa8001: Merge "Fix failing unit tests" into froyo
Merge commit '6cfa8001a8f352fa2a51925c7552f772796d9cd1' into froyo-plus-aosp

* commit '6cfa8001a8f352fa2a51925c7552f772796d9cd1':
  Fix failing unit tests
2010-04-22 09:53:58 -07:00
Makoto Onuki
6cfa8001a8 Merge "Fix failing unit tests" into froyo 2010-04-22 09:51:21 -07:00
Makoto Onuki
25d55ed266 Fix failing unit tests
Bug 2614782

Change-Id: I7ed7bf61a567429017f64d9049577ec076331bb2
2010-04-22 09:18:42 -07:00
Marc Blank
d764ce7e44 am 1880ad6a: Send correct busy status information in upsyncs to EAS
Merge commit '1880ad6a83120b89ed239858d27d3e63242160e6' into froyo-plus-aosp

* commit '1880ad6a83120b89ed239858d27d3e63242160e6':
  Send correct busy status information in upsyncs to EAS
2010-04-21 23:00:56 -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
151b9aa8df am 5d5d7854: Harden UpgradeAccounts against runtime errors (e.g. NPE)
Merge commit '5d5d7854c247487c3f8fa1f700c6e9d46aff497d' into froyo-plus-aosp

* commit '5d5d7854c247487c3f8fa1f700c6e9d46aff497d':
  Harden UpgradeAccounts against runtime errors (e.g. NPE)
2010-04-21 18:15:28 -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
a0c71419ce am 21c04fe3: Merge "Further harden getListOrNull" into froyo
Merge commit '21c04fe31c978fc68c473a5bef5c93b20363fe8e' into froyo-plus-aosp

* commit '21c04fe31c978fc68c473a5bef5c93b20363fe8e':
  Further harden getListOrNull
2010-04-21 08:15: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
9c85a39b82 am bb11c911: Fix NPE sending mail on servers without Outbox folders
Merge commit 'bb11c91175a4beee207324d67b913b91a41bbea7' into froyo-plus-aosp

* commit 'bb11c91175a4beee207324d67b913b91a41bbea7':
  Fix NPE sending mail on servers without Outbox folders
2010-04-20 11:53:07 -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
51a54f84f1 am 075d3494: Add admin check before trying a remote wipe
Merge commit '075d34947fe2ed402997828794bdd99b59bc79ac' into froyo-plus-aosp

* commit '075d34947fe2ed402997828794bdd99b59bc79ac':
  Add admin check before trying a remote wipe
2010-04-19 11:40:09 -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
5e80b90e39 am a90bb03c: Merge "Use METHOD_ALERT instead of METHOD_DEFAULT for reminders" into froyo
Merge commit 'a90bb03c259a9cf2e1ca15ef90b00759cd555987' into froyo-plus-aosp

* commit 'a90bb03c259a9cf2e1ca15ef90b00759cd555987':
  Use METHOD_ALERT instead of METHOD_DEFAULT for reminders
2010-04-17 14:58:43 -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
6d09bd247b am 17e8ba7e: Merge "Speed up provision notification after security failure" into froyo
Merge commit '17e8ba7eda1cabf72ac650408abd94f1145397e9' into froyo-plus-aosp

* commit '17e8ba7eda1cabf72ac650408abd94f1145397e9':
  Speed up provision notification after security failure
2010-04-16 18:19:30 -07:00