From ded2da137ce7c2c71ded2e6d163217ef95267ebb Mon Sep 17 00:00:00 2001 From: qqzhou Date: Tue, 17 Dec 2013 14:18:55 +0800 Subject: DownloadProvider: add to support pause/resume download by manual This feature contains below points: 1. add to pause running download by manual. 2. add to resume manuallly 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 --- src/com/android/providers/downloads/DownloadReceiver.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 src/com/android/providers/downloads/DownloadReceiver.java (limited to 'src/com/android/providers/downloads/DownloadReceiver.java') diff --git a/src/com/android/providers/downloads/DownloadReceiver.java b/src/com/android/providers/downloads/DownloadReceiver.java old mode 100644 new mode 100755 index f3d23766..a70a2936 --- a/src/com/android/providers/downloads/DownloadReceiver.java +++ b/src/com/android/providers/downloads/DownloadReceiver.java @@ -81,7 +81,8 @@ public class DownloadReceiver extends BroadcastReceiver { if (info != null && info.isConnected()) { startService(context); } - } else if (action.equals(Constants.ACTION_RETRY)) { + } else if (action.equals(Constants.ACTION_RETRY) || + action.equals(Constants.ACTION_RESUME)) { startService(context); } else if (action.equals(Constants.ACTION_OPEN) || action.equals(Constants.ACTION_LIST) -- cgit v1.2.3