History log of /packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ecaa97741332e506afade647402896993ba64fba 25-Jan-2012 Marc Blank <mblank@google.com> If we're stopped, make sure watchdog alarm is also stopped

Bug: 5647625
Change-Id: I33e94107f2d6e4a38a5a221df72ed83596ca7c54
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
faf9ecc992c34de53969335f9fb403d2b17f3163 03-Oct-2011 Marc Blank <mblank@google.com> Enforce "auto-sync app data" setting for POP3/IMAP

* We were using the deprecated ConnectivityManager for this; we should now be
using the setting in ContentResolver
* Also, remove broadcast receiver code that is no longer relevant

Bug: 5405352
Change-Id: I985a95071aea92d235a2708925f775b817ba2328
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
32bed4bb8e23d7322ab338773d135845f392d3cf 24-Aug-2011 Ben Komalo <benkomalo@google.com> Fix unit tests.

- make attachment download service injectable
- fix assertions for account manager account checks
- update message compose ID's so they're consistent on tablet/phone

Bug: 5198343
Change-Id: I9976f5b9e5590dd61fb0a62937d3f9203fefe236
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
a9f1631fb83200a59e40e23ed366f810d08b6f52 11-Aug-2011 Marc Blank <mblank@google.com> Remove STOPSHIPs in Email/Emailcommon

Bug: 5142183
Change-Id: I1f6e31bfd2e7c32bdd7886e54b02fd4640a96e6f
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
433b0ed9fef3e424563df70f22164508c970e4d5 03-Aug-2011 Marc Blank <mblank@google.com> More whack-a-mole in AttachmentDownloadService

Bug: 5115008
Change-Id: I6e5236e08331cfd6a9a11868d97bf5caaf68f6fe
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
41c63a05eb04e5e1c6e12676768fd6e40dcbe913 28-Jul-2011 Marc Blank <mblank@google.com> Catch NPE in AttachmentDownloadService

%$!@#*&%

Bug: 5055519
Change-Id: Ie155c8d0f9931b51613f7d77e4545531bc148964
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
cb2f0a8bb9ff6728a111b1f790c12555ac7086fb 26-Jul-2011 Marc Blank <mblank@google.com> Ignore watchdog alarms for stopped service

Bug: 5055519
Change-Id: I35352364f3f2842932ad40e47d70646bb6d42349
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
90a48115517c49a954eaa1b79b72a23b4486107a 18-Jul-2011 Marc Blank <mblank@google.com> Fix NPE in onStartCommand

Bug: 5041436
Change-Id: Ib7462e5c8cb040b7526d9a655c5ab3f41cd159b8
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
b2a8c2ce4c617d59cb4876951cb952fc97e8382b 15-Jul-2011 Marc Blank <mblank@google.com> Start/stop AttachmentDownloadService as needed

Bug: 5033646
Change-Id: Ic0e75b28d0d8d5665c3f3ca864a9532fee05df8c
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
f5418f1f93b02e7fab9f15eb201800b65510998e 14-Jun-2011 Marc Blank <mblank@google.com> Move Account into its own top-level class

Change-Id: Ide7c991b7d4d418dbe17164421425bf898ba64ee
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
2f6cbb021cd97e2450c29b72a27236ba4ef20823 12-May-2011 Marc Blank <mblank@google.com> Fix a race condition in which an Attachment might be wrongly deleted

* This is a serious bug dating back to the first Honeycomb release
* It was possible that a newly created Message could not yet be
committed to the database when the AttachmentDownloadService
tries to download one of that message's attachments.
* ADS, when it sees that the message (apparently) doesn't
exist, deletes the Attachment (it appears to be orphaned)
* The effect is that the user never sees one of the attachments
in a message.
* This bug has been reported externally
* The fix is simply to check for the message's existence before
deciding to delete it (this check will always work properly)

Bug: 4409692

