summaryrefslogtreecommitdiffstats
path: root/src/com/android/providers/downloads/DownloadNotifier.java
Commit message (Collapse)AuthorAgeFilesLines
* DownloadProvider: Still display as downloading after download failedkaiyiz2016-01-241-1/+32
| | | | | | | | | | | | | | | | | When the remaining space is less than 10% of the total space, download will fail, but it still display as downloading in status bar after failed in "Downloads" app. Check error status about downloads. If error exists, will update icon , content title and content text in notification. CRs-Fixed: 636489 Change-Id: I5554ef3d1505642c5cd847bd3d2e25a29772dc0d DownloadProvider: Use an alert icon for downloads that have an error status. Change-Id: If6d0f021cada1a09855009ab3276aa46bec74cfe
* DownloadProvider: add to support pause/resume download by manualqqzhou2016-01-241-5/+36
| | | | | | | | | | | | | | | This feature contains below points: 1. add to pause running download by manual. 2. add to resume manually paused download by manual. 3. add to show proper contents in notification and download-list for manually paused status. 4. add to support download breakpoint continuing when HTTP server doesn't contain etag in response header. Android baseline only supports this when etag is not null. 5. add to show proper contents in notification and download-list for status of waiting-for-network. Change-Id: I433cdee2de8b3add0248bbb0a9d02f8da4e5bb38
* Merge tag 'android-5.1.0_r1' into HEADstaging/cm-12.1Ricardo Cerqueira2015-03-101-2/+4
|\ | | | | | | Android 5.1.0 release 1
| * Fix internationalization of percentage formatting in DownloadProvider.Elliott Hughes2014-10-101-2/+4
| | | | | | | | | | Bug: 15476051 Change-Id: I085c074f1bb66631872712cab68bcaf6ee7ba7dc
* | Add Download Speeds in notificationLasse Brudeskar Vikås2014-12-271-6/+26
|/ | | | | | | | | | | | | | | | | | This commit adds the ability to show the current total download speed Screenshots: http://goo.gl/M3eRNR ps7 : remove download site, and make speed to bit/sec ps8 : make speed to byte/sec and cleanup ps9 : revert to B/sec ps10: fix some formatting issues ps13: rebased Conflicts: res/values/cm_strings.xml src/com/android/providers/downloads/DownloadNotifier.java Change-Id: I801dbe61c7ee59d0c1d14d5851ad6dc3a7678499
* Colored notificationsSelim Cinek2014-08-271-0/+2
| | | | | Bug: 17128331 Change-Id: Ie2529189e4d62c7dc385f9d36c70ac412fb4159c
* Completed downloads should clear when touched.Jeff Sharkey2013-04-281-0/+1
| | | | | Bug: 8744610 Change-Id: I135a3acbc819fd725f00ba57461e21db1fe24850
* Fix download notification click behaviour.Danny Baumann2013-04-051-5/+7
| | | | | | | | | PendingIntent.getBroadcast() doesn't update the intent extras if not explicitly given something to distinguish the intents. This caused the notification on-click to do nothing on everything but the first download. Change-Id: I29544ae5b04f8304cbbe720066a26ff90e422107
* New PendingIntents when extras change.Jeff Sharkey2013-03-261-2/+4
| | | | | | | Otherwise notifications end up launching with stale download IDs. Bug: 8417220 Change-Id: Ie72a2f4ac7b72213678ac6001af45709034492dd
* Reduce logging, dump stacks before wtf().Jeff Sharkey2013-03-251-1/+24
| | | | | | | | | Most wtf() are looking like network timeouts, not threading bugs, so disable verbose debugging and add more targeted thread logging before calling wtf(). Bug: 8233041 Change-Id: I8e276bffd7880cfe13b65e7e81f5507cab627692
* Active notifications only for running downloads.Jeff Sharkey2013-02-071-1/+2
| | | | | Bug: 8145142 Change-Id: I9119796f809aa967f7ec6bb2a3d2b815e86eaf1b
* Cleaner thread management, less global state.Jeff Sharkey2013-01-281-7/+29
| | | | | | | | | | | | Switch to using a ThreadPoolExecutor for handling downloads, which gives us parallelism logic that is easier to reason about. Also open the door to eventually waiting until the executor is drained to stopSelf(). Removes DownloadHandler singleton, and gives explicit path for publishing active download speeds to notifications. Change-Id: I1836e7742bb8a84861d1ca6bd1e59b2040bd12f8
* Cancel stale notifications when starting.Jeff Sharkey2012-12-131-0/+4
| | | | | Bug: 7693834 Change-Id: I5e212be321cccae0f7c76f80049c4e09f0867694
* Improve download remaining time calculation.Jeff Sharkey2012-11-281-5/+6
| | | | | | | | | | | Calculate remaining time in DownloadNotifier so we always use the most recent progress data, which avoids showing stale times. Weight speed calculation to prefer historical data so remaining time is smoother on bumpy network connections. Bug: 7631948 Change-Id: I497be0899e65086356745340b19d3987c6185bdd
* Show remaining time in download notifications.Jeff Sharkey2012-11-141-3/+10
| | | | | | | | | | Calculate speed of in-progress downloads and estimate time remaining until completion. Uses a moving average that is weighted 1:1 with the most recent 500ms sample. Funnels timing data to notifications through DownloadHandler. Bug: 6777872 Change-Id: I9155f2979aa330bd1172f63bbfca1d053815cee5
* Rewrite of download notifications.Jeff Sharkey2012-11-091-0/+306
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