From dd10dad6df4333377eb41a7cb6fbf465baab46de Mon Sep 17 00:00:00 2001 From: Pawel Kozak Date: Tue, 28 May 2013 12:20:52 +0200 Subject: 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 --- src/com/android/providers/downloads/DownloadInfo.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/android/providers/downloads/DownloadInfo.java b/src/com/android/providers/downloads/DownloadInfo.java index 7a912d5a..05ea2e23 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; -- cgit v1.2.3