Change-Id: I106ed2fe88d2435ad7a462fced5cb307c2559fd6
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
973702b30e8c2fb2f622f4ef37b42b3bdbd3ef17 08-Mar-2011 Marc Blank <mblank@google.com> Only allow prefetch when on a WiFi network

Bug: 3515125

Change-Id: I0814ea20b1fc73807667e7f9531c1ea065bfa803
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
81273dfcee3b075451860f60ee15f2aa06ba81ec 01-Mar-2011 Marc Blank <mblank@google.com> Fix deadlock issue in AttachmentDownloadService

* When a connectivity wait was added to processQueue, I neglected
to consider that a lock was held during this time
* The fix is to move the check for connectivity out of processQueue

Bug: 3500702

Change-Id: I646cf899ff895d9838612e89b15b66f1084840b1
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
dc78a769fce18d259eccc602c4623fa74cdf5319 14-Feb-2011 Marc Blank <mblank@google.com> Email split, part dix

* The coup de grĂ¢ce for Exchange in Email
* Remove Exchange bits from AndroidManifest
* Update Android.mk to create static jar for emailcommon
* Delete all com.android.exchange files
* Delete all exchange-only strings
* Change loadAttachment service method to take only attachment id and
background flag
* Add code to AttachmentProvider.openFile() that opens an output file
for attachment writes
* Make sure deviceId is determined in Email app (not Exchange)

Bug: 3442973
Change-Id: I775600252fd121f474d51cb26fefbfcc50e387af
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
ffe6ef342a6d9ea958aaee11b57db54e52252dde 23-Feb-2011 Todd Kennedy <toddke@google.com> fix UnsupportedOperationException in tests

We're using the mock context to prevent modifying the real databases. However,
we need the real context to create intents. Use the real context in the few
places we must use it.

Change-Id: Icb8d289239218921c0b4b5c93ac7983830d90394
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
3a5c1fb274a9ce72d708d88509bf2607cb018ddd 13-Feb-2011 Marc Blank <mblank@google.com> Email split, part neuf: Setup, logging, attachment glue

* Make "Exchange" option in account setup depend upon availability of the
Exchange EmailService
* Make presence of Exchange logging depend upon availability of the
Exchange EmailService
* Make AttachmentDownloadService use service rather than ExchangeService
class
* Move SSLUtils to emailcommon/utility
* Move account manager type defs to emailcommon/AccountManagerTypes
* Update proguard.flags
* This is the penultimate CL for the Email package itself; the next CL
creates a clean, SDK-compatible Email application

Bug: 3442973
Change-Id: I9162cf5fa6b5a043ded0fdd1e25fd3ce5948ad8f
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
31d9acbf0623872f9d4a2b3210b5970854b654c7 12-Feb-2011 Marc Blank <mblank@google.com> Email split, part huit: Refactor constants, clean emailcommon

* There are three pieces to this CL (sorry):
1) Move and/or rename some constants into emailcommon
2) Move Utility to emailcommon, moving the few UI
related utilities back into Email (FolderProperties
and UiUtilities)
3) Remove all references to resources from emailcommon
* The three pieces relate in that, between them, they allow
the emailcommon static library to compile cleanly

Bug: 3442973

Change-Id: Ic5e3abaa2a1b36999e0b6653c6c2134ea1bd544f
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
a7bc0319a75184ad706bb35c049af107ac3688e6 10-Feb-2011 Marc Blank <mblank@google.com> Email split, part six: EmailContent

* Moved EmailContent to emailcommon

Change-Id: Ib3db1bfcfe74554c0e5afd3cfce6d72f26e9aeb9
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
8a574694606f0e5d781334d0d426fc379c51f3ed 09-Feb-2011 Marc Blank <mblank@google.com> Email split, part trois: AccountService

* Create AccountService.aidl and AccountServiceProxy in emailcommon
* Implement AccountService in email
* Use AccountServiceProxy in Exchange for account reconciliation,
notifications, etc.
* Move sync window constants into emailcommon
* Split attachment provider utilities and constants into emailcommon

