summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Kozak <pawel.kozak@sonymobile.com>2013-05-28 10:20:52 (GMT)
committerVladislav Koldobskiy <admin@nevergone.ru>2014-02-07 14:17:12 (GMT)
commitdd10dad6df4333377eb41a7cb6fbf465baab46de (patch)
tree8a5ddf8f82b7a0c442f8bb627c0af4ef50ee0be0
parent98deeecf2b309b7007badedcb7dc924caf5c8bcd (diff)
downloadandroid_packages_providers_DownloadProvider-dd10dad6df4333377eb41a7cb6fbf465baab46de.zip
android_packages_providers_DownloadProvider-dd10dad6df4333377eb41a7cb6fbf465baab46de.tar.gz
android_packages_providers_DownloadProvider-dd10dad6df4333377eb41a7cb6fbf465baab46de.tar.bz2
Remove download notification after preview
Removes download notification from the notification bar after previewing it. There should be an additional check for download shown in the notifications after completion to prevent from situation when ContentObserver is unregistered and the onChange is never called. Change-Id: I0914a680f08eb96949b56e08719eb28d2e80ccc9
-rw-r--r--src/com/android/providers/downloads/DownloadInfo.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/providers/downloads/DownloadInfo.java b/src/com/android/providers/downloads/DownloadInfo.java
index 7a912d5..05ea2e2 100644
--- a/src/com/android/providers/downloads/DownloadInfo.java
+++ b/src/com/android/providers/downloads/DownloadInfo.java
@@ -353,7 +353,8 @@ public class DownloadInfo {
if (!Downloads.Impl.isStatusCompleted(mStatus)) {
return false;
}
- if (mVisibility == Downloads.Impl.VISIBILITY_VISIBLE_NOTIFY_COMPLETED) {
+ if (mVisibility == Downloads.Impl.VISIBILITY_VISIBLE_NOTIFY_COMPLETED ||
+ mVisibility == DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_ONLY_COMPLETION) {
return true;
}
return false;