diff --git a/res/drawable-hdpi/ic_clear2.png b/res/drawable-hdpi/ic_clear2.png
new file mode 100644
index 000000000..707c1b7d3
Binary files /dev/null and b/res/drawable-hdpi/ic_clear2.png differ
diff --git a/res/drawable-mdpi/ic_clear2.png b/res/drawable-mdpi/ic_clear2.png
new file mode 100644
index 000000000..960bd76b6
Binary files /dev/null and b/res/drawable-mdpi/ic_clear2.png differ
diff --git a/res/drawable-xhdpi/ic_clear2.png b/res/drawable-xhdpi/ic_clear2.png
new file mode 100644
index 000000000..59fe422f7
Binary files /dev/null and b/res/drawable-xhdpi/ic_clear2.png differ
diff --git a/res/drawable-xxhdpi/ic_clear2.png b/res/drawable-xxhdpi/ic_clear2.png
new file mode 100644
index 000000000..a3d88d8fd
Binary files /dev/null and b/res/drawable-xxhdpi/ic_clear2.png differ
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 1dd19b41f..e6c1c2ad9 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -333,6 +333,7 @@
注意
开始
停止
+ 全部停止
无效的输入
不再显示
重试
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 763e439f1..30a125674 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -355,6 +355,7 @@
Attention
Start
Stop
+ Stop all
Invalid Input
Never show me this dialog
Retry
diff --git a/src/com/hippo/ehviewer/service/DownloadService.java b/src/com/hippo/ehviewer/service/DownloadService.java
index 6847100e4..1108ebb11 100644
--- a/src/com/hippo/ehviewer/service/DownloadService.java
+++ b/src/com/hippo/ehviewer/service/DownloadService.java
@@ -43,6 +43,7 @@ public class DownloadService extends Service
public static final String ACTION_UPDATE = "com.hippo.ehviewer.service.DownloadService.UPDATE";
public static final String ACTION_STOP = "com.hippo.ehviewer.service.DownloadService.STOP";
+ public static final String ACTION_STOP_ALL = "com.hippo.ehviewer.service.DownloadService.STOP_ALL";
private Context mContext;
private Data mData;
@@ -70,8 +71,13 @@ public class DownloadService extends Service
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
- if (ACTION_STOP.equals(intent.getAction()))
+ if (ACTION_STOP.equals(intent.getAction())) {
stopCurrentTask();
+ mNotifyManager.cancel(DOWNLOAD_NOTIFY_ID);
+ } else if (ACTION_STOP_ALL.equals(intent.getAction())) {
+ stopAll();
+ mNotifyManager.cancel(DOWNLOAD_NOTIFY_ID);
+ }
return START_NOT_STICKY;
}
@@ -235,7 +241,12 @@ public class DownloadService extends Service
Intent stopIntent = new Intent(this, DownloadService.class);
stopIntent.setAction(ACTION_STOP);
PendingIntent piStop = PendingIntent.getService(this, 0, stopIntent, 0);
- mBuilder.addAction(R.drawable.ic_clear, getString(R.string.stop), piStop);
+ mBuilder.addAction(R.drawable.ic_clear2, getString(R.string.stop), piStop);
+
+ Intent stopAllIntent = new Intent(this, DownloadService.class);
+ stopAllIntent.setAction(ACTION_STOP_ALL);
+ PendingIntent piStopAll = PendingIntent.getService(this, 0, stopAllIntent, 0);
+ mBuilder.addAction(R.drawable.ic_clear, getString(R.string.stop_all), piStopAll);
}
@Override