Bug: 3442973
Change-Id: I89dce28b799b193243c07774dab65d830ae62775
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
0d4fc55861ed4393aa82f124f2865695ef564641 09-Feb-2011 Marc Blank <mblank@google.com> Email split, part one: EmailService

* Create emailcommon package
* Move EmailService classes to emailcommon package
* Change references to aidl's to emailcommon package
* Add getApiLevel() command to EmailService

Bug: 3442973

Change-Id: Ic7d2115363cdff6ebb86c46650b0a5b2109b1c72
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
9c44430690afdb4634d100e35f1b040705a34f3d 28-Jan-2011 Makoto Onuki <omakoto@google.com> Fix AttachmentDownloadService for remove-exchange script

Now the source at least compiles fine.

Change-Id: I329ad08f81fd6ab23f28dd30023fe3e781ccc4fc
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
ed9938cd9caf4937eadb3e35333e2fe2b157bde5 26-Jan-2011 Marc Blank <mblank@google.com> Protect against threading issues in AttachmentDownloadService

Bug: 3391148
Change-Id: I513b5678815db262ea5660661336432f1e203c9e
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
2d0e44f201f4f50e3e3416285805c8f28d1d6ed8 26-Jan-2011 Makoto Onuki <omakoto@google.com> Fix NPE in AttachmentDownloadService

Initialize mConnectivityManager before starting the thread.

Bug 3389701

Change-Id: If616721ad3b3bec81c5d6920f4a5d91b06f937fb
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
3ef8f54bae6a3e02919cfd7add7ed6bf7fdda901 25-Jan-2011 Marc Blank <mblank@google.com> Prefetch respects "background data" setting and waits for connectivity

Bug: 3384997
Bug: 3384994
Change-Id: Id8338650b69666f2996837324e27c2e98c9261fe
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
751e4b2d9509b63bcdd3c8780afa82b67b99d7d4 21-Jan-2011 Todd Kennedy <toddke@google.com> Prevent auto-download of attachments not in an inbox

When creating the list of attachments to be automatically downloaded in the
background, exclude any attachments that are not in an inbox. Also added unit
tests to ensure the query URIs behave as expected.

NOTE: This is a partial fix for general background attachment downloading issues

bug 3373982

Change-Id: I13ef56cd280c028fa966ab9e655acce28b0b9b91
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
819db01eadc3a95b02b2f820b483056b68c631f0 21-Jan-2011 Todd Kennedy <toddke@google.com> Limit attachment background download attempts

Do not retry downloading attachments infinitely. After some number of failures,
black list the attachment and move on. The black list is not persisted, so,
restarting the app will again try to fetch the attachments. In this way, any
transient network failures will not permanently affect the ability to download
attachments in the background

NOTE: This is a partial fix for general background attachment downloading issues

bug 3373982

Change-Id: I7f3ad9667ebebb95fbba95278b62bf40c5fce67c
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
f92dd2bf3ea445db9b9a0eb9a447b5cbdb1a6e05 21-Jan-2011 Todd Kennedy <toddke@google.com> Don't display toast for background download failures

When downloading attachments in the background, do not display any errors
on the display.

NOTE: This is a partial fix for general background attachment downloading issues

bug 3373982

Change-Id: I874ed902bde293303e10308f38b992b2bb15b6aa
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
2ac18339439631f2539a4cd35056b8ae65d5a24f 20-Jan-2011 Marc Blank <mblank@google.com> Delete attachment if there's no corresponding message

Bug: 3372440
Change-Id: I5c3653c5f27e0aa7bab52ca0d979e14bb6bafc34
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
475c20d3a883737853aa7301cc649736a36387c5 20-Jan-2011 Marc Blank <mblank@google.com> Implement checks before performing background attachment download

