summaryrefslogtreecommitdiffstats
path: root/src/com/android/providers/downloads/DownloadReceiver.java
Commit message (Collapse)AuthorAgeFilesLines
* Update extras for in-progress download.Jeff Sharkey2012-11-271-1/+1
| | | | | | | | Follow move to EXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS extras, which was missing during refactoring. Bug: 7617373 Change-Id: I26203a2bc6fc0e211a1aa602c0de018332d76f60
* Rewrite of download notifications.Jeff Sharkey2012-11-091-80/+114
| | | | | | | | | | | | | | | | | | Switch to using new inbox-style notifications when collapsing multiple downloads. Correctly handles clustering, including cancellation of stale notifications. All notifications are now handled in a single class, making it easier to reason about correctness. Fixed bugs around handling of visibility flags. Move away from using "int" as internal keys, since they can overflow. Started work for time estimates, will finish in a future CL. Explicitly pass all relevant IDs to DownloadReceiver instead of doing a second racy query. Fix StrictMode warnings when querying in DownloadReceiver. Bug: 6777872, 5463678, 6663547, 6967346, 6634261, 5608365 Change-Id: I5eb47b73b90b6250acec2ce5bf8d7a274ed9d3a9
* Remove FLAG_ACTIVITY_NEW_TASK from the VIEW intent.Ruben Brunk2012-09-261-0/+1
| | | | | | | | | Bug: 7164238 Bug: 7237908 Got rid of FLAG_ACTIVITY_NEW_TASK for proper back behavior Change-Id: I50af9aeafb27d6079bda4f81f4a116b6bb600676
* Send ORIGINATING_URI and REFERRER to installer.Jeff Sharkey2012-08-271-17/+5
| | | | | | | | | When building PackageInstaller intents, include ORIGINATING_URI and REFERRER extras. Unify view intent building for both notifications and list UI. Bug: 6900672 Change-Id: I18435e0f8aa549880ec594f82b6a250232706135
* Move notification tests to LittleMock.Jeff Sharkey2012-07-241-1/+4
| | | | | | Directly mock NotificationManager instead of using SystemFacade. Change-Id: If932d26e23816e8674469c275a828701cce5fc2d
* Move away from deprecated NetworkInfo extra.Jeff Sharkey2012-01-301-2/+3
| | | | | | | | | Because the NetworkInfo included in CONNECTIVITY_ACTION broadcast extra does not reflect the state applicable to the calling UID, and the last sticky broadcast may have stale state, transition to calling ConnectivityManager.getActiveNetworkInfo() directly. Change-Id: Ie7a143e621e5a3a013ec6d8b8613709e7787dc0c
* Download provider change for DRM Forward Lock plugin:Gloria Wang2011-04-191-0/+1
| | | | | | | to convert .dm files to .fl files during downloading For bug 3188041 Change-Id: I882b851664432fba3e57dc25a6be827b48006e69
* bug:3435895 listen to media_mounted broadcast intentVasu Nori2011-02-081-0/+10
| | | | | | and retry downloads that failed due to the error "sdcard media not mounted" Change-Id: Id181b8167d331214f72679c85f18cc8b9b969e40
* in DM public API, sending notifications on clicks should include dataVasu Nori2010-11-011-1/+11
| | | | | | | | | | receiving application needs to know WHAT items the clicks occurred on - not just the fact that *something* was clicked on. this is duplicating the behavior as it exists today in the non-public API. depends on Change-Id: Ibe53ccd9934c73175459e42e3d417eee69ae6735 Change-Id: I924f85bd5faf443ac5648839b68390ec4de1f677
* remove usage of hidden public constants.Vasu Nori2010-10-201-0/+1
| | | | Change-Id: I2edf1bef5e741de8193cb293807e3ace42003b0c
* Manual merge: Moved DownloadManager to android.appSteve Howard2010-09-281-1/+1
| | | | Change-Id: Id1de44459ec1bf53e928cae826047467b355823d
* Fix notification bugs, cleanup DownloadService + DownloadReceiverSteve Howard2010-09-201-132/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change started out just fixing a few regressions related to notifications: * Browser downloads weren't picking up a title from the determined filename. This was due to my change to default the title field to "" instead of null. * Notification click/hide events weren't being handled properly. This was due to previous change to the URI structure of DownloadProvider. DownloadReceiver needed to be changed to perform queries through /all_downloads URIs, like all other parts of the download manager code. I did some general refactoring of the DownloadReceiver code while I was there. * The code in DownloadNotification wasn't picking up some updates to downloads properly. This was due to my change to make DownloadNotification use the DownloadInfo objects rather than querying the database directly, so that it could make use of info provided by the DownloadThread that didn't go into the DB. Fixing this didn't turn out to be all that complicated, but along the way to figuring this out I made some substantial refactoring in DownloadService which made it much cleaner anyway and eliminated a lot of duplication. That's something that had to happen eventually, so I'm leaving it all in. Change-Id: I847ccf80e3d928c84e36bc24791b33204104e1b2
* Stub out and test system notifications.Steve Howard2010-07-231-8/+3
| | | | | | | | | | | | | This change abstracts NotificationManager interactions behind SystemFacade and takes advantage of that to test notifications, to a limited degree. It also fixes a silly typo in AbstractDownloadManagerFunctionalTest, and it introduces an extra sleep between tests to avoid some flakiness. I'll look for a better solution to that problem after this change goes in. Change-Id: I3a0307f828955cd45b0e3581ad499da28cc0556e
* Public API support for broadcasts and connectivity control.Steve Howard2010-07-211-10/+24
| | | | | | | | | | | | | | | | * Three new DB fields, one indicating whether a download was initiated by the public API or not, two to hold connectivity control info. DB migration to add these fields and code in DownloadProvider.insert() to handle them. * Change broadcast intent code to match public API spec, for public API downloads only. (Legacy code can go away once existing clients are converted over to the new API.) * Introduce SystemFacade methods for sending broadcasts and checking package ownership; this facilitates new tests of broadcast code. * Change DownloadInfo.canUseNetwork() to obey new connectivity controls available in public API, but again, retain legacy behavior for downloads initiated directly through DownloadProvider * New test cases to cover the new behavior Also made a couple changes to reduce some test flakiness I was observing: * in tearDown(), wait for any running UpdateThread to complete * in PublicApiFunctionalTest.setUp(), if the test directory already exists, remove it rather than aborting DB changes for broadcast + roaming support Change-Id: I60f39fc133f678f3510880ea6eb9f639358914b4
* Introduce a seam to ConnectivityManager and TelephonyManagerSteve Howard2010-07-151-2/+8
| | | | | | | | | This change abstracts access to ConnectivityManager and TelephonyManager behind methods on SystemFacade, moving the code from Helpers into RealSystemFacade and adding fake implementations to FakeSystemFacade. This facilitates new connectivity tests. Change-Id: Id6c6b861e1d4ca45b3c1572bfb8ae0aa26af756b
* Use the private legacy APIJean-Baptiste Queru2010-01-141-18/+21
| | | | | | | | | | The public API is getting deeply reworked for forward compatibility, but since the Download Manager and the Browser need to continue using the old API, a separate copy is being kept on the side. Bug: 2245521 Change-Id: I85eff6ba9efc68600aa80e8dffa6720b0f2ed155
* Remove unnecessary loggingJean-Baptiste Queru2009-09-241-7/+0
| | | | | | | Also tweak some slightly inaccurate logging, and add a note about a potential bug. BUG=2055624
* Add a bit more logging to track down network state issues.Jean-Baptiste Queru2009-09-221-3/+15
| | | | BUG=2055624
* Add logging to track connectivity as seen from the Download Manager.Jean-Baptiste Queru2009-09-211-0/+10
| | | | | | | This is enabled by a separate build-time constant, so that it can be turned on for everyone without having to use a system property. BUG=2055624
* Use the new download manager APIs introduced in change 7400Jean-Baptiste Queru2009-01-211-10/+13
|
* Match the official code style guide.Jean-Baptiste Queru2009-01-201-4/+1
| | | | | | This fixes a number of style violations that weren't caught by automated tools and brings those files closer to compliance with the official style guide for this language.
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-19/+11
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+167