Merge commit 'a094cc259da268ad6f78f50afe5cbbf674418b86' into kraken
* commit 'a094cc259da268ad6f78f50afe5cbbf674418b86':
Collectly preserve the service start-id.
* 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
Merge commit '01cc30c9d8327c6172036c1e15455d305423c718' into kraken
* commit '01cc30c9d8327c6172036c1e15455d305423c718':
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
Merge commit 'c9f923959eb7987db4f12dc7e2a1103e600d9eeb' into kraken
* commit 'c9f923959eb7987db4f12dc7e2a1103e600d9eeb':
Prevent account reconcile from running when service is down
Merge commit '4a1565fd7ec426ba4615aedeb3f2ddcb03ecac22' into kraken
* commit '4a1565fd7ec426ba4615aedeb3f2ddcb03ecac22':
Move a bare string to a resource.
* 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
Merge commit '220d9107535360b842f1a8ff872b2d22296d98b3' into kraken
* commit '220d9107535360b842f1a8ff872b2d22296d98b3':
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
* 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
Merge commit '773dc43cc2caf7638c610ac85711eed89a06efa5' into kraken
* commit '773dc43cc2caf7638c610ac85711eed89a06efa5':
Allow more time for HttpPost watchdog timeout
Merge commit '8ed23be08f34ba11e5bf0acd98d1419df893a0bc' into kraken
* commit '8ed23be08f34ba11e5bf0acd98d1419df893a0bc':
Shutdown all connections when sync service is hung
Merge commit '78d3c6022ccf87566261faf694ff506a68ec6b6f' into kraken
* commit '78d3c6022ccf87566261faf694ff506a68ec6b6f':
Skip security check when account id is unknown.
* 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
* 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
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
* 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
Merge commit 'd718abd38c12a902b85ba6341c4eda1c778d68b7' into kraken
* commit 'd718abd38c12a902b85ba6341c4eda1c778d68b7':
Increase service call timeout to 45 seconds
Merge commit '17733f228ec131900acd7e5ff883bb0150025c42' into kraken
* commit '17733f228ec131900acd7e5ff883bb0150025c42':
Fix upsync of DAILY rrule with UNTIL
* 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
* 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
* 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
Merge commit 'f1fa44bdc064a6c01813c5380839b90bd0290d46' into kraken
* commit 'f1fa44bdc064a6c01813c5380839b90bd0290d46':
Fix upload/download of attendee status
Merge commit 'b11ea045e994d80c49d0a80ca08582554a1c5823' into kraken
* commit 'b11ea045e994d80c49d0a80ca08582554a1c5823':
Add checks for null in SyncManager