Bug: 3339007
Change-Id: I36a8359f3478c37b2ccd6a0cf0381569c592061a
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
36cc9c18edb7ee897d0d758788b6e338cb2ef126 14-Jan-2011 Makoto Onuki <omakoto@google.com> Fix NPE in AttachmentDownloadServiceTests.testDownloadSet

Bug 3353834

Change-Id: I5cf475ff174bffce80a435c80b1fd85c0be146e9
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
f6fe21b483ac4922ed9c0a2ec0cf7bed4760d82b 11-Jan-2011 Marc Blank <mblank@google.com> Merge "Check download request before trying to remove it from the queue" into honeycomb
782c21e953f3a157b2771cb15e097ed812e27ab1 11-Jan-2011 Marc Blank <mblank@google.com> Check download request before trying to remove it from the queue

Bug: 3312633
Change-Id: I443d9a8f786f93c7cd72b6b96ea838bf0d05f4d4
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
33799ad2d06236b95244337b5325aad5285f2560 10-Jan-2011 Marc Blank <mblank@google.com> Remove STOPSHIP from AttachmentDownloadService

Bug: 3335071
Change-Id: Ia6a8e2e7378510db234c4ec5164cb5ef39c529d7
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
7fbcefff7d5a745335d1ec562e783a59087cc0b1 28-Dec-2010 Marc Blank <mblank@google.com> Respect user's background download preference

Bug: 3312462
Change-Id: Ibd77b8de8782c4681ed122ac2f30374ca695e0ef
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
edb05ca5ee21a9f410416b427141be59be01f5d2 15-Dec-2010 Marc Blank <mblank@google.com> Harden AttachmentDownloadService; fix storage calculation

Bug: 3292720
Bug: 3286634

Change-Id: I378aac369ee8317c0c41b1f021a3731b81bcb380
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
75a873be8420e50f0aeb5a77716358ee0ca66b01 09-Dec-2010 Marc Blank <mblank@google.com> Implement prefetch of IMAP/EAS attachments

* Load attachments in the background for IMAP/EAS messages
* Download an attachment from account X if:
1) 25% of total storage free
2) Attachments for X use < 1/N of 25% of total storage, where N is
the number of AccountManager accounts
* Add accountKey to Attachment table for performance

Change-Id: I913aa710f34f48fcc4210ddf77393ab38323fe59
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
69fc25244ba1b30856426c77c2e4be3964eb50da 08-Dec-2010 Marc Blank <mblank@google.com> Move download cancel logic into helper

Bug: 3255707
Change-Id: I7f92bd1bb90a4430426123551075746ba9d4af85
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
3bbc690600d5fe697f02b739d4fe18f0f9f03314 29-Nov-2010 Marc Blank <mblank@google.com> Add watchdog to AttachmentDownloadService

* Detect attachment downloads that have stalled and restart them
* Catch a couple of cases in which we weren't sending callbacks

Bug: 3122242

Change-Id: Id2bfd3b26182004b301cf8665f4feb6e62b98b73
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
fdc41d4ffc29d29c9c6d8e0b81db98aaf7afa92e 23-Oct-2010 Marc Blank <mblank@google.com> Delay appearance of "stop" button when loading attachments

Bug: 3082804
Change-Id: Ib8b0fcec36a7303b2094bd0e49645d11aa2ff2db
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
b961c78ff4bd250d4a25497158162cb230a55057 29-Oct-2010 Marc Blank <mblank@google.com> Harden AttachmentDownloadService

* It's possible that endDownload will be called for a request
that has been dequeued.
* Harden endDownload against this eventuality, so that we clean
up properly without throwing exceptions

Bug: 3142618
Change-Id: If61136ed1ea972248fc5f9388beaaf84754f9931
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
eed42e83ab1808a523e614cb6096e169d8122b95 26-Oct-2010 Marc Blank <mblank@google.com> Cleanup for dump() in AttachmentDownloadService

