summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdnan <adnan@cyngn.com>2014-08-28 11:08:39 -0700
committerAdnan <adnan@cyngn.com>2014-08-28 11:08:39 -0700
commitb5672513e16069478c567ddc0f7c97c9c7450e98 (patch)
tree7ced192657a4214f20d7e0d3c9b99caa719cd7de
parentd0c5a7169ba60b65fd91158a1310a8443118227c (diff)
downloadandroid_packages_providers_DownloadProvider-b5672513e16069478c567ddc0f7c97c9c7450e98.zip
android_packages_providers_DownloadProvider-b5672513e16069478c567ddc0f7c97c9c7450e98.tar.gz
android_packages_providers_DownloadProvider-b5672513e16069478c567ddc0f7c97c9c7450e98.tar.bz2
DownloadProvider: Use an alert icon for downloads that have an error status.
Change-Id: If6d0f021cada1a09855009ab3276aa46bec74cfe
-rw-r--r--res/drawable-hdpi/ic_stat_download_error.pngbin0 -> 735 bytes
-rw-r--r--res/drawable-mdpi/ic_stat_download_error.pngbin0 -> 501 bytes
-rw-r--r--res/drawable-xhdpi/ic_stat_download_error.pngbin0 -> 955 bytes
-rwxr-xr-xsrc/com/android/providers/downloads/DownloadNotifier.java4
4 files changed, 3 insertions, 1 deletions
diff --git a/res/drawable-hdpi/ic_stat_download_error.png b/res/drawable-hdpi/ic_stat_download_error.png
new file mode 100644
index 0000000..5776624
--- /dev/null
+++ b/res/drawable-hdpi/ic_stat_download_error.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_stat_download_error.png b/res/drawable-mdpi/ic_stat_download_error.png
new file mode 100644
index 0000000..652e8b0
--- /dev/null
+++ b/res/drawable-mdpi/ic_stat_download_error.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_stat_download_error.png b/res/drawable-xhdpi/ic_stat_download_error.png
new file mode 100644
index 0000000..8388dd5
--- /dev/null
+++ b/res/drawable-xhdpi/ic_stat_download_error.png
Binary files differ
diff --git a/src/com/android/providers/downloads/DownloadNotifier.java b/src/com/android/providers/downloads/DownloadNotifier.java
index bd4a533..1a3ec55 100755
--- a/src/com/android/providers/downloads/DownloadNotifier.java
+++ b/src/com/android/providers/downloads/DownloadNotifier.java
@@ -175,8 +175,10 @@ public class DownloadNotifier {
// Show relevant icon
if (type == TYPE_ACTIVE) {
- if (hasPausedStatus || hasErrorStatus) {
+ if (hasPausedStatus) {
builder.setSmallIcon(R.drawable.download_pause);
+ } else if (hasErrorStatus) {
+ builder.setSmallIcon(R.drawable.ic_stat_download_error);
} else {
builder.setSmallIcon(android.R.drawable.stat_sys_download);
}