Merge commit '572c06f91be8c809b8978d985259564f88c6f212' into froyo-plus-aosp
* commit '572c06f91be8c809b8978d985259564f88c6f212':
DO NOT MERGE - Revert workaround for KeyguardLock problem
This reverts commit 3ee0cad5f5.
Because commit 284b62e1b8c3419bfd02c6fea5ba0a68146c06f8 fixes the underlying
conflict between DeviceAdmin policies and apps attempting to disable the
Keyguard Lock, this patch is no longer required.
Accounts with a server policy requiring a device PIN or Password will
now work properly.
Bug: 2737842
Change-Id: I533c27a01a8a331dc11a0cb84bcc78f48edf621c
Merge commit '3ee0cad5f5e21a24dbe43d21afaac1dd76a2059b' into froyo-plus-aosp
* commit '3ee0cad5f5e21a24dbe43d21afaac1dd76a2059b':
DO NOT MERGE Workaround for KeyguardLock problem
* The device policies that enforce the use of a device PIN or password
can be sidestepped by apps that implement KeyguardManager.KeyguardLock
* This renders the policies unuseable
* To prevent this, the email app now scans for any packages holding the
DISABLE_KEYGUARD permission. The existence of any non-system app
with this permission will put all security-enabled EAS accounts into
a security hold, and post a dialog describing the problem.
* The user must uninstall any such app(s) in order to sync their EAS data.
Bug: 2737842
Change-Id: I4c96d76b12d9242b5c755dd60d7578a825fae597
* Three format strings had multiple replacement tokens, but the ordering
information was missing.
* In five languages, the translations reverse the order, and the formatter
crashes (because of types mismatching).
* This patch adds in the ordering information where needed
Bug: 2719864
Change-Id: I084e9c9ddab54901a5142710e8ef986223902c17
Merge commit '8c742a4c65e1ff2618e1005803edb65a42994fb6' into froyo-plus-aosp
* commit '8c742a4c65e1ff2618e1005803edb65a42994fb6':
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
Merge commit 'b6a08f68d7c49835fffed0719e99c13b50fa525c' into froyo-plus-aosp
* commit 'b6a08f68d7c49835fffed0719e99c13b50fa525c':
Remember to store modified organizerEmail
Merge commit '7f448dcd470ac509a85368a84f5a55c346ae7e70' into froyo-plus-aosp
* commit '7f448dcd470ac509a85368a84f5a55c346ae7e70':
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
Merge commit '027a6ddfaa7228854cb3c4238434f87fc69078b6' into froyo-plus-aosp
* commit '027a6ddfaa7228854cb3c4238434f87fc69078b6':
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
Merge commit '6bd7a167249727f4b7d4d4cfe713be421f400e51' into froyo-plus-aosp
* commit '6bd7a167249727f4b7d4d4cfe713be421f400e51':
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
* 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
Merge commit 'e0ebcd8e6c04fc3d39844722bce74abe540bfe3c' into froyo-plus-aosp
* commit 'e0ebcd8e6c04fc3d39844722bce74abe540bfe3c':
Test for NPE in EasSyncService during alarm() call
Merge commit '3778b3ed7ee505c00fa7cd3b1af37cbe54de244a' into froyo-plus-aosp
* commit '3778b3ed7ee505c00fa7cd3b1af37cbe54de244a':
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
Merge commit '8100a2dc5510d0449921895e2af8472d3666fda3' into froyo-plus-aosp
* commit '8100a2dc5510d0449921895e2af8472d3666fda3':
Server sending unsupported policies will cause NPE
Merge commit 'd1e00e8aa69ccad3de61ed638b70bf5a9e5bd937' into froyo-plus-aosp
* commit 'd1e00e8aa69ccad3de61ed638b70bf5a9e5bd937':
Fix NPE resulting from attendees-only update from server
Merge commit 'c901810f84754c80aa3988b26f5ff620373f9a46' into froyo-plus-aosp
* commit 'c901810f84754c80aa3988b26f5ff620373f9a46':
Start sync ASAP when calendar is re-enabled
* 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
* 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
Merge commit '3558e5f2277fe953c612b42576afe1fb8fae99c8' into froyo-plus-aosp
* commit '3558e5f2277fe953c612b42576afe1fb8fae99c8':
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
Merge commit '8f255ddeee95f1f14aa77b2f51e3c69225fdaf6a' into froyo-plus-aosp
* commit '8f255ddeee95f1f14aa77b2f51e3c69225fdaf6a':
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