Change-Id: Id875d3278953ecb3a98ab8b1d290f3883e974c4f
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
d3e4f3ca7e43fb7ebaa140f93a44a1fb96a0577e 18-Oct-2010 Marc Blank <mblank@google.com> Use notifications for login failures

* For now, clicking on the notification takes the user to the
Welcome activity, as we don't have final flows for the new
account setup UI
* Need comment on strings; the problem is that notification
text must be rather short if we're to use the standard
notification display. It looks like newer UI will allow
3 lines instead of 2, however.
* Tested w/ IMAP, POP3, EAS, and SMTP

Bug: 2322253
Change-Id: I7ed6fa5599179870cbcdb14af062e956eff37ec5
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
a162668f2350f681258fb0949a7fa228f2021ed8 23-Oct-2010 Marc Blank <mblank@google.com> Add dump of AttachmentDownloadService

* Will be helpful for debugging our new background service

Change-Id: Ia865c7c6cb418bd1a1f3d593421b98664c041e07
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
899c5b866192a4c4a12413446d10e5d98dbf94fa 27-Sep-2010 Makoto Onuki <omakoto@google.com> Switch to tablet style notification

- Now we show separate notification for each account
- New notification has sender photo, sender name, and subject
of the latest email
- Added the NotificationController class, which is intended to manage
all notifications besides "new message" eventually.

The framework doesn't seem to be 100% ready, and it's not clear how to
add the 3rd line in the expanded notification at this point. Need to
revisit it later to verify UI details.

Change-Id: I40193ee372cb6b2b7245c1588890f238b2469699
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
64b64cca01c1a827c1b3824f099fd638cfb15826 27-Aug-2010 Marc Blank <mblank@google.com> Rename SyncManager to ExchangeService

* Updated comments and checked for 100-columns

Change-Id: I4ab5aaa9425714f8e035e1952db3fec63d498ae1
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
45f530ba5553dcbe3e548930945c40e13736deb3 24-Aug-2010 Makoto Onuki <omakoto@google.com> Integrate Controller w/ AttachmentDownloadService

* Add ControllerService to Controller and call this from
AttachmentDownloadService to handle attachment loading

(It's a redo of I3a6c2a40. Submitting for mlbank, who had a trouble
with repo.)

Change-Id: I7c90761ec4e213d6dc331fc894c7b77e84ad43a6
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
f19f9cf4d3e5229715da77fe05a1a2bbd8da3f41 20-Aug-2010 Marc Blank <mblank@google.com> Simplify AttachmentDownloadService; add unit tests

* Changed our queue from a TreeMap to a TreeSet that uses an easily
testable comparator
* Remove the ugly bit twiddling priority computation
* Test DownloadSet (the logic behind queue ordering, addition,
removal, query, etc.)

Change-Id: Ia8427900b8f39a243a5407349775802d0a4fad4f
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
7894ee82b3a9f22d460a0c6f79e87be27686a649 18-Aug-2010 Marc Blank <mblank@google.com> New attachment download support for Controller (IMAP/POP3)

* Supports download via AttachmentDownloadService

Change-Id: I66143a79b99dcdbd307524ba0b81227f09a00e4a
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java
09fd4d0a181db511a07950f52ad56cc6e686356b 10-Aug-2010 Marc Blank <mblank@google.com> New asynchronous attachment loading code

* Create AttachmentDownloadService to manage all attachment downloads
1) User requested
2) Required for email forwarding
3) Opportunistic downloads to enhance offline use
* New attachment related UI (pending UX approval, of course)
1) MessageView (attachment actions, progress bar, etc.)
2) MessageCompose (attachments for forwarded messages)
3) Associated toasts, notifications, etc.

TODO:
* Unit tests
* Cache Management (separate CL)

Change-Id: I7864a5fb1c3f4f2be68d98341a971edc6cbacfe1
/packages/apps/Email/src/com/android/email/service/AttachmentDownloadService.java